Changeset 16104 for extensions/SmartAlbums/admin
- Timestamp:
- Jun 27, 2012, 9:19:07 PM (12 years ago)
- Location:
- extensions/SmartAlbums/admin
- Files:
-
- 4 added
- 3 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/admin/cat_list.php
r12863 r16104 11 11 // | initialization | 12 12 // +-----------------------------------------------------------------------+ 13 $base_url = get_root_url() .'admin.php?page=';14 $self_url = SMART_ADMIN .'-albums';13 $base_url = get_root_url() . 'admin.php?page='; 14 $self_url = SMART_ADMIN . '-cat_list'; 15 15 16 16 $categories = array(); 17 17 $query = ' 18 SELECT id, name, permalink, dir, rank, status 18 SELECT 19 id, 20 name, 21 permalink, 22 dir, 23 rank, 24 status 19 25 FROM '.CATEGORIES_TABLE.' AS cat 20 26 INNER JOIN '.CATEGORY_FILTERS_TABLE.' AS cf … … 50 56 { 51 57 $_SESSION['page_infos'] = array(l10n('SmartAlbum added')); 52 $redirect_url = $base_url.'cat_modify&cat_id='.$output_create['id'].'&new_smart';58 $redirect_url = SMART_ADMIN . '-album&cat_id='.$output_create['id'].'&new_smart'; 53 59 redirect($redirect_url); 54 60 } … … 57 63 else if (isset($_GET['smart_generate'])) 58 64 { 59 /* regenerate photo list | all (sub)categories */65 /* regenerate photo list | all categories */ 60 66 if ($_GET['smart_generate'] == 'all') 61 67 { … … 63 69 { 64 70 $associated_images = smart_make_associations($category['id']); 65 array_push( 66 $page['infos'], 67 sprintf( 68 l10n('%d photos associated to album %s'), 71 array_push($page['infos'], 72 sprintf(l10n('%d photos associated to album %s'), 69 73 count($associated_images), 70 '«'.trigger_event( 71 'render_category_name', 72 $category['name'], 73 'admin_cat_list' 74 ).'»' 74 '«'.trigger_event('render_category_name', $category['name'], 'admin_cat_list').'»' 75 75 ) 76 76 ); … … 81 81 { 82 82 $associated_images = smart_make_associations($_GET['smart_generate']); 83 array_push( 84 $page['infos'], 85 sprintf( 86 l10n('%d photos associated to album %s'), 83 array_push($page['infos'], 84 sprintf(l10n('%d photos associated to album %s'), 87 85 count($associated_images), 88 '«'.trigger_event( 89 'render_category_name', 90 $categories[$_GET['smart_generate']]['name'], 91 'admin_cat_list' 92 ).'»' 86 '«'.trigger_event('render_category_name', $categories[ $_GET['smart_generate'] ]['name'], 'admin_cat_list').'»' 93 87 ) 94 88 ); … … 122 116 { 123 117 array_push($page['warnings'], l10n('Only SmartAlbums are displayed on this page')); 124 array_push($page['warnings'], l10n('To order albums please go the main albums management page'));118 array_push($page['warnings'], sprintf(l10n('To order albums please go the main albums <a href="%s">management page</a>'), $base_url.'cat_list')); 125 119 array_push($page['warnings'], '<a href="'.$self_url.'&hide_messages">['.l10n('Don\'t show this message again').']</a>'); 126 120 } … … 147 141 $tpl_cat = 148 142 array( 149 'NAME' => get_cat_display_name_from_id($category['id'], $base_url.' cat_modify&cat_id='),143 'NAME' => get_cat_display_name_from_id($category['id'], $base_url.'album-'), 150 144 'ID' => $category['id'], 151 145 'RANK' => $category['rank']*10, … … 157 151 ), 158 152 159 'U_EDIT' => $base_url.' cat_modify&cat_id='.$category['id'],153 'U_EDIT' => $base_url.'album-'.$category['id'], 160 154 'U_DELETE' => $self_url.'&delete='.$category['id'].'&pwg_token='.get_pwg_token(), 161 155 'U_SMART' => $self_url.'&smart_generate='.$category['id'], … … 167 161 $base_url.'batch_manager&cat='.$category['id']; 168 162 } 169 170 if ('private' == $category['status'])171 {172 $tpl_cat['U_MANAGE_PERMISSIONS'] =173 $base_url.'cat_perm&cat='.$category['id'];174 }175 163 176 164 $template->append('categories', $tpl_cat); 177 165 } 178 166 167 $template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/cat_list.tpl'); 168 179 169 ?> -
extensions/SmartAlbums/admin/config.php
r12863 r16104 15 15 )); 16 16 17 $template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/config.tpl'); 18 17 19 ?> -
extensions/SmartAlbums/admin/index.php
r11392 r16104 1 1 <?php 2 // +-----------------------------------------------------------------------+3 // | Piwigo - a PHP based photo gallery |4 // +-----------------------------------------------------------------------+5 // | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |8 // +-----------------------------------------------------------------------+9 // | This program is free software; you can redistribute it and/or modify |10 // | it under the terms of the GNU General Public License as published by |11 // | the Free Software Foundation |12 // | |13 // | This program is distributed in the hope that it will be useful, but |14 // | WITHOUT ANY WARRANTY; without even the implied warranty of |15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |16 // | General Public License for more details. |17 // | |18 // | You should have received a copy of the GNU General Public License |19 // | along with this program; if not, write to the Free Software |20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |21 // | USA. |22 // +-----------------------------------------------------------------------+23 24 // Recursive call25 2 $url = '../'; 26 3 header( 'Request-URI: '.$url ); -
extensions/SmartAlbums/admin/template/cat_list.tpl
r12863 r16104 1 {footer_script require='jquery.ui.sortable'}{literal} 2 jQuery(document).ready(function(){ 3 jQuery("#addAlbumOpen").click(function(){ 4 jQuery("#createAlbum").toggle(); 5 jQuery("input[name=virtual_name]").focus(); 6 jQuery("#autoOrder").hide(); 7 }); 8 9 jQuery("#addAlbumClose").click(function(){ 10 jQuery("#createAlbum").hide(); 11 }); 12 }); 13 {/literal}{/footer_script} 14 15 {* è *} 16 1 17 <div class="titrePage"> 2 18 <h2>SmartAlbums</h2> 3 19 </div> 4 20 5 <h3> 6 <a href="{$F_ACTION}">{'All SmartAlbums'|@translate}</a> 7 {if count($categories)>9 } 8 <a href="#EoP" class="button" style="border:0;"> 9 <img src="{$themeconf.admin_icon_dir}/page_end.png" title="{'Page end'|@translate}" class="button" alt="page_end" style="margin-bottom:-0.6em;"></a> 10 {/if} 11 </h3> 21 <form id="categoryOrdering" action="{$F_ACTION}" method="post"> 22 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> 12 23 13 <form id="addVirtual" action="{$F_ACTION}" method="post"> 14 <fieldset> 15 <legend>{'Add a SmartAlbum'|@translate}</legend> 16 17 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> 18 {'Album name'|@translate} : <input type="text" name="virtual_name"> 19 {'Parent album'|@translate} : 24 <p class="showCreateAlbum"> 25 <span id="notManualOrder"> 26 <a href="#" id="addAlbumOpen">{'create a new SmartAlbum'|@translate}</a> 27 | <a href="{$F_ACTION}&smart_generate=all">{'Regenerate photos list of all SmartAlbums'|@translate}</a> 28 </span> 29 </p> 30 31 <fieldset id="createAlbum" style="display:none;"> 32 <legend>{'create a new SmartAlbum'|@translate}</legend> 33 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> 34 35 <p> 36 <strong>{'Album name'|@translate}</strong> : 37 <input type="text" name="virtual_name"> 38 </p> 39 <p> 40 <strong>{'Parent album'|@translate}</strong> : 20 41 <select class="categoryDropDown" name="parent_id"> 21 42 <option value="0">------------</option> 22 43 {html_options options=$category_options} 23 44 </select> 24 <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd"> 25 26 </fieldset> 27 </form> 45 </p> 46 <p class="actionButtons"> 47 <input class="submit" type="submit" value="{'Create'|@translate}" name="submitAdd"> 48 <a href="#" id="addAlbumClose">{'Cancel'|@translate}</a> 49 </p> 50 </fieldset> 28 51 29 52 {if count($categories) } 30 <form id="categoryOrdering" action="{$F_ACTION}" method="post">31 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">32 53 33 54 <ul class="categoryUl"> … … 36 57 <li class="categoryLi virtual_cat" id="cat_{$category.ID}"> 37 58 <!-- category {$category.ID} --> 38 <ul class="categoryActions"> 39 {if cat_admin_access($category.ID)} 40 <li><a href="{$category.U_JUMPTO}" title="{'jump to album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to album'|@translate}"></a></li> 41 {/if} 42 <li><a href="{$category.U_EDIT}" title="{'edit album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"></a></li> 43 {if isset($category.U_MANAGE_ELEMENTS) } 44 <li><a href="{$category.U_MANAGE_ELEMENTS}" title="{'manage album photos'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_elements.png" class="button" alt="{'Photos'|@translate}"></a></li> 45 {/if} 46 {if isset($category.U_MANAGE_PERMISSIONS) } 47 <li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit album permissions'|@translate}" ><img src="{$themeconf.admin_icon_dir}/category_permissions.png" class="button" alt="{'Permissions'|@translate}"></a></li> 48 {/if} 49 <li><a href="{$category.U_SMART}" title="{'Regenerate photos list of this SmartAlbum'|@translate}"><img src="{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{'Regenerate photos list of this SmartAlbum'|@translate}"></a></li> 50 {if isset($category.U_DELETE) } 51 <li><a href="{$category.U_DELETE}" title="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete album'|@translate}"></a></li> 52 {/if} 53 </ul> 54 55 <p> 56 <strong>{$category.NAME}</strong> 59 <p class="albumTitle"> 60 <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong> 61 <img src="{$SMART_PATH}admin/template/lightning.png"> 57 62 </p> 58 63 64 <p class="albumActions"> 65 <a href="{$category.U_EDIT}">{'Edit'|@translate}</a> 66 | <a href="{$category.U_SMART}">{'Regenerate photos list of this SmartAlbum'|@translate}</a> 67 {if isset($category.U_MANAGE_ELEMENTS) } 68 | <a href="{$category.U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a> 69 {/if} 70 {if isset($category.U_DELETE) } 71 | <a href="{$category.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete album'|@translate}</a> 72 {/if} 73 {if cat_admin_access($category.ID)} 74 | <a href="{$category.U_JUMPTO}">{'jump to album'|@translate} ?</a> 75 {/if} 76 </p> 59 77 </li> 60 78 {/foreach} 61 79 </ul> 80 {/if} 62 81 </form> 63 {/if}64 65 <form method="post" action="{$F_ACTION}&smart_generate=all">66 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">67 <p><input class="submit" type="submit" value="{'Regenerate photos list of all SmartAlbums'|@translate}"></p>68 </form>69 70 <a name="EoP"></a> -
extensions/SmartAlbums/admin/template/config.tpl
r11451 r16104 11 11 <span class="property">{'Update albums on file upload'|@translate}</span> 12 12 <input type="checkbox" name="update_on_upload" value="true" {if $update_on_upload}checked="checked"{/if}/> 13 {'(can cause slowdowns on admin pages)'|@translate}13 {'(can cause slowdowns)'|@translate} 14 14 </label> 15 15 </li> -
extensions/SmartAlbums/admin/template/index.php
r11392 r16104 1 1 <?php 2 // +-----------------------------------------------------------------------+3 // | Piwigo - a PHP based photo gallery |4 // +-----------------------------------------------------------------------+5 // | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |8 // +-----------------------------------------------------------------------+9 // | This program is free software; you can redistribute it and/or modify |10 // | it under the terms of the GNU General Public License as published by |11 // | the Free Software Foundation |12 // | |13 // | This program is distributed in the hope that it will be useful, but |14 // | WITHOUT ANY WARRANTY; without even the implied warranty of |15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |16 // | General Public License for more details. |17 // | |18 // | You should have received a copy of the GNU General Public License |19 // | along with this program; if not, write to the Free Software |20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |21 // | USA. |22 // +-----------------------------------------------------------------------+23 24 // Recursive call25 2 $url = '../'; 26 3 header( 'Request-URI: '.$url );
Note: See TracChangeset
for help on using the changeset viewer.