Changeset 13077 for trunk


Ignore:
Timestamp:
Feb 10, 2012, 11:52:07 AM (12 years ago)
Author:
plg
Message:

feature 2564: redesign on photo administration screen.

  • one screen with several tabs (for now: properties + coi)
  • double select boxes for album associations and representation have been converted to simple multiple select boxes with jQuery Chosen
  • more details about the photo in an introduction text
Location:
trunk
Files:
4 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r13025 r13077  
    127127  $_GET['page'] = 'album';
    128128  $_GET['cat_id'] = $matches[1];
     129  if (isset($matches[2]))
     130  {
     131    $_GET['tab'] = $matches[2];
     132  }
     133}
     134
     135// ?page=photo-1234-properties is an clean alias of
     136// ?page=photo&image_id=1234&tab=properties
     137if (isset($_GET['page']) and preg_match('/^photo-(\d+)(?:-(.*))?$/', $_GET['page'], $matches))
     138{
     139  $_GET['page'] = 'photo';
     140  $_GET['image_id'] = $matches[1];
    129141  if (isset($matches[2]))
    130142  {
     
    237249        'cat_move',     // ?only POST
    238250        'cat_options',  // ?only POST; public/private; lock/unlock
     251        'photo',
    239252        'picture_modify', // ?only POST; associate/dissociate
    240253        'user_perm',
  • trunk/admin/batch_manager_global.php

    r13064 r13077  
    180180  if ('move' == $action)
    181181  {
    182     // let's first break links with all albums but their "storage album"
    183     $query = '
    184 DELETE '.IMAGE_CATEGORY_TABLE.'.*
    185   FROM '.IMAGE_CATEGORY_TABLE.'
    186     JOIN '.IMAGES_TABLE.' ON image_id=id
    187   WHERE id IN ('.implode(',', $collection).')
    188     AND (storage_category_id IS NULL OR storage_category_id != category_id)
    189 ;';
    190     pwg_query($query);
    191    
    192     associate_images_to_categories(
    193       $collection,
    194       array($_POST['move'])
    195       );
     182    move_images_to_categories($collection, array($_POST['move']));
    196183
    197184    $_SESSION['page_infos'] = array(
     
    787774        'LEVEL' => $row['level'],
    788775        'FILE_SRC' => $row['path'],
    789         'U_EDIT' =>
    790             PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
    791             '&image_id='.$row['id'],
     776        'U_EDIT' => get_root_url().'admin.php?page=photo-'.$row['id'],
    792777        )
    793778      );
  • trunk/admin/batch_manager_unit.php

    r12922 r13077  
    266266        'TN_SRC' => $src,
    267267        'FILE_SRC' => $row['path'],
    268         'LEGEND' => !empty($row['name']) ?
    269             $row['name'] : get_name_from_file($row['file']),
    270         'U_EDIT' =>
    271             PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
    272             '&image_id='.$row['id'],
     268        'LEGEND' => render_element_name($row),
     269        'U_EDIT' => get_root_url().'admin.php?page=photo-'.$row['id'],
    273270        'NAME' => !empty($row['name'])?$row['name']:'',
    274271        'AUTHOR' => !empty($row['author'])?htmlspecialchars($row['author']):'',
  • trunk/admin/cat_modify.php

    r13013 r13077  
    344344    $row = pwg_db_fetch_assoc(pwg_query($query));
    345345    $src = DerivativeImage::thumb_url($row);
    346     $url = get_root_url().'admin.php?page=picture_modify';
    347     $url.= '&image_id='.$category['representative_picture_id'];
     346    $url = get_root_url().'admin.php?page=photo-'.$category['representative_picture_id'];
    348347
    349348    $tpl_representant['picture'] =
  • trunk/admin/comments.php

    r12922 r13077  
    130130    'comments',
    131131    array(
    132       'U_PICTURE' =>
    133           PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
    134           '&image_id='.$row['image_id'],
     132      'U_PICTURE' => get_root_url().'admin.php?page=photo-'.$row['image_id'],
    135133      'ID' => $row['id'],
    136134      'TN_SRC' => $thumb,
  • trunk/admin/include/functions.php

    r13052 r13077  
    15321532
    15331533/**
     1534 * Disssociate images from all categories except their storage category and
     1535 * associate to new categories.
     1536 *
     1537 * @param array images
     1538 * @param array categories
     1539 * @return void
     1540 */
     1541function move_images_to_categories($images, $categories)
     1542{
     1543  if (count($images) == 0)
     1544  {
     1545    return false;
     1546  }
     1547 
     1548  // let's first break links with all albums but their "storage album"
     1549  $query = '
     1550DELETE '.IMAGE_CATEGORY_TABLE.'.*
     1551  FROM '.IMAGE_CATEGORY_TABLE.'
     1552    JOIN '.IMAGES_TABLE.' ON image_id=id
     1553  WHERE id IN ('.implode(',', $images).')
     1554    AND (storage_category_id IS NULL OR storage_category_id != category_id)
     1555;';
     1556  pwg_query($query);
     1557   
     1558  if (is_array($categories) and count($categories) > 0)
     1559  {
     1560    associate_images_to_categories($images, $categories);
     1561  }
     1562}
     1563
     1564/**
    15341565 * Associate images associated to a list of source categories to a list of
    15351566 * destination categories.
     
    19882019  switch ($menu_page)
    19892020  {
     2021    case 'photo':
    19902022    case 'photos_add':
    19912023    case 'rating':
  • trunk/admin/include/photos_add_direct_process.inc.php

    r13019 r13077  
    216216    $thumbnail['title'] = get_name_from_file($image_infos['file']);
    217217
    218     $thumbnail['link'] = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'
    219       .'&image_id='.$image_id
    220       .'&cat_id='.$category_id
    221       ;
     218    $thumbnail['link'] = get_root_url().'admin.php?page=photo-'.$image_id.'&cat_id='.$category_id;
    222219
    223220    array_push($page['thumbnails'], $thumbnail);
  • trunk/admin/picture_coi.php

    r13052 r13077  
    7979
    8080$tpl_var = array(
     81  'TITLE' => render_element_name($row),
    8182  'ALT' => $row['file'],
    8283  'U_IMG' => DerivativeImage::url(IMG_LARGE, $row),
    83   'U_EDIT' => get_root_url().'admin.php?page=picture_modify&image_id='.$_GET['image_id'],
    8484  );
    8585
  • trunk/admin/picture_modify.php

    r13038 r13077  
    3737check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
    3838
     39// represent
     40$query = '
     41SELECT id
     42  FROM '.CATEGORIES_TABLE.'
     43  WHERE representative_picture_id = '.$_GET['image_id'].'
     44;';
     45$represent_options_selected = array_from_query($query, 'id');
     46
    3947// +-----------------------------------------------------------------------+
    4048// |                             delete photo                              |
     
    133141  }
    134142
    135   if (isset($_POST['date_creation_action']))
    136   {
    137     if ('set' == $_POST['date_creation_action'])
    138     {
    139       $data{'date_creation'} = $_POST['date_creation_year']
    140                                  .'-'.$_POST['date_creation_month']
    141                                  .'-'.$_POST['date_creation_day'];
    142     }
    143     else if ('unset' == $_POST['date_creation_action'])
    144     {
    145       $data{'date_creation'} = '';
    146     }
     143  if (!empty($_POST['date_creation_year']))
     144  {
     145    $data{'date_creation'} =
     146      $_POST['date_creation_year']
     147      .'-'.$_POST['date_creation_month']
     148      .'-'.$_POST['date_creation_day'];
     149  }
     150  else
     151  {
     152    $data{'date_creation'} = null;
    147153  }
    148154
     
    164170  set_tags($tag_ids, $_GET['image_id']);
    165171
     172  // association to albums
     173  move_images_to_categories(array($_GET['image_id']), $_POST['associate']);
     174
     175  // thumbnail for albums
     176  if (!isset($_POST['represent']))
     177  {
     178    $_POST['represent'] = array();
     179  }
     180 
     181  $no_longer_thumbnail_for = array_diff($represent_options_selected, $_POST['represent']);
     182  if (count($no_longer_thumbnail_for) > 0)
     183  {
     184    set_random_representant($no_longer_thumbnail_for);
     185  }
     186
     187  $new_thumbnail_for = array_diff($_POST['represent'], $represent_options_selected);
     188  if (count($new_thumbnail_for) > 0)
     189  {
     190    $query = '
     191UPDATE '.CATEGORIES_TABLE.'
     192  SET representative_picture_id = '.$_GET['image_id'].'
     193  WHERE id IN ('.implode(',', $new_thumbnail_for).')
     194;';
     195    pwg_query($query);
     196  }
     197
     198  $represent_options_selected = $_POST['represent'];
     199 
    166200  array_push($page['infos'], l10n('Photo informations updated'));
    167 }
    168 // associate the element to other categories than its storage category
    169 if (isset($_POST['associate'])
    170     and isset($_POST['cat_dissociated'])
    171     and count($_POST['cat_dissociated']) > 0
    172   )
    173 {
    174   associate_images_to_categories(
    175     array($_GET['image_id']),
    176     $_POST['cat_dissociated']
    177     );
    178 }
    179 // dissociate the element from categories (but not from its storage category)
    180 if (isset($_POST['dissociate'])
    181     and isset($_POST['cat_associated'])
    182     and count($_POST['cat_associated']) > 0
    183   )
    184 {
    185   $query = '
    186 DELETE FROM '.IMAGE_CATEGORY_TABLE.'
    187   WHERE image_id = '.$_GET['image_id'].'
    188     AND category_id IN ('.implode(',', $_POST['cat_associated']).')
    189 ';
    190   pwg_query($query);
    191 
    192   update_category($_POST['cat_associated']);
    193 }
    194 // elect the element to represent the given categories
    195 if (isset($_POST['elect'])
    196     and isset($_POST['cat_dismissed'])
    197     and count($_POST['cat_dismissed']) > 0
    198   )
    199 {
    200   $datas = array();
    201   foreach ($_POST['cat_dismissed'] as $category_id)
    202   {
    203     array_push($datas,
    204                array('id' => $category_id,
    205                      'representative_picture_id' => $_GET['image_id']));
    206   }
    207   $fields = array('primary' => array('id'),
    208                   'update' => array('representative_picture_id'));
    209   mass_updates(CATEGORIES_TABLE, $fields, $datas);
    210 }
    211 // dismiss the element as representant of the given categories
    212 if (isset($_POST['dismiss'])
    213     and isset($_POST['cat_elected'])
    214     and count($_POST['cat_elected']) > 0
    215   )
    216 {
    217   set_random_representant($_POST['cat_elected']);
    218201}
    219202
     
    263246  );
    264247
    265 $admin_url_start = get_root_url().'admin.php?page=picture_modify';
    266 $admin_url_start.= '&image_id='.$_GET['image_id'];
     248$admin_url_start = $admin_photo_base_url.'-properties';
    267249$admin_url_start.= isset($_GET['cat_id']) ? '&cat_id='.$_GET['cat_id'] : '';
    268250
     
    282264        stripslashes($_POST['name']) : @$row['name'],
    283265
     266    'TITLE' => render_element_name($row),
     267
    284268    'DIMENSIONS' => @$row['width'].' * '.@$row['height'],
    285269
     
    303287    )
    304288  );
     289
     290$added_by = 'N/A';
     291$query = '
     292SELECT '.$conf['user_fields']['username'].' AS username
     293  FROM '.USERS_TABLE.'
     294  WHERE '.$conf['user_fields']['id'].' = '.$row['added_by'].'
     295;';
     296$result = pwg_query($query);
     297while ($user_row = pwg_db_fetch_assoc($result))
     298{
     299  $added_by = $user_row['username'];
     300}
     301
     302$intro = sprintf(
     303  l10n('This photo was posted on %s by %s.'),
     304  format_date($row['date_available']),
     305  $added_by
     306  );
     307
     308$intro.= ' ';
     309
     310$intro.= sprintf(
     311  l10n('Original file is %s, %ux%u pixels, %.2fMB.'),
     312  $row['file'],
     313  $row['width'],
     314  $row['height'],
     315  $row['filesize']/1024
     316  );
     317
     318$intro.= ' ';
     319
     320$intro.= sprintf(
     321  l10n('%u visits'),
     322  $row['hit']
     323  );
     324
     325if ($conf['rate'] and !empty($row['rating_score']))
     326{
     327  $query = '
     328SELECT
     329    COUNT(*)
     330  FROM '.RATE_TABLE.'
     331  WHERE element_id = '.$_GET['image_id'].'
     332;';
     333  list($nb_rates) = pwg_db_fetch_row(pwg_query($query));
     334 
     335  $intro.= sprintf(
     336    l10n(', %u rates, rating score %s'),
     337    $nb_rates,
     338    $row['rating_score']
     339    );
     340}
     341
     342$intro.= '. ';
     343
     344$intro.= sprintf(
     345  l10n('Numeric identifier is %u.'),
     346  $row['id']
     347  );
     348
     349$template->assign('INTRO', $intro);
    305350
    306351if (in_array(get_extension($row['path']),$conf['picture_ext']))
     
    433478}
    434479
    435 // associate to another category ?
     480// associate to albums
     481$query = '
     482SELECT id
     483  FROM '.CATEGORIES_TABLE.'
     484    INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = category_id
     485  WHERE image_id = '.$_GET['image_id'].'
     486;';
     487$associate_options_selected = array_from_query($query, 'id');
     488
    436489$query = '
    437490SELECT id,name,uppercats,global_rank
    438491  FROM '.CATEGORIES_TABLE.'
    439     INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = category_id
    440   WHERE image_id = '.$_GET['image_id'];
    441 if (isset($storage_category_id))
    442 {
    443   $query.= '
    444     AND id != '.$storage_category_id;
    445 }
    446 $query.= '
    447 ;';
    448 display_select_cat_wrapper($query, array(), 'associated_options');
    449 
    450 $result = pwg_query($query);
    451 $associateds = array(-1);
    452 if (isset($storage_category_id))
    453 {
    454   array_push($associateds, $storage_category_id);
    455 }
    456 while ($row = pwg_db_fetch_assoc($result))
    457 {
    458   array_push($associateds, $row['id']);
    459 }
    460 $query = '
    461 SELECT id,name,uppercats,global_rank
    462   FROM '.CATEGORIES_TABLE.'
    463   WHERE id NOT IN ('.implode(',', $associateds).')
    464 ;';
    465 display_select_cat_wrapper($query, array(), 'dissociated_options');
    466 
    467 // representing
    468 $query = '
    469 SELECT id,name,uppercats,global_rank
    470   FROM '.CATEGORIES_TABLE.'
    471   WHERE representative_picture_id = '.$_GET['image_id'].'
    472 ;';
    473 display_select_cat_wrapper($query, array(), 'elected_options');
    474 
    475 $query = '
    476 SELECT id,name,uppercats,global_rank
    477   FROM '.CATEGORIES_TABLE.'
    478   WHERE representative_picture_id != '.$_GET['image_id'].'
    479     OR representative_picture_id IS NULL
    480 ;';
    481 display_select_cat_wrapper($query, array(), 'dismissed_options');
     492;';
     493display_select_cat_wrapper($query, $associate_options_selected, 'associate_options');
     494display_select_cat_wrapper($query, $represent_options_selected, 'represent_options');
    482495
    483496//----------------------------------------------------------- sending html code
  • trunk/admin/rating.php

    r12922 r13077  
    204204  $thumbnail_src = DerivativeImage::thumb_url($image);
    205205
    206   $image_url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
    207             '&image_id='.$image['id'];
     206  $image_url = get_root_url().'admin.php?page=photo-'.$image['id'];
    208207
    209208  $query = 'SELECT *
  • trunk/admin/themes/default/template/picture_coi.tpl

    r13052 r13077  
    44{combine_script id='jquery.jcrop' load='footer' require='jquery' path='themes/default/js/plugins/jquery.Jcrop.min.js'}
    55
    6 <h2>{'Center of interest'|@translate}</h2>
    7 <div>
    8 <a href="{$U_EDIT}">{'Edit photo information'|@translate}</a>
    9 </div>
     6<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
    107
    118<form method="post">
  • trunk/admin/themes/default/template/picture_modify.tpl

    r13038 r13077  
    22{include file='include/dbselect.inc.tpl'}
    33{include file='include/datepicker.inc.tpl'}
     4
     5{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
     6{combine_css path="themes/default/js/plugins/chosen.css"}
     7
     8{footer_script}{literal}
     9jQuery(document).ready(function() {
     10  jQuery(".chzn-select").chosen();
     11});
     12{/literal}{/footer_script}
    413
    514{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
     
    2534{/footer_script}
    2635
    27 <h2>{'Edit photo information'|@translate}</h2>
     36<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
    2837
    29 <img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
    30 
    31 <ul class="categoryActions">
    32   {if isset($U_JUMPTO) }
    33   <li><a href="{$U_JUMPTO}" title="{'jump to photo'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" alt="{'jump to photo'|@translate}"></a></li>
    34   {/if}
    35   {if !url_is_remote($PATH)}
    36   <li><a href="{$U_SYNC}" title="{'Synchronize'|@translate}"><img src="{$themeconf.admin_icon_dir}/sync_metadata.png" alt="{'Synchronize'|@translate}"></a></li>
    37 
    38   <li><a href="{$U_DELETE}" title="{'delete photo'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_delete.png" alt="{'delete photo'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"></a></li>
    39   {/if}
    40 </ul>
    41 
    42 <form action="{$F_ACTION}" method="post" id="properties">
     38<form action="{$F_ACTION}" method="post" id="catModify">
    4339
    4440  <fieldset>
     
    4844
    4945      <tr>
    50         <td><strong>{'Path'|@translate}</strong></td>
    51         <td>{$PATH}</td>
    52       </tr>
     46        <td id="albumThumbnail">
     47<img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
     48        </td>
    5349
    54       <tr>
    55         <td><strong>{'Post date'|@translate}</strong></td>
    56         <td>{$REGISTRATION_DATE}</td>
    57       </tr>
     50        <td id="albumLinks">
     51<p style="text-align:left">{$INTRO}</p>
    5852
    59       <tr>
    60         <td><strong>{'Dimensions'|@translate}</strong></td>
    61         <td>{$DIMENSIONS}</td>
    62       </tr>
     53<ul style="padding-left:15px;">
     54{if isset($U_JUMPTO) }
     55  <li><a href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
     56{/if}
    6357
    64       <tr>
    65         <td><strong>{'Filesize'|@translate}</strong></td>
    66         <td>{$FILESIZE}</td>
    67       </tr>
     58{if !url_is_remote($PATH)}
     59  <li><a href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
    6860
    69       <tr>
    70         <td><strong>{'Storage album'|@translate}</strong></td>
    71         <td>{$STORAGE_CATEGORY}</td>
    72       </tr>
     61  <li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
     62  {/if}
    7363
    74       {if isset($related_categories) }
    75       <tr>
    76         <td><strong>{'Linked albums'|@translate}</strong></td>
    77         <td>
    78           <ul>
    79             {foreach from=$related_categories item=name}
    80             <li>{$name}</li>
    81             {/foreach}
    82           </ul>
     64</ul>
    8365        </td>
    8466      </tr>
    85       {/if}
    86 {if isset($U_COI)}
    87       <tr>
    88         <td></td>
    89         <td><a href="{$U_COI}">{'Not cropped correctly?'|@translate}</a></td>
    90       </tr>
    91 {/if}
    9267    </table>
    9368
     
    9772    <legend>{'Properties'|@translate}</legend>
    9873
    99     <table>
     74    <p>
     75      <strong>{'Title'|@translate}</strong>
     76      <br>
     77      <input type="text" class="large" name="name" value="{$NAME}">
     78    </p>
    10079
    101       <tr>
    102         <td><strong>{'Name'|@translate}</strong></td>
    103         <td><input type="text" class="large" name="name" value="{$NAME}"></td>
    104       </tr>
     80    <p>
     81      <strong>{'Author'|@translate}</strong>
     82      <br>
     83      <input type="text" class="large" name="author" value="{$AUTHOR}">
     84    </p>
    10585
    106       <tr>
    107         <td><strong>{'Author'|@translate}</strong></td>
    108         <td><input type="text" class="large" name="author" value="{$AUTHOR}"></td>
    109       </tr>
     86    <p>
     87      <strong>{'Creation date'|@translate}</strong>
     88      <br>
     89      <select id="date_creation_day" name="date_creation_day">
     90        <option value="0">--</option>
     91{section name=day start=1 loop=32}
     92        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
     93{/section}
     94      </select>
    11095
    111       <tr>
    112         <td><strong>{'Creation date'|@translate}</strong></td>
    113         <td>
    114           <label><input type="radio" name="date_creation_action" value="unset"> {'unset'|@translate}</label>
    115           <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set"> {'set to'|@translate}
    116           <select id="date_creation_day" name="date_creation_day">
    117             <option value="0">--</option>
    118             {section name=day start=1 loop=32}
    119               <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
    120             {/section}
    121           </select>
    122           <select id="date_creation_month" name="date_creation_month">
    123             {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
    124           </select>
    125           <input id="date_creation_year"
    126                  name="date_creation_year"
    127                  type="text"
    128                  size="4"
    129                  maxlength="4"
    130                  value="{$DATE_CREATION_YEAR_VALUE}">
    131           <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
    132         </td>
    133       </tr>
     96      <select id="date_creation_month" name="date_creation_month">
     97        {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
     98      </select>
    13499
    135       <tr>
    136         <td><strong>{'Tags'|@translate}</strong></td>
    137         <td>
     100      <input id="date_creation_year" name="date_creation_year" type="text" size="4" maxlength="4" value="{$DATE_CREATION_YEAR_VALUE}">
     101      <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
     102    <a href="#" id="unset_date_creation" style="display:none">unset</a>
     103    </p>
     104
     105    <p>
     106      <strong>{'Linked albums'|@translate}</strong>
     107      <br>
     108      <select data-placeholder="Select albums..." class="chzn-select" multiple style="width:700px;" name="associate[]">
     109        {html_options options=$associate_options selected=$associate_options_selected}
     110      </select>
     111    </p>
     112
     113    <p>
     114      <strong>{'Representation of albums'|@translate}</strong>
     115      <br>
     116      <select data-placeholder="Select albums..." class="chzn-select" multiple style="width:700px;" name="represent[]">
     117        {html_options options=$represent_options selected=$represent_options_selected}
     118      </select>
     119    </p>
     120
     121    <p>
     122      <strong>{'Tags'|@translate}</strong>
     123      <br>
    138124<select id="tags" name="tags">
    139125{foreach from=$tag_selection item=tag}
     
    141127{/foreach}
    142128</select>
    143         </td>
    144       </tr>
     129    </p>
    145130
     131    <p>
     132      <strong>{'Description'|@translate}</strong>
     133      <br>
     134      <textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea>
     135    </p>
    146136
    147       <tr>
    148         <td><strong>{'Description'|@translate}</strong></td>
    149         <td><textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea></td>
    150       </tr>
    151 
    152   <tr>
    153     <td><strong>{'Who can see this photo?'|@translate}</strong></td>
    154     <td>
     137    <p>
     138      <strong>{'Who can see this photo?'|@translate}</strong>
     139      <br>
    155140      <select name="level" size="1">
    156141        {html_options options=$level_options selected=$level_options_selected}
    157142      </select>
    158     </td>
    159   </tr>
     143   </p>
    160144
    161     </table>
    162 
    163     <p style="text-align:center;">
    164       <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
    165       <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
    166     </p>
    167 
    168   </fieldset>
     145  <p style="margin:40px 0 0 0">
     146    <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
     147  </p>
     148</fieldset>
    169149
    170150</form>
    171 
    172 <form id="associations" method="post" action="{$F_ACTION}#associations">
    173   <fieldset>
    174     <legend>{'Linked albums'|@translate}</legend>
    175 
    176     <table class="doubleSelect">
    177       <tr>
    178         <td>
    179           <h3>{'Associated'|@translate}</h3>
    180           <select class="categoryList" name="cat_associated[]" multiple="multiple" size="30">
    181             {html_options options=$associated_options}
    182           </select>
    183           <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;"></p>
    184         </td>
    185 
    186         <td>
    187           <h3>{'Dissociated'|@translate}</h3>
    188           <select class="categoryList" name="cat_dissociated[]" multiple="multiple" size="30">
    189             {html_options options=$dissociated_options}
    190           </select>
    191           <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;"></p>
    192         </td>
    193       </tr>
    194     </table>
    195 
    196   </fieldset>
    197 </form>
    198 
    199 <form id="representation" method="post" action="{$F_ACTION}#representation">
    200   <fieldset>
    201     <legend>{'Representation of albums'|@translate}</legend>
    202 
    203     <table class="doubleSelect">
    204       <tr>
    205         <td>
    206           <h3>{'Represents'|@translate}</h3>
    207           <select class="categoryList" name="cat_elected[]" multiple="multiple" size="30">
    208             {html_options options=$elected_options}
    209           </select>
    210           <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;"></p>
    211         </td>
    212 
    213         <td>
    214           <h3>{'Does not represent'|@translate}</h3>
    215           <select class="categoryList" name="cat_dismissed[]" multiple="multiple" size="30">
    216             {html_options options=$dismissed_options}
    217           </select>
    218           <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;"></p>
    219         </td>
    220       </tr>
    221     </table>
    222 
    223   </fieldset>
    224 </form>
  • trunk/picture.php

    r13074 r13077  
    752752
    753753  $url_admin =
    754     get_root_url().'admin.php?page=picture_modify'
    755     .'&amp;cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
    756     .'&amp;image_id='.$page['image_id'];
     754    get_root_url().'admin.php?page=photo-'.$page['image_id']
     755    .(isset($page['category']) ? '&amp;cat_id='.$page['category']['id'] : '')
     756    ;
    757757
    758758  $template->assign(
Note: See TracChangeset for help on using the changeset viewer.