aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/cat_list.php15
-rw-r--r--admin/cat_modify.php9
-rw-r--r--admin/element_set.php7
-rw-r--r--admin/element_set_global.php2
-rw-r--r--admin/element_set_unit.php2
-rw-r--r--category.php29
-rw-r--r--doc/ChangeLog8
-rw-r--r--template/default/admin/cat_list.tpl2
-rw-r--r--template/default/admin/element_set_global.tpl2
-rw-r--r--template/default/admin/element_set_unit.tpl4
-rw-r--r--template/default/category.tpl6
11 files changed, 65 insertions, 21 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index e38d5b4c9..4a66aee12 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -61,8 +61,14 @@ function save_categories_order($categories)
// +-----------------------------------------------------------------------+
// | initialization |
// +-----------------------------------------------------------------------+
+
$categories = array();
-$navigation = $lang['home'];
+
+$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list';
+$navigation = '<a class="" href="'.add_session_id($base_url).'">';
+$navigation.= $lang['home'];
+$navigation.= '</a>';
+
// +-----------------------------------------------------------------------+
// | virtual categories management |
// +-----------------------------------------------------------------------+
@@ -195,16 +201,13 @@ while ($row = mysql_fetch_assoc($result))
$categories[$row['rank']] = $row;
$categories[$row['rank']]['nb_subcats'] = 0;
}
+
// +-----------------------------------------------------------------------+
// | Navigation path |
// +-----------------------------------------------------------------------+
+
if (isset($_GET['parent_id']))
{
- $base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list';
-
- $navigation = '<a class="" href="'.add_session_id($base_url).'">';
- $navigation.= $lang['home'];
- $navigation.= '</a>';
$navigation.= $conf['level_separator'];
$current_category = get_cat_info($_GET['parent_id']);
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 1215b4e73..791dff589 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -104,13 +104,12 @@ foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
$category['is_virtual'] = empty($category['dir']) ? true : false;
// Navigation path
-$url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&amp;parent_id=';
-$navigation = '<a class="" href="'.add_session_id(PHPWG_ROOT_PATH.'admin.php?page=cat_list').'">';
-$navigation.= $lang['home'].'</a>'.$conf['level_separator'];
+$url = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=';
-$navigation.= get_cat_display_name_cache(
+$navigation = get_cat_display_name_cache(
$category['uppercats'],
- $url);
+ PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id='
+ );
$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id='.$_GET['cat_id'];
$status = ($category['status']=='public')?'STATUS_PUBLIC':'STATUS_PRIVATE';
diff --git a/admin/element_set.php b/admin/element_set.php
index e4e913b74..82920d9a8 100644
--- a/admin/element_set.php
+++ b/admin/element_set.php
@@ -104,7 +104,12 @@ DELETE
if (is_numeric($_GET['cat']))
{
$cat_infos = get_cat_info($_GET['cat']);
- $page['title'] = get_cat_display_name($cat_infos['name'], '', false);
+ $page['title'] =
+ get_cat_display_name(
+ $cat_infos['name'],
+ PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=',
+ false
+ );
$query = '
SELECT image_id
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index 33ede7dfc..96386802f 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -266,7 +266,7 @@ $base_url = PHPWG_ROOT_PATH.'admin.php';
$template->assign_vars(
array(
- 'CATEGORY_TITLE'=>$page['title'],
+ 'CATEGORIES_NAV'=>$page['title'],
'L_SUBMIT'=>$lang['submit'],
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index 74aaf1eb0..15dcd62a3 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -110,7 +110,7 @@ $base_url = PHPWG_ROOT_PATH.'admin.php';
$template->assign_vars(
array(
- 'CATEGORY_TITLE'=>$page['title'],
+ 'CATEGORIES_NAV'=>$page['title'],
'L_SUBMIT'=>$lang['submit'],
diff --git a/category.php b/category.php
index 9c597b23a..cfef60065 100644
--- a/category.php
+++ b/category.php
@@ -171,8 +171,7 @@ $template->assign_vars(array(
'U_REGISTER' => add_session_id( PHPWG_ROOT_PATH.'register.php' ),
'U_LOGOUT' => PHPWG_ROOT_PATH.'category.php?act=logout',
'U_ADMIN'=>add_session_id( PHPWG_ROOT_PATH.'admin.php' ),
- 'U_PROFILE'=>add_session_id(PHPWG_ROOT_PATH.'profile.php'),
- 'U_CADDIE'=>add_session_id(PHPWG_ROOT_PATH.'category.php'.get_query_string_diff(array('caddie')).'&amp;caddie=1')
+ 'U_PROFILE'=>add_session_id(PHPWG_ROOT_PATH.'profile.php')
)
);
//-------------------------------------------------------------- external links
@@ -313,6 +312,22 @@ $template->assign_block_vars(
'U_SUMMARY'=>add_session_id(PHPWG_ROOT_PATH.'notification.php')
));
+if (isset($page['cat'])
+ and is_numeric($page['cat'])
+ and 'admin' == $user['status'])
+{
+ $template->assign_block_vars(
+ 'edit',
+ array(
+ 'URL' =>
+ add_session_id(
+ PHPWG_ROOT_PATH.'admin.php?page=cat_modify'
+ .'&amp;cat_id='.$page['cat']
+ )
+ )
+ );
+}
+
//------------------------------------------------------ main part : thumbnails
if (isset($page['cat'])
and ((is_numeric($page['cat']) and $page['cat_nb_images'] != 0)
@@ -329,7 +344,15 @@ if (isset($page['cat'])
if ('admin' == $user['status'])
{
- $template->assign_block_vars('caddie', array());
+ $template->assign_block_vars(
+ 'caddie',
+ array(
+ 'URL' =>
+ add_session_id(
+ PHPWG_ROOT_PATH.'category.php'
+ .get_query_string_diff(array('caddie')).'&amp;caddie=1')
+ )
+ );
}
}
elseif (isset($page['cat']) and $page['cat'] == 'calendar')
diff --git a/doc/ChangeLog b/doc/ChangeLog
index df5afdaa5..4996a81c4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,13 @@
2005-08-19 Pierrick LE GALL
+ * improvement : standardization of categories navigation bar on
+ top of administration screen element_set_(global|unit),
+ cat_modify, cat_list, cat_perm.
+
+ * new : direct link to admin/cat_modify from category.php.
+
+2005-08-19 Pierrick LE GALL
+
* modification : RSS feed work only with a given feed
identifier. Thus we can avoid fixed frequency notification to
concentrate on variable frequency notification, which is much more
diff --git a/template/default/admin/cat_list.tpl b/template/default/admin/cat_list.tpl
index b6303b960..7f92478fb 100644
--- a/template/default/admin/cat_list.tpl
+++ b/template/default/admin/cat_list.tpl
@@ -1,6 +1,6 @@
<h1>{lang:title_categories}</h1>
-<div class="admin">{CATEGORIES_NAV}</div>
+<h2>{CATEGORIES_NAV}</h2>
<form id="categoryOrdering" action="" method="post">
diff --git a/template/default/admin/element_set_global.tpl b/template/default/admin/element_set_global.tpl
index 6014291f9..e15baee34 100644
--- a/template/default/admin/element_set_global.tpl
+++ b/template/default/admin/element_set_global.tpl
@@ -1,6 +1,6 @@
<h1>{lang:Batch management}</h1>
-<div class="admin">{CATEGORY_TITLE}</div>
+<h2>{CATEGORIES_NAV}</h2>
<p style="text-align:center;">
global mode
diff --git a/template/default/admin/element_set_unit.tpl b/template/default/admin/element_set_unit.tpl
index 48dac9046..494e81478 100644
--- a/template/default/admin/element_set_unit.tpl
+++ b/template/default/admin/element_set_unit.tpl
@@ -1,4 +1,6 @@
-<div class="admin">{CATEGORY_TITLE}</div>
+<h1>{lang:Batch management}</h1>
+
+<h2>{CATEGORIES_NAV}</h2>
<p style="text-align:center;">
<a href="{U_GLOBAL_MODE}">global mode</a>
diff --git a/template/default/category.tpl b/template/default/category.tpl
index 0d523c129..fb5352443 100644
--- a/template/default/category.tpl
+++ b/template/default/category.tpl
@@ -91,8 +91,12 @@
<div class="titrePage">
<ul class="categoryActions">
<!-- BEGIN caddie -->
- <li><a href="{U_CADDIE}" title="{lang:add to caddie}"><img src="./template/default/theme/caddie_add.png" /></a></li>
+ <li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="./template/default/theme/caddie_add.png" /></a></li>
<!-- END caddie -->
+
+ <!-- BEGIN edit -->
+ <li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="./template/default/theme/category_edit.png" alt="{lang:edit}"/></a></li>
+ <!-- END edit -->
</ul>
{TITLE}
</div>