Skip to content

Commit

Permalink
merge -r1346:1347 from branch 1.6 to trunk (bug 402 fixed).
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@1348 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jun 13, 2006
1 parent 006118d commit 2bcf315
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 5 additions & 3 deletions admin/cat_list.php
Expand Up @@ -249,6 +249,8 @@ function save_categories_order($categories)
{
$categories[$row['id_uppercat']]['nb_subcats'] = $row['nb_subcats'];
}

$template->assign_block_vars('categories', array());
}

foreach ($categories as $category)
Expand All @@ -267,7 +269,7 @@ function save_categories_order($categories)
}

$template->assign_block_vars(
'category',
'categories.category',
array(
'NAME' => $category['name'],
'ID' => $category['id'],
Expand All @@ -288,7 +290,7 @@ function save_categories_order($categories)
if (empty($category['dir']))
{
$template->assign_block_vars(
'category.delete',
'categories.category.delete',
array(
'URL'=>$self_url.'&delete='.$category['id']
)
Expand All @@ -298,7 +300,7 @@ function save_categories_order($categories)
if ($category['nb_images'] > 0)
{
$template->assign_block_vars(
'category.elements',
'categories.category.elements',
array(
'URL'=>$base_url.'element_set&cat='.$category['id']
)
Expand Down
18 changes: 10 additions & 8 deletions template/yoga/admin/cat_list.tpl
Expand Up @@ -3,6 +3,7 @@

<h3>{CATEGORIES_NAV}</h3>

<!-- BEGIN categories -->
<form id="categoryOrdering" action="{F_ACTION}" method="post">

<ul class="categoryUl">
Expand All @@ -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>

Expand All @@ -44,6 +45,7 @@
</p>

</form>
<!-- END categories -->

<form id="addVirtual" action="{F_ACTION}" method="post">
<p>
Expand Down

0 comments on commit 2bcf315

Please sign in to comment.