Changeset 811


Ignore:
Timestamp:
Aug 14, 2005, 1:55:35 PM (19 years ago)
Author:
plg
Message:
  • 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.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ChangeLog

    r810 r811  
     12005-08-14 Pierrick LE GALL
     2
     3        * new : ability to set an element as representant of its category
     4        directly from picture.php screen.
     5
     6        * improvement : dedicated icon to add elements into caddie. Ths
     7        icon is displayed in the category title bar.
     8       
    192005-08-14 Pierrick LE GALL
    210
  • trunk/picture.php

    r803 r811  
    7474  echo $lang['thumbnails'].'</a></div>';
    7575  exit();
     76}
     77//-------------------------------------------------------------- representative
     78if ('admin' == $user['status'] and isset($_GET['representative']))
     79{
     80  $query = '
     81UPDATE '.CATEGORIES_TABLE.'
     82  SET representative_picture_id = '.$_GET['image_id'].'
     83  WHERE id = '.$page['cat'].'
     84;';
     85  pwg_query($query);
     86
     87  $url =
     88    PHPWG_ROOT_PATH
     89    .'picture.php'
     90    .get_query_string_diff(array('representative'));
     91  redirect($url);
    7692}
    7793//---------------------------------------------------------- related categories
     
    620636        'HEIGHT_IMG'=>($full_height + 16)
    621637        ));
     638}
     639// button to set the current picture as representative
     640if ('admin' == $user['status'] and is_numeric($page['cat']))
     641{
     642  $template->assign_block_vars(
     643    'representative',
     644    array(
     645      'URL' =>
     646        PHPWG_ROOT_PATH.'picture.php'
     647        .get_query_string_diff(array())
     648        .'&amp;representative=1'
     649      )
     650    );
    622651}
    623652//------------------------------------------------------- favorite manipulation
  • trunk/template/default/category.tpl

    r804 r811  
    8989        <td style="padding:0px 10px 0px 10px; width:99%;" valign="top">
    9090          <div class="home">
    91                         <div class="titrePage">{TITLE}</div>
     91            <div class="titrePage">
     92              <ul class="categoryActions">
     93                <!-- BEGIN caddie -->
     94                <li><a href="{U_CADDIE}" title="{lang:add to caddie}"><img src="./template/default/theme/caddie_add.png" /></a></li>
     95                <!-- END caddie -->
     96              </ul>
     97              {TITLE}
     98            </div>
    9299                        <!-- BEGIN calendar -->
    93100               <div class="navigationBar">{calendar.YEARS_NAV_BAR}</div>
     
    124131                        </table>
    125132                        <!-- END thumbnails -->
    126                 <!-- BEGIN caddie -->
    127                 <br />
    128                 <div class="navigationBar"><a href="{U_CADDIE}">add to caddie</a></div>
    129                 <!-- END caddie -->
    130133                        <!-- BEGIN cat_infos -->
    131134                          <!-- BEGIN navigation -->
  • trunk/template/default/default.css

    r809 r811  
    413413  float: right;
    414414  margin-top: 5px;
     415}
     416
     417div.titrePage ul.categoryActions {
     418  float: right;
     419  margin: 0;
    415420}
    416421
  • trunk/template/default/picture.tpl

    r803 r811  
    2929  </a>
    3030</div>
     31
     32<!-- BEGIN representative -->
     33<div class="imgMenu" id="left">
     34  <a href="{representative.URL}" title="{lang:set as category representative}">
     35        <img src="template/default/theme/representative.png" alt="{lang:representative}" />
     36  </a>
     37</div>
     38<!-- END representative -->
     39
    3140<!-- BEGIN favorite -->
    3241<div class="imgMenu" id="right">
Note: See TracChangeset for help on using the changeset viewer.