Changeset 1827


Ignore:
Timestamp:
Feb 16, 2007, 4:06:41 AM (17 years ago)
Author:
rvelices
Message:
  • adviser mode: added check on admin profile page and removed 2 read-only TAG_INPUT_ENABLED
  • simplified tag code in picture.php
  • reduced size of dark/theme.css by combining selectors with identical content
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/profile.php

    r1753 r1827  
    3333
    3434
    35 save_profile_from_post( $edit_user, $errors);
     35$errors = array();
     36if ( !is_adviser() )
     37{
     38  save_profile_from_post( $edit_user, $errors);
     39}
    3640
    3741load_profile_in_template(
     
    4044  $edit_user
    4145  );
    42 $page['errors'] = array_merge( $page['errors'], $errors);
     46$page['errors'] = array_merge($page['errors'], $errors );
    4347
    4448$template->set_filename('profile', 'admin/profile.tpl');
  • trunk/picture.php

    r1825 r1827  
    749749
    750750// tags
    751 $query = '
    752 SELECT id, name, url_name
    753   FROM '.IMAGE_TAG_TABLE.'
    754     INNER JOIN '.TAGS_TABLE.' ON tag_id = id
    755   WHERE image_id = '.$page['image_id'].'
    756 ;';
    757 $result = pwg_query($query);
    758 
    759 if (mysql_num_rows($result) > 0)
    760 {
    761   $tags = array();
    762   $tag_names = array();
    763 
    764   while ($row = mysql_fetch_array($result))
    765   {
    766     array_push(
    767       $tags,
    768       '<a href="'
     751$tags = get_common_tags( array($page['image_id']), -1);
     752if ( count($tags) )
     753{
     754  $infos['INFO_TAGS'] = '';
     755  foreach ($tags as $num => $tag)
     756  {
     757    $infos['INFO_TAGS'] .= $num ? ' ,' : '';
     758    $infos['INFO_TAGS'] .= '<a href="'
    769759      .make_index_url(
    770760        array(
    771           'tags' => array(
    772             array(
    773               'id' => $row['id'],
    774               'url_name' => $row['url_name'],
    775               ),
    776             )
     761          'tags' => array($tag)
    777762          )
    778763        )
    779       .'">'.$row['name'].'</a>'
    780       );
    781     array_push( $tag_names, $row['name'] );
    782   }
    783 
    784   $infos['INFO_TAGS'] = implode(', ', $tags);
    785   $header_infos['INFO_TAGS'] = implode(', ', $tag_names);
     764      .'">'.$tag['name'].'</a>';
     765  }
     766  $header_infos['INFO_TAGS'] = strip_tags($infos['INFO_TAGS']);
    786767}
    787768else
  • trunk/template/yoga/admin/element_set_global.tpl

    r1780 r1827  
    165165  </ul>
    166166
    167   <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit_caddie" {TAG_INPUT_ENABLED}/></p>
     167  <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit_caddie" /></p>
    168168
    169169</fieldset>
  • trunk/template/yoga/admin/history.tpl

    r1817 r1827  
    8383  </label>
    8484
    85   <input class="submit" type="submit" name="submit" value="{lang:submit}" {TAG_INPUT_ENABLED}/>
     85  <input class="submit" type="submit" name="submit" value="{lang:submit}" />
    8686</fieldset>
    8787</form>
  • trunk/template/yoga/admin/user_list.tpl

    r1780 r1827  
    5959  </label>
    6060
    61   <input class="submit" type="submit" name="submit_filter" value="{lang:submit}" {TAG_INPUT_ENABLED}/>
     61  <input class="submit" type="submit" name="submit_filter" value="{lang:submit}" />
    6262
    6363</fieldset>
  • trunk/template/yoga/theme/dark/theme.css

    r1812 r1827  
    8484}
    8585
    86 #content UL.thumbnails SPAN.wrap2:hover {
     86#content UL.thumbnails SPAN.wrap2:hover,
     87#content UL.thumbnailCategories DIV.thumbnailCategory:hover,
     88#content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
    8789  background-color: AntiqueWhite;
    8890  border-color: yellow;         /* thumbnails border color when mouse cursor is over it */
     
    9092}
    9193
    92 #content UL.thumbnailCategories DIV.thumbnailCategory:hover {
    93   background-color: AntiqueWhite;
    94   border-color: yellow;         /* thumbnails border color when mouse cursor is over it */
    95   color: black;
    96 }
    97 
    98 #content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
    99   background-color: AntiqueWhite;
    100   border-color: yellow;         /* thumbnails border color when mouse cursor is over it */
    101   color: black;
    102 }
    10394
    10495/* links */
     
    111102}
    112103
    113 #imageToolBar A, #imageToolBar A:hover {
    114   border-bottom: none;
    115 }
    116 
     104#imageToolBar A, #imageToolBar A:hover,
    117105A.navThumb, A.navThumb:hover {
    118106  border-bottom: none;
Note: See TracChangeset for help on using the changeset viewer.