Changeset 16988 for branches


Ignore:
Timestamp:
Jul 24, 2012, 10:48:44 PM (12 years ago)
Author:
rvelices
Message:

Merged revision(s) 16986-16987 from trunk: refactor code when selected derivative on index page is changed by a plugin ...
fix ie7 display and unwanted text in print

Location:
branches/2.4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/include/category_default.inc.php

    r13234 r16988  
    152152}
    153153
    154 $derivative_params = trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) );
    155 
    156154$template->assign( array(
    157   'derivative_params' =>$derivative_params,
     155  'derivative_params' => trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ),
    158156  'SHOW_THUMBNAIL_CAPTION' =>$conf['show_thumbnail_caption'],
    159157    ) );
     
    163161$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
    164162unset($pictures, $selection, $tpl_thumbnails_var);
    165 $template->clear_assign( array('thumbnails', 'derivative_params') );
     163$template->clear_assign( 'thumbnails' );
    166164pwg_debug('end include/category_default.inc.php');
    167165?>
  • branches/2.4/index.php

    r16985 r16988  
    274274}
    275275
    276 if ( count($page['items']) > 0 )
    277 {
     276// category comment
     277if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) )
     278{
     279  $template->assign('CONTENT_DESCRIPTION', $page['comment'] );
     280}
     281
     282// include menubar
     283include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
     284
     285if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 )
     286{// count_categories might be computed by menubar - if the case unassign flat link if no sub albums
     287        $template->clear_assign('U_MODE_FLAT');
     288}
     289
     290//------------------------------------------------------ main part : thumbnails
     291if ( 0==$page['start']
     292    and !isset($page['flat'])
     293    and !isset($page['chronology_field'])
     294    and ('recent_cats'==$page['section'] or 'categories'==$page['section'])
     295    and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 )
     296  )
     297{
     298  include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');
     299}
     300if ( !empty($page['items']) )
     301{
     302  include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
    278303  $url = add_url_params(
    279304          duplicate_index_url(),
    280305          array('display' => '')
    281306        );
    282   $selected_type = trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) )->type;
     307  $selected_type = $template->get_template_vars('derivative_params')->type;
     308  $template->clear_assign( 'derivative_params' );
    283309  $type_map = ImageStdParams::get_defined_type_map();
    284310  unset($type_map[IMG_XXLARGE], $type_map[IMG_XLARGE]);
     
    294320      );
    295321  }
    296 }
    297 
    298 // category comment
    299 if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) )
    300 {
    301   $template->assign('CONTENT_DESCRIPTION', $page['comment'] );
    302 }
    303 
    304 // include menubar
    305 include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
    306 
    307 if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 )
    308 {// count_categories might be computed by menubar - if the case unassign flat link if no sub albums
    309         $template->clear_assign('U_MODE_FLAT');
    310 }
    311 
    312 //------------------------------------------------------ main part : thumbnails
    313 if ( 0==$page['start']
    314     and !isset($page['flat'])
    315     and !isset($page['chronology_field'])
    316     and ('recent_cats'==$page['section'] or 'categories'==$page['section'])
    317     and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 )
    318   )
    319 {
    320   include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');
    321 }
    322 if ( !empty($page['items']) )
    323 {
    324   include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
    325322}
    326323//------------------------------------------------------- category informations
  • branches/2.4/themes/default/fix-ie7.css

    r16411 r16988  
    1616.thumbnails .wrap2 IMG {
    1717  position: relative;
    18   top: -50%;   
    19   margin-top: 2%;
     18  top: -50%;
    2019}
    2120
  • branches/2.4/themes/default/print.css

    r8306 r16988  
    11@media print {
    22#menubar, .content .navigationBar, .categoryActions, .content .calendarViews, .calendarBar,
    3 #imageToolBar, .navThumb, #addComment {
     3#imageToolBar, .navThumb, #commentAdd {
    44        display: none;
    55}
Note: See TracChangeset for help on using the changeset viewer.