Undo revision 1865 in order to add tabsheet for categories.
(Not really undo help) git-svn-id: http://piwigo.org/svn/trunk@1877 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
1415354b9c
commit
bacf165624
9 changed files with 49 additions and 84 deletions
|
|
@ -94,6 +94,7 @@ $template->assign_vars(
|
|||
'U_CATEGORIES'=> $link_start.'cat_list',
|
||||
'U_MOVE'=> $link_start.'cat_move',
|
||||
'U_CAT_UPLOAD'=> $opt_link.'upload',
|
||||
'U_CAT_COMMENTS'=> $opt_link.'comments',
|
||||
'U_CAT_VISIBLE'=> $opt_link.'visible',
|
||||
'U_CAT_STATUS'=> $opt_link.'status',
|
||||
'U_CAT_OPTIONS'=> $link_start.'cat_options',
|
||||
|
|
|
|||
|
|
@ -56,6 +56,16 @@ if (isset($_POST['falsify'])
|
|||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET uploadable = \'false\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_true']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
break;
|
||||
}
|
||||
case 'comments' :
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET commentable = \'false\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_true']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
break;
|
||||
|
|
@ -94,6 +104,16 @@ else if (isset($_POST['trueify'])
|
|||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET uploadable = \'true\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_false']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
break;
|
||||
}
|
||||
case 'comments' :
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET commentable = \'true\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_false']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
break;
|
||||
|
|
@ -185,6 +205,27 @@ SELECT id,name,uppercats,global_rank
|
|||
);
|
||||
break;
|
||||
}
|
||||
case 'comments' :
|
||||
{
|
||||
$query_true = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE commentable = \'true\'
|
||||
;';
|
||||
$query_false = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE commentable = \'false\'
|
||||
;';
|
||||
$template->assign_vars(
|
||||
array(
|
||||
'L_SECTION' => $lang['cat_comments_title'],
|
||||
'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
|
||||
'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
case 'visible' :
|
||||
{
|
||||
$query_true = '
|
||||
|
|
|
|||
|
|
@ -158,32 +158,6 @@ UPDATE '.CONFIG_TABLE.'
|
|||
load_conf_from_db();
|
||||
}
|
||||
|
||||
if ( $page['section']=='comments' and !is_adviser() )
|
||||
{
|
||||
if (isset($_POST['falsify'])
|
||||
and isset($_POST['cat_true'])
|
||||
and count($_POST['cat_true']) > 0)
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET commentable = \'false\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_true']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
if (isset($_POST['trueify'])
|
||||
and isset($_POST['cat_false'])
|
||||
and count($_POST['cat_false']) > 0)
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET commentable = \'true\'
|
||||
WHERE id IN ('.implode(',', $_POST['cat_false']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------- template initialization
|
||||
$template->set_filenames( array('config'=>'admin/configuration.tpl') );
|
||||
|
||||
|
|
@ -252,19 +226,6 @@ switch ($page['section'])
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
$query_true = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE commentable = \'true\'
|
||||
;';
|
||||
$query_false = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE commentable = \'false\'
|
||||
;';
|
||||
display_select_cat_wrapper($query_true,array(),'comments.category_option_true');
|
||||
display_select_cat_wrapper($query_false,array(),'comments.category_option_false');
|
||||
break;
|
||||
}
|
||||
case 'default' :
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ categories at once.</p>
|
|||
non remote categories are shown.</dd>
|
||||
|
||||
<dt>Comments</dt>
|
||||
<dd>Authorize users to add comments on selected categories. By
|
||||
inheritance, an element is commentable if it belongs at least to one
|
||||
commentable category.</dd>
|
||||
<dd>Authorize users to add comments on selected categories.
|
||||
Selects the categories which are commentable.
|
||||
An image is commentable if it belongs to at least one category that is commentable.</dd>
|
||||
|
||||
<dt>Lock</dt>
|
||||
<dd>Selected categories will temporary been disabled for maintenance. If
|
||||
|
|
|
|||
|
|
@ -116,7 +116,4 @@ Sends an email to the administrators when a user enters a comment and this comme
|
|||
Sends an email to the administrators when a user enters a comment that requires validation by the admin.
|
||||
User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li>
|
||||
|
||||
<li><strong>Authorize users to add comments on selected categories</strong>:
|
||||
Selects the categories which are commentable. An image is commentable if it belongs to at least one category that is commentable.</li>
|
||||
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ distantes.</dd>
|
|||
|
||||
<dt>Commentaires utilisateur</dt>
|
||||
|
||||
<dd>Autoriser les utilisateurs à commenter les images des catégories
|
||||
sélectionnées. Par héritage, une image est commentable si elle appartient à
|
||||
au moins une catégorie commentable.</dd>
|
||||
<dd>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnée.
|
||||
Par héritage, une image est commentable si elle appartient à au moins une catégorie commentable.</dd>
|
||||
|
||||
<dt>Verrouiller</dt>
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,4 @@ Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un comme
|
|||
Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un commentaire qui demande une validation de la part des administrateurs.
|
||||
La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li>
|
||||
|
||||
<li><strong>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnées</strong>:
|
||||
Une image est commentable si elle appartient à au moins une catégorie commentable.</li>
|
||||
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
<dd>
|
||||
<ul>
|
||||
<li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li>
|
||||
<li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
|
||||
<li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li>
|
||||
<li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
<li><a href="{U_CATEGORIES}">{lang:manage}</a></li>
|
||||
<li><a href="{U_MOVE}">{lang:Move}</a></li>
|
||||
<li><a href="{U_CAT_UPLOAD}">{lang:upload}</a></li>
|
||||
<li><a href="{U_CAT_COMMENTS}">{lang:comments}</a></li>
|
||||
<li><a href="{U_CAT_VISIBLE}">{lang:lock}</a></li>
|
||||
<li><a href="{U_CAT_STATUS}">{lang:cat_security}</a></li>
|
||||
<!-- BEGIN representative -->
|
||||
|
|
|
|||
|
|
@ -221,35 +221,3 @@
|
|||
<input class="submit" type="reset" name="reset" value="{lang:Reset}">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- BEGIN comments -->
|
||||
<form method="post" action="{F_ACTION}" class="properties">
|
||||
<fieldset>
|
||||
<legend>{lang:cat_comments_title}</legend>
|
||||
<table class="doubleSelect">
|
||||
<tr>
|
||||
<td>
|
||||
<h3>{lang:authorized}</h3>
|
||||
<select class="categoryList" name="cat_true[]" multiple="multiple" size="30">
|
||||
<!-- BEGIN category_option_true -->
|
||||
<option {comments.category_option_true.SELECTED} value="{comments.category_option_true.VALUE}">{comments.category_option_true.OPTION}</option>
|
||||
<!-- END category_option_true -->
|
||||
</select>
|
||||
<p><input class="submit" type="submit" value="»" name="falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>{lang:forbidden}</h3>
|
||||
<select class="categoryList" name="cat_false[]" multiple="multiple" size="30">
|
||||
<!-- BEGIN category_option_false -->
|
||||
<option {comments.category_option_false.SELECTED} value="{comments.category_option_false.VALUE}">{comments.category_option_false.OPTION}</option>
|
||||
<!-- END category_option_false -->
|
||||
</select>
|
||||
<p><input class="submit" type="submit" value="«" name="trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- END comments -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue