aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-06-13 20:39:49 +0000
committerplegall <plg@piwigo.org>2006-06-13 20:39:49 +0000
commit2bcf315efb05855f5c20a28ee79c267d8b3264ea (patch)
treefeca0d44acb2ed1ab6b606781073bd37590132ab
parent006118d03a7cc4204cc35abfa44051a064776c43 (diff)
merge -r1346:1347 from branch 1.6 to trunk (bug 402 fixed).
git-svn-id: http://piwigo.org/svn/trunk@1348 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/cat_list.php8
-rw-r--r--template/yoga/admin/cat_list.tpl18
2 files changed, 15 insertions, 11 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 4c266c01f..ddeddcaa7 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -249,6 +249,8 @@ SELECT id_uppercat, COUNT(*) AS nb_subcats
{
$categories[$row['id_uppercat']]['nb_subcats'] = $row['nb_subcats'];
}
+
+ $template->assign_block_vars('categories', array());
}
foreach ($categories as $category)
@@ -267,7 +269,7 @@ foreach ($categories as $category)
}
$template->assign_block_vars(
- 'category',
+ 'categories.category',
array(
'NAME' => $category['name'],
'ID' => $category['id'],
@@ -288,7 +290,7 @@ foreach ($categories as $category)
if (empty($category['dir']))
{
$template->assign_block_vars(
- 'category.delete',
+ 'categories.category.delete',
array(
'URL'=>$self_url.'&amp;delete='.$category['id']
)
@@ -298,7 +300,7 @@ foreach ($categories as $category)
if ($category['nb_images'] > 0)
{
$template->assign_block_vars(
- 'category.elements',
+ 'categories.category.elements',
array(
'URL'=>$base_url.'element_set&amp;cat='.$category['id']
)
diff --git a/template/yoga/admin/cat_list.tpl b/template/yoga/admin/cat_list.tpl
index 1f6f0198c..ec4b66d43 100644
--- a/template/yoga/admin/cat_list.tpl
+++ b/template/yoga/admin/cat_list.tpl
@@ -3,6 +3,7 @@
<h3>{CATEGORIES_NAV}</h3>
+<!-- BEGIN categories -->
<form id="categoryOrdering" action="{F_ACTION}" method="post">
<ul class="categoryUl">
@@ -11,26 +12,26 @@
<li class="categoryLi"> <!-- category {category.ID} -->
<ul class="categoryActions">
- <li><a href="{category.U_JUMPTO}" title="{lang:jump to category}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to}" /></a></li>
- <li><a href="{category.U_EDIT}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
+ <li><a href="{categories.category.U_JUMPTO}" title="{lang:jump to category}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to}" /></a></li>
+ <li><a href="{categories.category.U_EDIT}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
<!-- BEGIN elements -->
- <li><a href="{category.elements.URL}" title="{lang:manage category elements}"><img src="{themeconf:icon_dir}/category_elements.png" class="button" alt="{lang:elements}" /></a></li>
+ <li><a href="{categories.category.elements.URL}" title="{lang:manage category elements}"><img src="{themeconf:icon_dir}/category_elements.png" class="button" alt="{lang:elements}" /></a></li>
<!-- END elements -->
- <li><a href="{category.U_CHILDREN}" title="{lang:manage sub-categories}"><img src="{themeconf:icon_dir}/category_children.png" class="button" alt="{lang:sub-categories}" /></a></li>
+ <li><a href="{categories.category.U_CHILDREN}" title="{lang:manage sub-categories}"><img src="{themeconf:icon_dir}/category_children.png" class="button" alt="{lang:sub-categories}" /></a></li>
<!-- BEGIN permissions -->
- <li><a href="{category.permissions.URL}" title="{lang:edit category permissions}" ><img src="{themeconf:icon_dir}/category_permissions.png" class="button" alt="{lang:permissions}" /></a></li>
+ <li><a href="{categories.category.permissions.URL}" title="{lang:edit category permissions}" ><img src="{themeconf:icon_dir}/category_permissions.png" class="button" alt="{lang:permissions}" /></a></li>
<!-- END permissions -->
<!-- BEGIN delete -->
- <li><a href="{category.delete.URL}" title="{lang:delete category}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/category_delete.png" class="button" alt="{lang:delete}" /></a></li>
+ <li><a href="{categories.category.delete.URL}" title="{lang:delete category}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/category_delete.png" class="button" alt="{lang:delete}" /></a></li>
<!-- END delete -->
</ul>
- <p><strong><a href="{category.U_CHILDREN}" title="{lang:manage sub-categories}">{category.NAME}</a></strong></p>
+ <p><strong><a href="{categories.category.U_CHILDREN}" title="{lang:manage sub-categories}">{categories.category.NAME}</a></strong></p>
<p>
<label>
{lang:Position} :
- <input type="text" size="4" name="catOrd[{category.ID}]" maxlength="4" value="{category.RANK}" />
+ <input type="text" size="4" name="catOrd[{categories.category.ID}]" maxlength="4" value="{categories.category.RANK}" />
</label>
</p>
@@ -44,6 +45,7 @@
</p>
</form>
+<!-- END categories -->
<form id="addVirtual" action="{F_ACTION}" method="post">
<p>