viernes, 24 de septiembre de 2010

Eliminar / ocultar job types de la interfaz de usuario de jobberbase. Remove job types

You want to remove totaly the job types from the user interface? (Freelance, parcial o total time...)

There are some files you will need to update on the /templates/(your-template) folder.

First of all, find this line in all your files and simply delete them:
[img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$job.type_var_name}.png" alt="{$job.type_name}" />

(Use a multiple files text finder! like ultraedit)

This way you remove all the visible job type from your web.

After this, we should remove the option from the Publish Post file.
Go to /_templates/(your-template)/publish-write.tpl

and search this code:

{section name=tmp2 loop=$types}
[input class="no-border" type="radio" name="type_id" id="type_id_{$types[tmp2].id}" value="{$types[tmp2].id}" {if !$job.type_id && !$smarty.post.type_id}{if $smarty.section.tmp2.first}checked="checked"{/if}{else}{if $types[tmp2].id == $job.type_id}checked="checked"{/if}{if $types[tmp2].id == $smarty.post.type_id}checked="checked"{/if}{/if} />
[label for="type_id_{$types[tmp2].id}">[img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$types[tmp2].var_name}.png" alt="{$types[tmp2].name}" />[/label>
{/section}

and replace with this:

{section name=tmp2 loop=$types}
[input type="hidden" name="type_id" id="type_id_{$types[tmp2].id}" value="{$types[tmp2].id}" />
{/section}

That's it!

No hay comentarios: