- new : ability to set an element as representant of its category directly
from picture.php screen. - improvement : dedicated icon to add elements into caddie. Ths icon is displayed in the category title bar. git-svn-id: http://piwigo.org/svn/trunk@811 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
194bf3ca48
commit
c501facfa5
7 changed files with 59 additions and 5 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2005-08-14 Pierrick LE GALL
|
||||
|
||||
* new : ability to set an element as representant of its category
|
||||
directly from picture.php screen.
|
||||
|
||||
* improvement : dedicated icon to add elements into caddie. Ths
|
||||
icon is displayed in the category title bar.
|
||||
|
||||
2005-08-14 Pierrick LE GALL
|
||||
|
||||
* new : maintenance screen in administration. There you can update
|
||||
|
|
|
|||
29
picture.php
29
picture.php
|
|
@ -74,6 +74,22 @@ if (!$belongs)
|
|||
echo $lang['thumbnails'].'</a></div>';
|
||||
exit();
|
||||
}
|
||||
//-------------------------------------------------------------- representative
|
||||
if ('admin' == $user['status'] and isset($_GET['representative']))
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET representative_picture_id = '.$_GET['image_id'].'
|
||||
WHERE id = '.$page['cat'].'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$url =
|
||||
PHPWG_ROOT_PATH
|
||||
.'picture.php'
|
||||
.get_query_string_diff(array('representative'));
|
||||
redirect($url);
|
||||
}
|
||||
//---------------------------------------------------------- related categories
|
||||
$query = '
|
||||
SELECT category_id,uppercats,commentable,global_rank
|
||||
|
|
@ -620,6 +636,19 @@ if (isset($picture['current']['high']))
|
|||
'HEIGHT_IMG'=>($full_height + 16)
|
||||
));
|
||||
}
|
||||
// button to set the current picture as representative
|
||||
if ('admin' == $user['status'] and is_numeric($page['cat']))
|
||||
{
|
||||
$template->assign_block_vars(
|
||||
'representative',
|
||||
array(
|
||||
'URL' =>
|
||||
PHPWG_ROOT_PATH.'picture.php'
|
||||
.get_query_string_diff(array())
|
||||
.'&representative=1'
|
||||
)
|
||||
);
|
||||
}
|
||||
//------------------------------------------------------- favorite manipulation
|
||||
if ( !$user['is_the_guest'] )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,14 @@
|
|||
</td>
|
||||
<td style="padding:0px 10px 0px 10px; width:99%;" valign="top">
|
||||
<div class="home">
|
||||
<div class="titrePage">{TITLE}</div>
|
||||
<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>
|
||||
<!-- END caddie -->
|
||||
</ul>
|
||||
{TITLE}
|
||||
</div>
|
||||
<!-- BEGIN calendar -->
|
||||
<div class="navigationBar">{calendar.YEARS_NAV_BAR}</div>
|
||||
<div class="navigationBar">{calendar.MONTHS_NAV_BAR}</div>
|
||||
|
|
@ -123,10 +130,6 @@
|
|||
<!-- END line -->
|
||||
</table>
|
||||
<!-- END thumbnails -->
|
||||
<!-- BEGIN caddie -->
|
||||
<br />
|
||||
<div class="navigationBar"><a href="{U_CADDIE}">add to caddie</a></div>
|
||||
<!-- END caddie -->
|
||||
<!-- BEGIN cat_infos -->
|
||||
<!-- BEGIN navigation -->
|
||||
<div class="navigationBar">{cat_infos.navigation.NAV_BAR}</div>
|
||||
|
|
|
|||
|
|
@ -414,6 +414,11 @@ form#categoryOrdering ul.categoryActions {
|
|||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div.titrePage ul.categoryActions {
|
||||
float: right;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#adminMain>ul.categoryActions {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,15 @@
|
|||
<img src="template/default/theme/metadata.gif" alt="{L_PICTURE_METADATA}" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- BEGIN representative -->
|
||||
<div class="imgMenu" id="left">
|
||||
<a href="{representative.URL}" title="{lang:set as category representative}">
|
||||
<img src="template/default/theme/representative.png" alt="{lang:representative}" />
|
||||
</a>
|
||||
</div>
|
||||
<!-- END representative -->
|
||||
|
||||
<!-- BEGIN favorite -->
|
||||
<div class="imgMenu" id="right">
|
||||
<a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}">
|
||||
|
|
|
|||
BIN
template/default/theme/caddie_add.png
Normal file
BIN
template/default/theme/caddie_add.png
Normal file
Binary file not shown.
BIN
template/default/theme/representative.png
Normal file
BIN
template/default/theme/representative.png
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue