- global categories' options : instead of N horizontal tabs on a single

page, N options in the left menu (but the same backend)

- categories.global_rank : new calculated field. It gives a global rank of
  the category among all others (updated during ordering)

- category.php page : menu is generated faster thanks to
  categories.global_rank, recursivity becomes useless :-)

- new function to display select box with a set of categories :
  display_select_cat_wrapper

- cat_options : instead of using 1 multiselect for true/false items, using 1
  multiselect for true, and another one for false. The form provides buttons
  with arrows to switch categories from one multiselect to another

- deletion of obsolete function display_categories (working with the old
  template system)

- deletion of obsolete functions get_user_plain_structure,
  create_user_structure, get_user_subcat_ids, update_structure, count_images
  : useless thanks to global_rank


git-svn-id: http://piwigo.org/svn/trunk@614 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2004-11-23 22:31:24 +00:00
parent 5197779bba
commit f0fcd1eedc
16 changed files with 352 additions and 478 deletions
+3 -1
View File
@@ -38,7 +38,9 @@
<ul class="menu">
<li><a class="adminMenu" href="{U_CATEGORIES}">{L_MANAGE}</a></li>
<li><a class="adminMenu" href="{U_UPLOAD}">{L_UPLOAD}</a></li>
<li><a class="adminMenu" href="{U_CAT_OPTIONS}">{L_CAT_OPTIONS}</a></li>
<li><a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a></li>
<li><a class="adminMenu" href="{U_VISIBLE}">{L_VISIBLE}</a></li>
<li><a class="adminMenu" href="{U_STATUS}">{L_STATUS}</a></li>
</ul>
</div>
<div class="titreMenu">{L_IMAGES}</div>
+33 -50
View File
@@ -1,60 +1,43 @@
<p class="confMenu">
<a class="{UPLOAD_CLASS}" href="{U_UPLOAD}">{L_CAT_OPTIONS_MENU_UPLOAD}</a>
<a class="{COMMENTS_CLASS}" href="{U_COMMENTS}">{L_CAT_OPTIONS_MENU_COMMENTS}</a>
<a class="{VISIBLE_CLASS}" href="{U_VISIBLE}">{L_CAT_OPTIONS_MENU_VISIBLE}</a>
<a class="{STATUS_CLASS}" href="{U_STATUS}">{L_CAT_OPTIONS_MENU_STATUS}</a>
</p>
<table width="100%" align="center">
<tr class="admin">
<th colspan="2">{L_TITLE}</th>
</tr>
</table>
<form action="{F_ACTION}" method="post">
<select style="width:500px" multiple="multiple" name="cat[]" size="20">
<!-- BEGIN category_option -->
<option class="{category_option.CLASS}" {category_option.SELECTED} value="{category_option.VALUE}">{category_option.OPTION}</option>
<!-- END category_option -->
<table>
<tr>
<td style="text-align:center;">{L_CAT_OPTIONS_TRUE}</td>
<td></td>
<td style="text-align:center;">{L_CAT_OPTIONS_FALSE}</td>
</tr>
<tr>
<td>
<select style="width:300px" multiple="multiple" name="cat_true[]" size="20">
<!-- BEGIN category_option_true -->
<option class="{category_option_true.CLASS}" {category_option_true.SELECTED} value="{category_option_true.VALUE}">{category_option_true.OPTION}</option>
<!-- END category_option_true -->
</select>
</td>
<td valign="middle">
<input type="submit" value="&rarr;" name="falsify" style="font-size:15px;" class="bouton" />
<br />
<input type="submit" value="&larr;" name="trueify" style="font-size:15px;" class="bouton" />
</td>
<td>
<select style="width:300px" multiple="multiple" name="cat_false[]" size="20">
<!-- BEGIN category_option_false -->
<option class="{category_option_false.CLASS}" {category_option_false.SELECTED} value="{category_option_false.VALUE}">{category_option_false.OPTION}</option>
<!-- END category_option_false -->
</select>
</td>
</tr>
</table>
<!-- BEGIN upload -->
<p>{L_CAT_OPTIONS_UPLOAD_INFO}</p>
<p>
<input type="radio" name="option" value="true"/> <span class="optionTrue">{L_CAT_OPTIONS_UPLOAD_TRUE}</span>
</p>
<p>
<input type="radio" name="option" value="false"/> <span class="optionFalse">{L_CAT_OPTIONS_UPLOAD_FALSE}</span>
</p>
<!-- END upload -->
<!-- BEGIN comments -->
<p>{L_CAT_OPTIONS_COMMENTS_INFO}</p>
<p>
<input type="radio" name="option" value="true"/> <span class="optionTrue">{L_CAT_OPTIONS_COMMENTS_TRUE}</span>
</p>
<p>
<input type="radio" name="option" value="false"/> <span class="optionFalse">{L_CAT_OPTIONS_COMMENTS_FALSE}</span>
</p>
<!-- END comments -->
<!-- BEGIN visible -->
<p>{L_CAT_OPTIONS_VISIBLE_INFO}</p>
<p>
<input type="radio" name="option" value="true"/> <span class="optionTrue">{L_CAT_OPTIONS_VISIBLE_TRUE}</span>
</p>
<p>
<input type="radio" name="option" value="false"/> <span class="optionFalse">{L_CAT_OPTIONS_VISIBLE_FALSE}</span>
</p>
<!-- END visible -->
<!-- BEGIN status -->
<p>{L_CAT_OPTIONS_STATUS_INFO}</p>
<p>
<input type="radio" name="option" value="true"/> <span class="optionTrue">{L_CAT_OPTIONS_STATUS_TRUE}</span>
</p>
<p>
<input type="radio" name="option" value="false"/> <span class="optionFalse">{L_CAT_OPTIONS_STATUS_FALSE}</span>
</p>
<!-- END status -->
<p>{L_CAT_OPTIONS_INFO}</p>
<p style="text-align:center;">
<input type="submit" value="{L_SUBMIT}" name="submit" class="bouton" />
<input type="reset" name="reset" value="{L_RESET}" class="bouton" />
</p>
+6 -4
View File
@@ -12,15 +12,17 @@
<form action="{F_AUTH_ACTION}" method="POST">
<ul class="menu">
<!-- BEGIN category -->
<li> <a href="{permission.category.CAT_URL}">{permission.category.CAT_NAME}</a>
<li>
<input type="radio" name="{permission.category.CAT_ID}" value="0" {permission.category.AUTH_YES}/>{L_AUTHORIZED}
<input type="radio" name="{permission.category.CAT_ID}" value="1" {permission.category.AUTH_NO}/>{L_FORBIDDEN}
:
<a href="{permission.category.CAT_URL}">{permission.category.CAT_NAME}</a>
<!-- BEGIN parent_forbidden -->
{L_PARENT_FORBIDDEN}&nbsp;-&nbsp;
<!-- END parent_forbidden -->
<input type="radio" name="{permission.category.CAT_ID}" value="0" {permission.category.AUTH_YES}/>{L_AUTHORIZED}
<input type="radio" name="{permission.category.CAT_ID}" value="1" {permission.category.AUTH_NO}/>{L_FORBIDDEN}
</li>
<!-- END category -->
</ul>
<input type="submit" name="submit" class="bouton" value="{L_SUBMIT}"/>
</form>
<!-- END permission -->
<!-- END permission -->
-2
View File
@@ -7,9 +7,7 @@
<a href="{U_HOME}">{L_CATEGORIES}</a>
</div>
<div class="menu">
<ul class="menu">
{MENU_CATEGORIES_CONTENT}
</ul>
<div class="totalImages">[&nbsp;{NB_PICTURE}&nbsp;{L_TOTAL}&nbsp;]</div>
</div>
<div class="titreMenu">{L_SPECIAL_CATEGORIES}</div>