aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-03-12 22:23:12 +0000
committerplegall <plg@piwigo.org>2008-03-12 22:23:12 +0000
commit6f84eaf7cb10b0db6e82a3c85d998e60a3654c9a (patch)
tree923e53e29a08cef640634137c6ceb13015ac08f1
parent5db8e25dee835587485d70c28795ddcbe16c5994 (diff)
Modification: admin/tags goes smarty
git-svn-id: http://piwigo.org/svn/trunk@2277 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/tags.php13
-rw-r--r--template/yoga/admin/tags.tpl44
2 files changed, 28 insertions, 29 deletions
diff --git a/admin/tags.php b/admin/tags.php
index 1d7e3ffdb..ab1709dc9 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -190,7 +190,7 @@ SELECT id
$template->set_filenames(array('tags' => 'admin/tags.tpl'));
-$template->assign_vars(
+$template->assign(
array(
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=tags'
)
@@ -200,7 +200,7 @@ $template->assign_vars(
// | form creation |
// +-----------------------------------------------------------------------+
-$template->assign_vars(
+$template->assign(
array(
'TAG_SELECTION' => get_html_tag_selection(
get_all_tags(),
@@ -211,10 +211,9 @@ $template->assign_vars(
if (isset($_POST['edit']) and isset($_POST['tags']))
{
- $template->assign_block_vars(
- 'edit_tags',
+ $template->assign(
array(
- 'LIST' => implode(',', $_POST['tags']),
+ 'EDIT_TAGS_LIST' => implode(',', $_POST['tags']),
)
);
@@ -231,8 +230,8 @@ SELECT id, name
foreach ($_POST['tags'] as $tag_id)
{
- $template->assign_block_vars(
- 'edit_tags.tag',
+ $template->append(
+ 'tags',
array(
'ID' => $tag_id,
'NAME' => $name_of[$tag_id],
diff --git a/template/yoga/admin/tags.tpl b/template/yoga/admin/tags.tpl
index 05c9b838a..b2ce57341 100644
--- a/template/yoga/admin/tags.tpl
+++ b/template/yoga/admin/tags.tpl
@@ -1,53 +1,53 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div class="titrePage">
- <h2>{lang:Manage tags}</h2>
+ <h2>{'Manage tags'|@translate}</h2>
</div>
-<form action="{F_ACTION}" method="post">
+<form action="{$F_ACTION}" method="post">
- <!-- BEGIN edit_tags -->
+ {if isset($EDIT_TAGS_LIST)}
<fieldset>
- <legend>{lang:Edit tags}</legend>
- <input type="hidden" name="edit_list" value="{edit_tags.LIST}" />
+ <legend>{'Edit tags'|@translate}</legend>
+ <input type="hidden" name="edit_list" value="{$EDIT_TAGS_LIST}" />
<table class="table2">
<tr class="throw">
- <th>{lang:Current name}</th>
- <th>{lang:New name}</th>
+ <th>{'Current name'|@translate}</th>
+ <th>{'New name'|@translate}</th>
</tr>
- <!-- BEGIN tag -->
+ {foreach from=$tags item=tag}
<tr>
- <td>{edit_tags.tag.NAME}</td>
- <td><input type="text" name="tag_name-{edit_tags.tag.ID}" value="{edit_tags.tag.NAME}" /></td>
+ <td>{$tag.NAME}</td>
+ <td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" /></td>
</tr>
- <!-- END tag -->
+ {/foreach}
</table>
<p>
- <input class="submit" type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED} />
- <input class="submit" type="reset" value="{lang:Reset}" />
+ <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED} />
+ <input class="submit" type="reset" value="{'Reset'|@translate}" />
</p>
</fieldset>
- <!-- END edit_tags -->
+ {/if}
<fieldset>
- <legend>{lang:Add a tag}</legend>
+ <legend>{'Add a tag'|@translate}</legend>
<label>
- {lang:New tag}
+ {'New tag'|@translate}
<input type="text" name="add_tag" />
</label>
- <p><input class="submit" type="submit" name="add" value="{lang:Submit}" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" name="add" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/></p>
</fieldset>
<fieldset>
- <legend>{lang:Tag selection}</legend>
+ <legend>{'Tag selection'|@translate}</legend>
- {TAG_SELECTION}
+ {$TAG_SELECTION}
<p>
- <input class="submit" type="submit" name="edit" value="{lang:Edit selected tags}"/>
- <input class="submit" type="submit" name="delete" value="{lang:Delete selected tags}" onclick="return confirm('{lang:Are you sure?}');" {TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="edit" value="{'Edit selected tags'|@translate}"/>
+ <input class="submit" type="submit" name="delete" value="{'Delete selected tags'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');" {$TAG_INPUT_ENABLED}/>
</p>
</fieldset>