Changeset 25629 for extensions/AdminTools
- Timestamp:
- Nov 21, 2013, 9:13:41 PM (10 years ago)
- Location:
- extensions/AdminTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdminTools/include/events.inc.php
r25619 r25629 11 11 } 12 12 13 global $template, $page ;13 global $template, $page, $user; 14 14 15 15 $url_root = get_root_url(); … … 20 20 'U_SELF' => $MultiView->get_clean_url(true), 21 21 'USER' => $MultiView->get_user(), 22 'CURRENT_USERNAME' => $user['id']==$conf['guest_id'] ? l10n('guest') : $user['username'], 22 23 ); 23 24 … … 37 38 )); 38 39 40 $query = 'SELECT element_id FROM ' . CADDIE_TABLE . ' 41 WHERE element_id = ' . $page['image_id'] .';'; 42 $tpl_vars['IS_IN_CADDIE'] = pwg_db_num_rows(pwg_query($query)) > 0; 43 39 44 if (isset($page['category'])) 40 45 { 46 $tpl_vars['CATEGORY_ID'] = $page['category']['id']; 47 41 48 $tpl_vars['U_SET_REPRESENTATIVE'] = add_url_params( 42 49 $url_self, 43 50 array('action'=>'set_as_representative') 44 51 ); 45 $tpl_vars['CATEGORY_ID'] = $page['category']['id']; 52 53 $query = 'SELECT id FROM ' . CATEGORIES_TABLE.' 54 WHERE id = ' . $page['category']['id'] .' 55 AND representative_picture_id = ' . $page['image_id'] .';'; 56 $tpl_vars['IS_REPRESENTATIVE'] = pwg_db_num_rows(pwg_query($query)) > 0; 46 57 } 47 58 -
extensions/AdminTools/template/public_controller.tpl
r25619 r25629 2 2 {combine_css path='admin/themes/default/fontello/css/fontello.css'} 3 3 {combine_css path=$ADMINTOOLS_PATH|cat:'template/fontello/css/fontello-ato.css'} 4 5 {capture assign=users_options} {html_options options=$ato.USERS selected=$ato.MULTIVIEW.view_as}{/capture}6 {capture assign=themes_options}{html_options options=$ato.THEMES selected=$ato.MULTIVIEW.theme}{/capture}7 {capture assign=langs_options} {html_options options=$ato.LANGS selected=$ato.MULTIVIEW.lang}{/capture}8 4 9 5 <div id="ato_header_closed"><a href="#" class="icon-tools"></a></div> … … 14 10 <li class="parent"><a href="#" class="icon-menu">{'Admin panel'|translate}</a> 15 11 <ul> 16 <li><a class="icon-picture" href="{$ato.U_SITE_ADMIN} photos_add">{'Photos'|translate}</a></li>12 <li><a class="icon-picture" href="{$ato.U_SITE_ADMIN}batch_manager">{'Photos'|translate}</a></li> 17 13 <li><a class="icon-sitemap" href="{$ato.U_SITE_ADMIN}cat_list">{'Albums'|translate}</a></li> 18 14 <li><a class="icon-users" href="{$ato.U_SITE_ADMIN}user_list">{'Users'|translate}</a></li> … … 31 27 {/if} 32 28 {if isset($ato.U_SET_REPRESENTATIVE)} 33 <li ><a class="icon-ato-trophy set-representative" href="{$ato.U_SET_REPRESENTATIVE}">{'representative'|translate|ucfirst}</a></li>29 <li {if $ato.IS_REPRESENTATIVE}class="disabled"{/if}><a class="icon-ato-trophy set-representative" href="{$ato.U_SET_REPRESENTATIVE}">{'representative'|translate|ucfirst}</a></li> 34 30 {/if} 35 31 {if isset($ato.U_CADDIE)} 36 <li ><a class="icon-ato-flag add-caddie" href="{$ato.U_CADDIE}">{'Add to caddie'|translate}</a></li>32 <li {if $ato.IS_IN_CADDIE}class="disabled"{/if}><a class="icon-ato-flag add-caddie" href="{$ato.U_CADDIE}">{'Add to caddie'|translate}</a></li> 37 33 {/if} 34 {if isset($ato.IS_CATEGORY)} 35 <li><a class="icon-plus-circled" href="{$ato.U_SITE_ADMIN}photos_add&album={$ato.CATEGORY_ID}">{'Add Photos'|translate}</a></li> 36 {/if} 37 38 38 <li class="parent right"><a class="icon-cog-alt" href="#">{'Tools'|translate}</a> 39 39 <ul> 40 40 <li><label>View as</label> 41 41 <select class="switcher" data-type="view_as"> 42 { $users_options}42 {html_options options=$ato.USERS selected=$ato.MULTIVIEW.view_as} 43 43 </select> 44 44 </li> 45 45 <li><label>Theme</label> 46 46 <select class="switcher" data-type="theme"> 47 { $themes_options}47 {html_options options=$ato.THEMES selected=$ato.MULTIVIEW.theme} 48 48 </select> 49 49 </li> 50 50 <li><label>Language</label> 51 51 <select class="switcher" data-type="lang"> 52 { $langs_options}52 {html_options options=$ato.LANGS selected=$ato.MULTIVIEW.lang} 53 53 </select> 54 54 </li> … … 61 61 </ul> 62 62 </li> 63 {if $ato.USER. username != $USERNAME}63 {if $ato.USER.id != $ato.MULTIVIEW.view_as} 64 64 <li class="right"> 65 {'Logged as <b>%s</b>, viewing as <b>%s</b>.'|translate:$ato.USER.username:$ USERNAME}66 <a href="{$ato.U_SELF}view_as={$ato.USER.id}">{' Go back'|translate}</a>65 {'Logged as <b>%s</b>, viewing as <b>%s</b>.'|translate:$ato.USER.username:$ato.CURRENT_USERNAME} 66 <a href="{$ato.U_SELF}view_as={$ato.USER.id}">{'Revert'|translate}</a> 67 67 </li> 68 68 {/if}
Note: See TracChangeset
for help on using the changeset viewer.