aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-03-05 01:50:08 +0000
committerrvelices <rv-github@modusoptimus.com>2008-03-05 01:50:08 +0000
commit152d07d752a6da15518d22deed573e1d26b8193c (patch)
treea8d2b4c75c4eade36a08112d984240e36ab0525a
parent925f581f2864cbb35cdb8b344d0d29f2659707d4 (diff)
- admin comments, configuration, element_set_global, element_set_unit, thumbnail and double_select migration to smarty
- fix in redirect.tpl git-svn-id: http://piwigo.org/svn/trunk@2249 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/comments.php16
-rw-r--r--admin/configuration.php54
-rw-r--r--admin/element_set_global.php143
-rw-r--r--admin/element_set_unit.php37
-rw-r--r--admin/notification_by_mail.php38
-rw-r--r--template/yoga/admin/comments.tpl38
-rw-r--r--template/yoga/admin/configuration.tpl118
-rw-r--r--template/yoga/admin/double_select.tpl18
-rw-r--r--template/yoga/admin/element_set_global.tpl170
-rw-r--r--template/yoga/admin/element_set_unit.tpl91
-rw-r--r--template/yoga/admin/thumbnail.tpl131
-rw-r--r--template/yoga/redirect.tpl2
12 files changed, 395 insertions, 461 deletions
diff --git a/admin/comments.php b/admin/comments.php
index bae32dcb3..a7351ff04 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -124,9 +124,9 @@ $template->set_filenames(array('comments'=>'admin/comments.tpl'));
// TabSheet initialization
waiting_tabsheet();
-$template->assign_vars(
+$template->assign(
array(
- 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=comments'
+ 'F_ACTION' => get_root_url().'admin.php?page=comments'
)
);
@@ -154,8 +154,8 @@ while ($row = mysql_fetch_assoc($result))
'tn_ext'=>@$row['tn_ext']
)
);
- $template->assign_block_vars(
- 'comment',
+ $template->append(
+ 'comments',
array(
'U_PICTURE' =>
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
@@ -171,11 +171,7 @@ while ($row = mysql_fetch_assoc($result))
array_push($list, $row['id']);
}
-$template->assign_vars(
- array(
- 'LIST' => implode(',', $list)
- )
- );
+$template->assign('LIST', implode(',', $list) );
// +-----------------------------------------------------------------------+
// | sending html code |
diff --git a/admin/configuration.php b/admin/configuration.php
index 1f96265ec..9f741ad89 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -49,6 +49,7 @@ else
}
$main_checkboxes = array(
+ 'gallery_locked',
'allow_user_registration',
'obligatory_user_mail_address',
'rate',
@@ -169,37 +170,23 @@ $tabsheet->select($page['section']);
// Assign tabsheet to template
$tabsheet->assign();
-$action = PHPWG_ROOT_PATH.'admin.php?page=configuration';
+$action = get_root_url().'admin.php?page=configuration';
$action.= '&amp;section='.$page['section'];
$template->assign_vars(
array(
- 'L_YES'=>l10n('yes'),
- 'L_NO'=>l10n('no'),
- 'L_SUBMIT'=>l10n('submit'),
- 'L_RESET'=>l10n('reset'),
-
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=configuration',
+ 'U_HELP' => get_root_url().'popuphelp.php?page=configuration',
'F_ACTION'=>$action
));
-$html_check='checked="checked"';
-
-$include_submit_buttons = true;
-
switch ($page['section'])
{
case 'main' :
{
- $lock_yes = ($conf['gallery_locked']==true)?'checked="checked"':'';
- $lock_no = ($conf['gallery_locked']==false)?'checked="checked"':'';
-
- $template->assign_block_vars(
+ $template->assign(
'main',
array(
- 'GALLERY_LOCKED_YES'=>$lock_yes,
- 'GALLERY_LOCKED_NO'=>$lock_no,
'CONF_GALLERY_TITLE' => htmlspecialchars($conf['gallery_title']),
'CONF_PAGE_BANNER' => htmlspecialchars($conf['page_banner']),
'CONF_GALLERY_URL' => $conf['gallery_url'],
@@ -207,11 +194,12 @@ switch ($page['section'])
foreach( $main_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'main',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
@@ -219,22 +207,21 @@ switch ($page['section'])
case 'history' :
{
//Necessary for merge_block_vars
- $template->assign_block_vars('history', array());
-
foreach( $history_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'history',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
}
case 'comments' :
{
- $template->assign_block_vars(
+ $template->assign(
'comments',
array(
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
@@ -242,11 +229,12 @@ switch ($page['section'])
foreach( $comments_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'comments',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
@@ -273,17 +261,11 @@ switch ($page['section'])
'',
$edit_user
);
- $template->assign_block_vars('default', array());
- $include_submit_buttons = false;
+ $template->assign('default', array());
break;
}
}
-if ($include_submit_buttons)
-{
- $template->assign_block_vars('include_submit_buttons', array());
-}
-
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'config');
?>
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index a6d3eb282..7cc724b57 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -205,16 +205,14 @@ SELECT id
$template->set_filenames(
array('element_set_global' => 'admin/element_set_global.tpl'));
-$base_url = PHPWG_ROOT_PATH.'admin.php';
+$base_url = get_root_url().'admin.php';
// $form_action = $base_url.'?page=element_set_global';
-$template->assign_vars(
+$template->assign(
array(
'CATEGORIES_NAV'=>$page['title'],
- 'L_SUBMIT'=>l10n('submit'),
-
'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
'U_UNIT_MODE'
@@ -231,47 +229,22 @@ $template->assign_vars(
// | caddie options |
// +-----------------------------------------------------------------------+
-if ('caddie' == $_GET['cat'])
-{
- $template->assign_block_vars('in_caddie', array());
-}
-else
-{
- $template->assign_block_vars('not_in_caddie', array());
-}
+$template->assign('IN_CADDIE', 'caddie' == $_GET['cat'] ? true : false );
// +-----------------------------------------------------------------------+
// | global mode form |
// +-----------------------------------------------------------------------+
// Virtualy associate a picture to a category
-$blockname = 'associate_option';
-
-$template->assign_block_vars(
- $blockname,
- array('SELECTED' => '',
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- ));
-
$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
;';
-display_select_cat_wrapper($query, array(), $blockname, true);
+display_select_cat_wrapper($query, array(), 'associate_options', true);
// Dissociate from a category : categories listed for dissociation can
// only represent virtual links. Links to physical categories can't be
// broken
-$blockname = 'dissociate_option';
-
-$template->assign_block_vars(
- $blockname,
- array('SELECTED' => '',
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- ));
-
if (count($page['cat_elements_id']) > 0)
{
$query = '
@@ -284,81 +257,68 @@ SELECT DISTINCT(category_id) AS id, c.name, uppercats, global_rank
AND ic.image_id = i.id
AND ic.category_id != i.storage_category_id
;';
- display_select_cat_wrapper($query, array(), $blockname, true);
+ display_select_cat_wrapper($query, array(), 'dissociate_options', true);
}
$all_tags = get_all_tags();
-if (count($all_tags) == 0)
-{
- $add_tag_selection =
- '<p>'.
- l10n('No tag defined. Use Administration>Pictures>Tags').
- '</p>';
-}
-else
-{
- $add_tag_selection = get_html_tag_selection(
- $all_tags,
- 'add_tags'
+if (count($all_tags) > 0)
+{// add tags
+ $template->assign(
+ array(
+ 'ADD_TAG_SELECTION' => get_html_tag_selection(
+ $all_tags,
+ 'add_tags'
+ ),
+ )
);
}
-// add tags
-$template->assign_vars(
- array(
- 'ADD_TAG_SELECTION' => $add_tag_selection,
- )
- );
-
if (count($page['cat_elements_id']) > 0)
{
// remove tags
$tags = get_common_tags($page['cat_elements_id'], -1);
usort($tags, 'name_compare');
- $template->assign_vars(
+ $template->assign(
array(
'DEL_TAG_SELECTION' => get_html_tag_selection($tags, 'del_tags'),
)
);
}
+
// creation date
$day =
empty($_POST['date_creation_day']) ? date('j') : $_POST['date_creation_day'];
-get_day_list('date_creation_day', $day);
-if (!empty($_POST['date_creation_month']))
-{
- $month = $_POST['date_creation_month'];
-}
-else
-{
- $month = date('n');
-}
-get_month_list('date_creation_month', $month);
+$month =
+empty($_POST['date_creation_month']) ? date('n') : $_POST['date_creation_month'];
-if (!empty($_POST['date_creation_year']))
-{
- $year = $_POST['date_creation_year'];
-}
-else
-{
- $year = date('Y');
-}
-$template->assign_vars(array('DATE_CREATION_YEAR_VALUE'=>$year));
+$year =
+empty($_POST['date_creation_year']) ? date('Y') : $_POST['date_creation_year'];
+
+$month_list = $lang['month'];
+$month_list[0]='------------';
+ksort($month_list);
+$template->assign( array(
+ 'month_list' => $month_list,
+ 'DATE_CREATION_DAY' => (int)$day,
+ 'DATE_CREATION_MONTH'=> (int)$month,
+ 'DATE_CREATION_YEAR' => (int)$year,
+ )
+ );
// image level options
-$blockname = 'level_option';
+$tpl_options = array();
foreach ($conf['available_permission_levels'] as $level)
{
- $template->assign_block_vars(
- $blockname,
- array(
- 'VALUE' => $level,
- 'CONTENT' => l10n( sprintf('Level %d', $level) ),
- ));
+ $tpl_options[$level] = l10n( sprintf('Level %d', $level) );
}
+$template->assign(
+ array(
+ 'level_options'=> $tpl_options,
+ )
+ );
// +-----------------------------------------------------------------------+
// | global mode thumbnails |
@@ -389,7 +349,7 @@ if (count($page['cat_elements_id']) > 0)
$page['start'],
$page['nb_images']
);
- $template->assign_vars(array('NAV_BAR' => $nav_bar));
+ $template->assign('NAV_BAR', $nav_bar);
$query = '
SELECT id,path,tn_ext,file,filesize,level
@@ -402,34 +362,21 @@ SELECT id,path,tn_ext,file,filesize,level
$result = pwg_query($query);
// template thumbnail initialization
- if (mysql_num_rows($result) > 0)
- {
- $template->assign_block_vars('thumbnails', array());
- }
while ($row = mysql_fetch_assoc($result))
{
$src = get_thumbnail_url($row);
- $template->assign_block_vars(
- 'thumbnails.thumbnail',
+ $template->append(
+ 'thumbnails',
array(
'ID' => $row['id'],
- 'SRC' => $src,
- 'ALT' => $row['file'],
- 'TITLE' => get_thumbnail_title($row)
+ 'TN_SRC' => $src,
+ 'FILE' => $row['file'],
+ 'TITLE' => get_thumbnail_title($row),
+ 'LEVEL' => $row['level']
)
);
-
- if ( $row['level']>0 )
- {
- $template->assign_block_vars('thumbnails.thumbnail.level',
- array(
- 'LEVEL' => $row['level'],
- 'TITLE' => l10n( sprintf('Level %d', $row['level']) ),
- )
- );
- }
}
}
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index cefd8ee4c..a9541f576 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -49,7 +48,7 @@ check_status(ACCESS_ADMINISTRATOR);
if (isset($_POST['submit']))
{
- $collection = explode(',', $_POST['list']);
+ $collection = explode(',', $_POST['element_ids']);
$datas = array();
@@ -134,14 +133,14 @@ $template->set_filenames(
$base_url = PHPWG_ROOT_PATH.'admin.php';
-// $form_action = $base_url.'?page=element_set_global';
+$month_list = $lang['month'];
+$month_list[0]='------------';
+ksort($month_list);
-$template->assign_vars(
+$template->assign(
array(
'CATEGORIES_NAV'=>$page['title'],
- 'L_SUBMIT'=>l10n('submit'),
-
'U_ELEMENTS_PAGE'
=>$base_url.get_query_string_diff(array('display','start')),
@@ -152,6 +151,8 @@ $template->assign_vars(
.'&amp;mode=global',
'F_ACTION'=>$base_url.get_query_string_diff(array()),
+
+ 'month_list' => $month_list
)
);
@@ -186,7 +187,7 @@ if (count($page['cat_elements_id']) > 0)
$page['start'],
$page['nb_images']
);
- $template->assign_vars(array('NAV_BAR' => $nav_bar));
+ $template->assign(array('NAV_BAR' => $nav_bar));
// tags
$all_tags = get_all_tags();
@@ -223,7 +224,7 @@ SELECT tag_id
}
else
{
- list($year,$month,$day) = array('','','');
+ list($year,$month,$day) = array('',0,0);
}
if (count($all_tags) > 0)
@@ -242,32 +243,30 @@ SELECT tag_id
'</p>';
}
- $template->assign_block_vars(
- 'element',
+ $template->append(
+ 'elements',
array(
+ 'ID' => $row['id'],
+ 'TN_SRC' => $src,
'LEGEND' =>
!empty($row['name']) ?
$row['name'] : get_name_from_file($row['file']),
'U_EDIT' =>
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
'&amp;image_id='.$row['id'],
- 'ID' => $row['id'],
- 'FILENAME' => $row['path'],
- 'TN_SRC' => $src,
'NAME' => @$row['name'],
'AUTHOR' => @$row['author'],
'DESCRIPTION' => @$row['comment'],
'DATE_CREATION_YEAR' => $year,
+ 'DATE_CREATION_MONTH' => (int)$month,
+ 'DATE_CREATION_DAY' => (int)$day,
'TAG_SELECTION' => $tag_selection,
)
);
-
- get_day_list('element.date_creation_day', $day);
- get_month_list('element.date_creation_month', $month);
}
- $template->assign_vars(array('IDS_LIST' => implode(',', $element_ids)));
+ $template->assign('ELEMENT_IDS', implode(',', $element_ids));
}
// +-----------------------------------------------------------------------+
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php
index 38fd8cfb6..913d65283 100644
--- a/admin/notification_by_mail.php
+++ b/admin/notification_by_mail.php
@@ -689,19 +689,37 @@ switch ($page['mode'])
);
$data_users = get_user_notifications('subscribe');
+
+ $opt_true=array();
+ $opt_true_selected=array();
+ $opt_false=array();
+ $opt_false_selected=array();
foreach ($data_users as $nbm_user)
{
- $template->assign_block_vars(
- (get_boolean($nbm_user['enabled']) ? 'category_option_true' : 'category_option_false'),
- array('SELECTED' => ( // Keep selected user where enabled are not changed when change has been notify
- get_boolean($nbm_user['enabled']) ? (isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true']))
- : (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
- ) ? 'selected="selected"' : '',
- 'VALUE' => $nbm_user['check_key'],
- 'OPTION' => $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']'
- ));
+ if ( get_boolean($nbm_user['enabled']) )
+ {
+ $opt_true[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
+ if ((isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true'])) )
+ {
+ $opt_true_selected[] = $nbm_user['check_key'];
+ }
+ }
+ else
+ {
+ $opt_false[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
+ if (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
+ {
+ $opt_false_selected[] = $nbm_user['check_key'];
+ }
+ }
}
-
+ $template->assign( array(
+ 'category_option_true' => $opt_true,
+ 'category_option_true_selected' => $opt_true_selected,
+ 'category_option_false' => $opt_false,
+ 'category_option_true' => $opt_false_selected,
+ )
+ );
break;
}
diff --git a/template/yoga/admin/comments.tpl b/template/yoga/admin/comments.tpl
index 4a4b5fef4..84b1677c6 100644
--- a/template/yoga/admin/comments.tpl
+++ b/template/yoga/admin/comments.tpl
@@ -1,31 +1,33 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
- <h2>{lang:waiting} {TABSHEET_TITLE}</h2>
- {TABSHEET}
+ <h2>{'waiting'|@translate} {$TABSHEET_TITLE}</h2>
+ {$TABSHEET}
</div>
-<h3>{lang:User comments validation}</h3>
+<h3>{'User comments validation'|@translate}</h3>
-<form method="post" action="{F_ACTION}">
- <!-- BEGIN comment -->
+{if !empty($comments) }
+<form method="post" action="{$F_ACTION}">
+
+ {foreach from=$comments item=comment}
<div class="comment">
- <a class="illustration" href="{comment.U_PICTURE}"><img src="{comment.TN_SRC}" /></a>
- <p class="commentHeader"><strong>{comment.AUTHOR}</strong> - <em>{comment.DATE}</em></p>
- <blockquote>{comment.CONTENT}</blockquote>
+ <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}" /></a>
+ <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
+ <blockquote>{$comment.CONTENT}</blockquote>
<ul class="actions">
- <li><label><input type="radio" name="action-{comment.ID}" value="reject" />{lang:Reject}</label></li>
- <li><label><input type="radio" name="action-{comment.ID}" value="validate" />{lang:Validate}</label></li>
+ <li><label><input type="radio" name="action-{$comment.ID}" value="reject" />{'Reject'|@translate}</label></li>
+ <li><label><input type="radio" name="action-{$comment.ID}" value="validate" />{'Validate'|@translate}</label></li>
</ul>
</div>
- <!-- END comment -->
+ {/foreach}
<p class="bottomButtons">
- <input type="hidden" name="list" value="{LIST}" />
- <input class="submit" type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="validate-all" value="{lang:Validate All}" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="reject-all" value="{lang:Reject All}" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" />
+ <input type="hidden" name="list" value="{$LIST}" />
+ <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" />
</p>
</form>
+{/if} \ No newline at end of file
diff --git a/template/yoga/admin/configuration.tpl b/template/yoga/admin/configuration.tpl
index 2b1e0a5a3..cccb879af 100644
--- a/template/yoga/admin/configuration.tpl
+++ b/template/yoga/admin/configuration.tpl
@@ -1,163 +1,165 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:title_configuration} {TABSHEET_TITLE}</h2>
- {TABSHEET}
+ <h2>{'title_configuration'|@translate} {$TABSHEET_TITLE}</h2>
+ {$TABSHEET}
</div>
-<form method="post" action="{F_ACTION}" class="properties">
+<form method="post" action="{$F_ACTION}" class="properties">
-<!-- BEGIN main -->
+{if isset($main)}
<fieldset id="mainConf">
<ul>
<li>
<span class="property">
- <label for="gallery_title">{lang:Gallery title}</label>
+ <label for="gallery_title">{'Gallery title'|@translate}</label>
</span>
- <input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{main.CONF_GALLERY_TITLE}" />
+ <input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}" />
</li>
<li>
<span class="property">
- <label for="page_banner">{lang:Page banner}</label>
+ <label for="page_banner">{'Page banner'|@translate}</label>
</span>
- <textarea class="description" name="page_banner" id="page_banner">{main.CONF_PAGE_BANNER}</textarea>
+ <textarea class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
</li>
<li>
<span class="property">
- <label for="gallery_url">{lang:Gallery URL}</label>
+ <label for="gallery_url">{'Gallery URL'|@translate}</label>
</span>
- <input type="text" maxlength="255" size="50" name="gallery_url" id="gallery_url" value="{main.CONF_GALLERY_URL}" />
- </li>
-
- <li>
- <span class="property">{lang:Lock gallery}</span>
- <label><input type="radio" class="radio" name="gallery_locked" value="true" {main.GALLERY_LOCKED_YES} />{lang:Yes}</label>
- <label><input type="radio" class="radio" name="gallery_locked" value="false" {main.GALLERY_LOCKED_NO} />{lang:No}</label>
+ <input type="text" maxlength="255" size="50" name="gallery_url" id="gallery_url" value="{$main.CONF_GALLERY_URL}" />
</li>
</ul>
</fieldset>
<fieldset id="mainConfCheck">
<ul>
+
+ <li>
+ <label>
+ <span class="property">{'Lock gallery'|@translate}</span>
+ <input type="checkbox" name="gallery_locked" {if ($main.gallery_locked)}checked="checked"{/if} />
+ </label>
+ </li>
+
<li>
<label>
- <span class="property">{lang:Rating}</span>
- <input type="checkbox" name="rate" {main.RATE} />
+ <span class="property">{'Rating'|@translate}</span>
+ <input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if} />
</label>
</li>
<li>
<label>
- <span class="property">{lang:Rating by guests}</span>
- <input type="checkbox" name="rate_anonymous" {main.RATE_ANONYMOUS} />
+ <span class="property">{'Rating by guests'|@translate}</span>
+ <input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if} />
</label>
</li>
<li>
- <label for="allow_user_registration">
- <span class="property">{lang:Allow user registration}</span>
- <input type="checkbox" name="allow_user_registration" id="allow_user_registration" {main.ALLOW_USER_REGISTRATION} />
+ <label>
+ <span class="property">{'Allow user registration'|@translate}</span>
+ <input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if} />
</label>
</li>
<li>
- <label for="obligatory_user_mail_address">
- <span class="property">{lang:obligatory_user_mail_address}</span>
- <input type="checkbox" name="obligatory_user_mail_address" id="obligatory_user_mail_address" {main.OBLIGATORY_USER_MAIL_ADDRESS} />
+ <label>
+ <span class="property">{'obligatory_user_mail_address'|@translate}</span>
+ <input type="checkbox" name="obligatory_user_mail_address" {if ($main.obligatory_user_mail_address)}checked="checked"{/if} />
</label>
</li>
<li>
<label>
- <span class="property">{lang:Email administrators when a new user registers}</span>
- <input type="checkbox" name="email_admin_on_new_user" {main.EMAIL_ADMIN_ON_NEW_USER} />
+ <span class="property">{'Email administrators when a new user registers'|@translate}</span>
+ <input type="checkbox" name="email_admin_on_new_user" {if ($main.email_admin_on_new_user)}checked="checked"{/if} />
</label>
</li>
<li>
<label>
- <span class="property">{lang:Email administrators when a picture is uploaded}</span>
- <input type="checkbox" name="email_admin_on_picture_uploaded" {main.EMAIL_ADMIN_ON_PICTURE_UPLOADED} />
+ <span class="property">{'Email administrators when a picture is uploaded'|@translate}</span>
+ <input type="checkbox" name="email_admin_on_picture_uploaded" {if ($main.email_admin_on_picture_uploaded)}checked="checked"{/if} />
</label>
</li>
</ul>
</fieldset>
-<!-- END main -->
+{/if}
-<!-- BEGIN history -->
+{if isset($history)}
<fieldset id="historyConf">
<ul>
<li>
- <label><span class="property">{lang:conf_history_guest}</span><input type="checkbox" name="history_guest" {history.HISTORY_GUEST} /></label>
+ <label><span class="property">{'conf_history_guest'|@translate}</span><input type="checkbox" name="history_guest" {if ($history.history_guest)}checked="checked"{/if} /></label>
</li>
<li>
- <label><span class="property">{lang:conf_history_user}</span><input type="checkbox" name="log" {history.LOG} /></label>
+ <label><span class="property">{'conf_history_user'|@translate}</span><input type="checkbox" name="log" {if ($history.log)}checked="checked"{/if} /></label>
</li>
<li>
- <label><span class="property">{lang:conf_history_admin}</span><input type="checkbox" name="history_admin" {history.HISTORY_ADMIN} /></label>
+ <label><span class="property">{'conf_history_admin'|@translate}</span><input type="checkbox" name="history_admin" {if ($history.history_admin)}checked="checked"{/if} /></label>
</li>
</ul>
</fieldset>
-<!-- END history -->
+{/if}
+
-<!-- BEGIN comments -->
+{if isset($comments)}
<fieldset id="commentsConf">
<ul>
<li>
<label>
- <span class="property">{lang:Comments for all}</span>
- <input type="checkbox" name="comments_forall" {comments.COMMENTS_FORALL} />
+ <span class="property">{'Comments for all'|@translate}</span>
+ <input type="checkbox" name="comments_forall" {if ($comments.comments_forall)}checked="checked"{/if} />
</label>
</li>
<li>
<span class="property">
- <label for="nb_comment_page">{lang:Number of comments per page}</label>
+ <label for="nb_comment_page">{'Number of comments per page'|@translate}</label>
</span>
- <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{comments.NB_COMMENTS_PAGE}" />
+ <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$comments.NB_COMMENTS_PAGE}" />
</li>
<li>
<label>
- <span class="property">{lang:Validation}</span>
- <input type="checkbox" name="comments_validation" {comments.COMMENTS_VALIDATION} />
+ <span class="property">{'Validation'|@translate}</span>
+ <input type="checkbox" name="comments_validation" {if ($comments.comments_validation)}checked="checked"{/if} />
</label>
</li>
<li>
<label>
- <span class="property">{lang:Email administrators when a valid comment is entered}</span>
- <input type="checkbox" name="email_admin_on_comment" {comments.EMAIL_ADMIN_ON_COMMENT} />
+ <span class="property">{'Email administrators when a valid comment is entered'|@translate}</span>
+ <input type="checkbox" name="email_admin_on_comment" {if ($comments.email_admin_on_comment)}checked="checked"{/if} />
</label>
</li>
<li>
<label>
- <span class="property">{lang:Email administrators when a comment requires validation}</span>
- <input type="checkbox" name="email_admin_on_comment_validation" {comments.EMAIL_ADMIN_ON_COMMENT_VALIDATION} />
+ <span class="property">{'Email administrators when a comment requires validation'|@translate}</span>
+ <input type="checkbox" name="email_admin_on_comment_validation" {if ($comments.email_admin_on_comment_validation)}checked="checked"{/if} />
</label>
</li>
</ul>
</fieldset>
-<!-- END comments -->
+{/if}
-<!-- BEGIN default -->
-{PROFILE_CONTENT}
-<!-- END default -->
+{if isset($default)}
+{$PROFILE_CONTENT}
+{/if}
-<!-- BEGIN include_submit_buttons -->
+{if !isset($default)}
<p>
- <input class="submit" type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}>
- <input class="submit" type="reset" name="reset" value="{lang:Reset}">
+ <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
+ <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
</p>
-<!-- END include_submit_buttons -->
+{/if}
</form>
diff --git a/template/yoga/admin/double_select.tpl b/template/yoga/admin/double_select.tpl
index ca789b3df..aeed8500a 100644
--- a/template/yoga/admin/double_select.tpl
+++ b/template/yoga/admin/double_select.tpl
@@ -1,24 +1,20 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<table class="doubleSelect">
<tr>
<td>
- <h3>{L_CAT_OPTIONS_TRUE}</h3>
+ <h3>{$L_CAT_OPTIONS_TRUE}</h3>
<select class="categoryList" name="cat_true[]" multiple="multiple" size="30">
- <!-- BEGIN category_option_true -->
- <option {category_option_true.SELECTED} value="{category_option_true.VALUE}">{category_option_true.OPTION}</option>
- <!-- END category_option_true -->
+ {html_options options=$category_option_true selected=$category_option_true_selected}
</select>
- <p><input class="submit" type="submit" value="&raquo;" name="falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&raquo;" name="falsify" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
<td>
- <h3>{L_CAT_OPTIONS_FALSE}</h3>
+ <h3>{$L_CAT_OPTIONS_FALSE}</h3>
<select class="categoryList" name="cat_false[]" multiple="multiple" size="30">
- <!-- BEGIN category_option_false -->
- <option {category_option_false.SELECTED} value="{category_option_false.VALUE}">{category_option_false.OPTION}</option>
- <!-- END category_option_false -->
+ {html_options options=$category_option_false selected=$category_option_false_selected}
</select>
- <p><input class="submit" type="submit" value="&laquo;" name="trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&laquo;" name="trueify" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
</tr>
</table>
diff --git a/template/yoga/admin/element_set_global.tpl b/template/yoga/admin/element_set_global.tpl
index e50c121dd..7a21c0073 100644
--- a/template/yoga/admin/element_set_global.tpl
+++ b/template/yoga/admin/element_set_global.tpl
@@ -1,152 +1,150 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
-<h2>{lang:Batch management}</h2>
+{* $Id$ *}
-<h3>{CATEGORIES_NAV}</h3>
+<h2>{'Batch management'|@translate}</h2>
+
+<h3>{$CATEGORIES_NAV}</h3>
<p style="text-align:center;">
- {lang:global mode}
- | <a href="{U_UNIT_MODE}">{lang:unit mode}</a>
+ {'global mode'|@translate}
+ | <a href="{$U_UNIT_MODE}">{'unit mode'|@translate}</a>
</p>
<fieldset>
- <legend>{lang:Display options}</legend>
+ <legend>{'Display options'|@translate}</legend>
- <p>{lang:elements per page}:
- <a href="{U_DISPLAY}&amp;display=20">20</a>
- | <a href="{U_DISPLAY}&amp;display=50">50</a>
- | <a href="{U_DISPLAY}&amp;display=100">100</a>
- | <a href="{U_DISPLAY}&amp;display=all">{lang:all}</a>
+ <p>{'elements per page'|@translate}:
+ <a href="{$U_DISPLAY}&amp;display=20">20</a>
+ | <a href="{$U_DISPLAY}&amp;display=50">50</a>
+ | <a href="{$U_DISPLAY}&amp;display=100">100</a>
+ | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
</p>
</fieldset>
-<form action="{F_ACTION}" method="post">
+<form action="{$F_ACTION}" method="post">
<fieldset>
- <legend>{lang:Elements}</legend>
+ <legend>{'Elements'|@translate}</legend>
- <div class="navigationBar">{NAV_BAR}</div>
+ {if !empty($NAV_BAR)}<div class="navigationBar">{$NAV_BAR}</div>{/if}
- <!-- BEGIN thumbnails -->
+{if !empty($thumbnails)}
<ul class="thumbnails">
- <!-- BEGIN thumbnail -->
+ {foreach from=$thumbnails item=thumbnail}
<li><span class="wrap1">
<label>
<span class="wrap2">
- <!-- BEGIN level -->
- <em class="levelIndicatorB">{thumbnails.thumbnail.level.LEVEL}</em><em class="levelIndicatorF" title="{thumbnails.thumbnail.level.TITLE}">{thumbnails.thumbnail.level.LEVEL}</em>
- <!-- END level -->
+ {if $thumbnail.LEVEL > 0}
+ <em class="levelIndicatorB">{$thumbnail.LEVEL}</em>
+ <em class="levelIndicatorF" title="{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}">{$thumbnail.LEVEL}</em>
+ {/if}
<span>
- <img src="{thumbnails.thumbnail.SRC}"
- alt="{thumbnails.thumbnail.ALT}"
- title="{thumbnails.thumbnail.TITLE}"
+ <img src="{$thumbnail.TN_SRC}"
+ alt="{$thumbnail.FILE}"
+ title="{$thumbnail.TITLE}"
class="thumbnail" />
</span></span>
- <input type="checkbox" name="selection[]" value="{thumbnails.thumbnail.ID}" />
+ <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" />
</label>
</span>
</li>
- <!-- END thumbnail -->
+ {/foreach}
</ul>
- <!-- END thumbnails -->
+{/if}
</fieldset>
<fieldset>
- <legend>{lang:Form}</legend>
+ <legend>{'Form'|@translate}</legend>
<table>
<tr>
- <td>{lang:associate to category}</td>
+ <td>{'associate to category'|@translate}</td>
<td>
- <select style="width:400px" name="associate" size="1">
- <!-- BEGIN associate_option -->
- <option {associate_option.SELECTED} value="{associate_option.VALUE}">{associate_option.OPTION}</option>
- <!-- END associate_option -->
+ <select style="width:400px" name="associate" size="1">
+ <option value="0">------------</option>
+ {html_options options=$associate_options }
</select>
</td>
</tr>
<tr>
- <td>{lang:dissociate from category}</td>
+ <td>{'dissociate from category'|@translate}</td>
<td>
<select style="width:400px" name="dissociate" size="1">
- <!-- BEGIN dissociate_option -->
- <option {dissociate_option.SELECTED} value="{dissociate_option.VALUE}">{dissociate_option.OPTION}</option>
- <!-- END dissociate_option -->
+ <option value="0">------------</option>
+ {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if}
</select>
</td>
</tr>
<tr>
- <td>{lang:add tags}</td>
- <td>{ADD_TAG_SELECTION}</td>
+ <td>{'add tags'|@translate}</td>
+ <td>{if !empty($ADD_TAG_SELECTION)}{$ADD_TAG_SELECTION}{else}<p>{'No tag defined. Use Administration>Pictures>Tags'|@translate}</p>{/if}</td>
</tr>
+ {if !empty($DEL_TAG_SELECTION)}
<tr>
- <td>{lang:remove tags}</td>
- <td>{DEL_TAG_SELECTION}</td>
+ <td>{'remove tags'|@translate}</td>
+ <td>{$DEL_TAG_SELECTION}</td>
</tr>
+ {/if}
<tr>
- <td>{lang:Author}</td>
+ <td>{'Author'|@translate}</td>
<td>
- <input type="radio" name="author_action" value="leave" checked="checked" /> {lang:leave}
- <input type="radio" name="author_action" value="unset" /> {lang:unset}
- <input type="radio" name="author_action" value="set" id="author_action_set" /> {lang:set to}
- <input onmousedown="document.getElementById('author_action_set').checked = true;" type="text" name="author" value="" />
+ <label><input type="radio" name="author_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
+ <label><input type="radio" name="author_action" value="unset" /> {'unset'|@translate}</label>
+ <label><input type="radio" name="author_action" value="set" id="author_action_set" /> {'set to'|@translate}</label>
+ <input onchange="document.getElementById('author_action_set').checked = true;" type="text" name="author" value="" />
</td>
</tr>
<tr>
- <td>{lang:title}</td>
+ <td>{'title'|@translate}</td>
<td>
- <input type="radio" name="name_action" value="leave" checked="checked" /> {lang:leave}
- <input type="radio" name="name_action" value="unset" /> {lang:unset}
- <input type="radio" name="name_action" value="set" id="name_action_set" /> {lang:set to}
- <input onmousedown="document.getElementById('name_action_set').checked = true;" type="text" name="name" value="" />
+ <label><input type="radio" name="name_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
+ <label><input type="radio" name="name_action" value="unset" /> {'unset'|@translate}</label>
+ <label><input type="radio" name="name_action" value="set" id="name_action_set" /> {'set to'|@translate}</label>
+ <input onchange="document.getElementById('name_action_set').checked = true;" type="text" name="name" value="" />
</td>
</tr>
<tr>
- <td>{lang:Creation date}</td>
+ <td>{'Creation date'|@translate}</td>
<td>
- <input type="radio" name="date_creation_action" value="leave" checked="checked" /> {lang:leave}
- <input type="radio" name="date_creation_action" value="unset" /> {lang:unset}
- <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {lang:set to}
- <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
- <!-- BEGIN date_creation_day -->
- <option {date_creation_day.SELECTED} value="{date_creation_day.VALUE}">{date_creation_day.OPTION}</option>
- <!-- END date_creation_day -->
+ <label><input type="radio" name="date_creation_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
+ <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label>
+ <label><input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}</label>
+ <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
+ <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select>
- <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
- <!-- BEGIN date_creation_month -->
- <option {date_creation_month.SELECTED} value="{date_creation_month.VALUE}">{date_creation_month.OPTION}</option>
- <!-- END date_creation_month -->
+ <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
+ {html_options options=$month_list selected=$DATE_CREATION_MONTH}
</select>
- <input onmousedown="document.getElementById('date_creation_action_set').checked = true;"
+ <input onchange="document.getElementById('date_creation_action_set').checked = true;"
name="date_creation_year"
type="text"
size="4"
maxlength="4"
- value="{DATE_CREATION_YEAR_VALUE}" />
+ value="{$DATE_CREATION_YEAR}" />
</td>
</tr>
<tr>
- <td>{lang:Minimum privacy level}</td>
+ <td>{'Minimum privacy level'|@translate}</td>
<td>
- <label><input type="radio" name="level_action" value="leave" checked="checked" />{lang:leave}</label>
- <label><input type="radio" name="level_action" value="set" id="level_action_set" />{lang:set to}</label>
- <select onmousedown="document.getElementById('level_action_set').checked = true;" name="level" size="1">
- <!-- BEGIN level_option -->
- <option {level_option.SELECTED} value="{level_option.VALUE}">{level_option.CONTENT} ({level_option.VALUE})</option>
- <!-- END level_option -->
+ <label><input type="radio" name="level_action" value="leave" checked="checked" />{'leave'|@translate}</label>
+ <label><input type="radio" name="level_action" value="set" id="level_action_set" />{'set to'|@translate}</label>
+ <select onchange="document.getElementById('level_action_set').checked = true;" name="level" size="1">
+ {html_options options=$level_options}
</select>
</td>
</tr>
@@ -154,35 +152,33 @@
</table>
<p>
- {lang:target}
- <label><input type="radio" name="target" value="all" /> {lang:all}</label>
- <label><input type="radio" name="target" value="selection" checked="checked" /> {lang:selection}</label>
+ {'target'|@translate}
+ <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
+ <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
</p>
- <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/></p>
</fieldset>
<fieldset>
- <legend>{lang:Caddie management}</legend>
+ <legend>{'Caddie management'|@translate}</legend>
<ul style="list-style-type:none;">
- <!-- BEGIN in_caddie -->
- <li><label><input type="radio" name="caddie_action" value="empty_all" /> {lang:Empty caddie}</label></li>
- <li><label><input type="radio" name="caddie_action" value="empty_selected" /> {lang:Take selected elements out of caddie}</label></li>
- <!-- END in_caddie -->
-
- <!-- BEGIN not_in_caddie -->
- <li><label><input type="radio" name="caddie_action" value="add_selected" /> {lang:Add selected elements to caddie}</label></li>
- <!-- END not_in_caddie -->
-
- <li><label><input type="radio" name="caddie_action" value="export" /> {lang:Export data}</label></li>
+ {if ($IN_CADDIE)}
+ <li><label><input type="radio" name="caddie_action" value="empty_all" /> {'Empty caddie'|@translate}</label></li>
+ <li><label><input type="radio" name="caddie_action" value="empty_selected" /> {'Take selected elements out of caddie'|@translate}</label></li>
+ {else}
+ <li><label><input type="radio" name="caddie_action" value="add_selected" /> {'Add selected elements to caddie'|@translate}</label></li>
+ {/if}
+
+ <li><label><input type="radio" name="caddie_action" value="export" /> {'Export data'|@translate}</label></li>
</ul>
- <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit_caddie" /></p>
+ <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit_caddie" /></p>
</fieldset>
diff --git a/template/yoga/admin/element_set_unit.tpl b/template/yoga/admin/element_set_unit.tpl
index 921acc9fa..11fb54470 100644
--- a/template/yoga/admin/element_set_unit.tpl
+++ b/template/yoga/admin/element_set_unit.tpl
@@ -1,90 +1,93 @@
-<!-- DEV TAG: not smarty migrated -->
-<h2>{lang:Batch management}</h2>
+{* $Id$ *}
-<h3>{CATEGORIES_NAV}</h3>
+<h2>{'Batch management'|@translate}</h2>
+
+<h3>{$CATEGORIES_NAV}</h3>
<p style="text-align:center;">
- <a href="{U_GLOBAL_MODE}">{lang:global mode}</a>
- | {lang:unit mode}
+ <a href="{$U_GLOBAL_MODE}">{'global mode'|@translate}</a>
+ | {'unit mode'|@translate}
</p>
-<form action="{F_ACTION}" method="POST">
+<form action="{$F_ACTION}" method="POST">
<fieldset>
-
- <legend>{lang:Display options}</legend>
- <input type="hidden" name="list" value="{IDS_LIST}" />
- <p>{lang:elements per page} :
- <a href="{U_ELEMENTS_PAGE}&amp;display=5">5</a>
- | <a href="{U_ELEMENTS_PAGE}&amp;display=10">10</a>
- | <a href="{U_ELEMENTS_PAGE}&amp;display=50">50</a>
- | <a href="{U_ELEMENTS_PAGE}&amp;display=all">{lang:all}</a>
+ <legend>{'Display options'|@translate}</legend>
+ <p>{'elements per page'|@translate} :
+ <a href="{$U_ELEMENTS_PAGE}&amp;display=5">5</a>
+ | <a href="{$U_ELEMENTS_PAGE}&amp;display=10">10</a>
+ | <a href="{$U_ELEMENTS_PAGE}&amp;display=50">50</a>
+ | <a href="{$U_ELEMENTS_PAGE}&amp;display=all">{'all'|@translate}</a>
</p>
</fieldset>
-<div class="navigationBar">{NAV_BAR}</div>
+{if !empty($NAV_BAR) }
+<div class="navigationBar">{$NAV_BAR}</div>
+{/if}
-<!-- BEGIN element -->
+{if !empty($elements) }
+<input type="hidden" name="element_ids" value="{$ELEMENT_IDS}" />
+{foreach from=$elements item=element}
<fieldset class="elementEdit">
- <legend>{element.LEGEND}</legend>
+ <legend>{$element.LEGEND}</legend>
- <a href="{element.U_EDIT}"><img src="{element.TN_SRC}" alt="" class="miniature" title="{lang:Edit all picture informations}" /></a>
+ <a href="{$element.U_EDIT}"><img src="{$element.TN_SRC}" alt="" title="{'Edit all picture informations'|@translate}" /></a>
<table>
<tr>
- <td><strong>{lang:Name}</strong></td>
- <td><input type="text" name="name-{element.ID}" value="{element.NAME}" /></td>
+ <td><strong>{'Name'|@translate}</strong></td>
+ <td><input type="text" name="name-{$element.ID}" value="{$element.NAME}" /></td>
</tr>
<tr>
- <td><strong>{lang:Author}</strong></td>
- <td><input type="text" name="author-{element.ID}" value="{element.AUTHOR}" /></td>
+ <td><strong>{'Author'|@translate}</strong></td>
+ <td><input type="text" name="author-{$element.ID}" value="{$element.AUTHOR}" /></td>
</tr>
<tr>
- <td><strong>{lang:Creation date}</strong></td>
+ <td><strong>{'Creation date'|@translate}</strong></td>
<td>
- <label><input type="radio" name="date_creation_action-{element.ID}" value="unset" /> {lang:unset}</label>
- <input type="radio" name="date_creation_action-{element.ID}" value="set" id="date_creation_action_set-{element.ID}" /> {lang:set to}
- <select onmousedown="document.getElementById('date_creation_action_set-{element.ID}').checked = true;" name="date_creation_day-{element.ID}">
- <!-- BEGIN date_creation_day -->
- <option {element.date_creation_day.SELECTED} value="{element.date_creation_day.VALUE}">{element.date_creation_day.OPTION}</option>
- <!-- END date_creation_day -->
+ <label><input type="radio" name="date_creation_action-{$element.ID}" value="unset" /> {'unset'|@translate}</label>
+ <label><input type="radio" name="date_creation_action-{$element.ID}" value="set" id="date_creation_action_set-{$element.ID}" /> {'set to'|@translate}</label>
+
+ <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_day-{$element.ID}">
+ <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$element.DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select>
- <select onmousedown="document.getElementById('date_creation_action_set-{element.ID}').checked = true;" name="date_creation_month-{element.ID}">
- <!-- BEGIN date_creation_month -->
- <option {element.date_creation_month.SELECTED} value="{element.date_creation_month.VALUE}">{element.date_creation_month.OPTION}</option>
- <!-- END date_creation_month -->
+ <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_month-{$element.ID}">
+ {html_options options=$month_list selected=$element.DATE_CREATION_MONTH}
</select>
- <input onmousedown="document.getElementById('date_creation_action_set-{element.ID}').checked = true;"
- name="date_creation_year-{element.ID}"
+ <input onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;"
+ name="date_creation_year-{$element.ID}"
type="text"
size="4"
maxlength="4"
- value="{element.DATE_CREATION_YEAR}" />
+ value="{$element.DATE_CREATION_YEAR}" />
</td>
</tr>
<tr>
- <td><strong>{lang:Tags}</strong></td>
- <td>{element.TAG_SELECTION}</td>
+ <td><strong>{'Tags'|@translate}</strong></td>
+ <td>{$element.TAG_SELECTION}</td>
</tr>
<tr>
- <td><strong>{lang:Description}</strong></td>
- <td><textarea name="description-{element.ID}" class="description">{element.DESCRIPTION}</textarea></td>
+ <td><strong>{'Description'|@translate}</strong></td>
+ <td><textarea name="description-{$element.ID}" class="description">{$element.DESCRIPTION}</textarea></td>
</tr>
</table>
</fieldset>
-<!-- END element -->
+{/foreach}
<p>
- <input class="submit" type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" />
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" />
</p>
-
+{/if}
</form>
diff --git a/template/yoga/admin/thumbnail.tpl b/template/yoga/admin/thumbnail.tpl
index 7070d449d..6bb652caa 100644
--- a/template/yoga/admin/thumbnail.tpl
+++ b/template/yoga/admin/thumbnail.tpl
@@ -1,130 +1,123 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:title_thumbnails}</h2>
+ <h2>{'title_thumbnails'|@translate}</h2>
</div>
-<!-- BEGIN results -->
-<div class="admin">{L_RESULTS}</div>
+{if isset($results) }
+<div class="admin">{'tn_results_title'|@translate}</div>
<table style="width:100%;">
<tr class="throw">
- <td>{L_PATH}</td>
- <td>{L_THUMBNAIL}</td>
- <td>{L_GENERATED}</td>
- <td>{L_FILESIZE}</td>
- <td>{L_WIDTH}</td>
- <td>{L_HEIGHT}</td>
+ <td>{'path'|@translate}</td>
+ <td>{'thumbnail'|@translate}</td>
+ <td>{'tn_results_gen_time'|@translate}</td>
+ <td>{'filesize'|@translate}</td>
+ <td>{'Dimensions'|@translate}</td>
</tr>
- <!-- BEGIN picture -->
- <tr class="{results.picture.T_CLASS}">
- <td>{results.picture.PATH}</td>
- <td><img src="{results.picture.TN_FILE_IMG}" /></td>
- <td style="text-align:right;" class="{results.picture.T_CLASS}">{results.picture.GEN_TIME}</td>
- <td style="text-align:right;">{results.picture.TN_FILESIZE_IMG}</td>
- <td style="text-align:right;">{results.picture.TN_WIDTH_IMG}</td>
- <td style="text-align:right;">{results.picture.TN_HEIGHT_IMG}</td>
+ {foreach from=$results.elements item=elt}
+ <tr>
+ <td>{$elt.PATH}</td>
+ <td><img src="{$elt.TN_FILE_IMG}" /></td>
+ <td style="text-align:right;">{$elt.GEN_TIME}</td>
+ <td style="text-align:right;">{$elt.TN_FILESIZE_IMG}</td>
+ <td style="text-align:right;">{$elt.TN_WIDTH_IMG} x {$elt.TN_HEIGHT_IMG}</td>
</tr>
- <!-- END picture -->
+ {/foreach}
</table>
<table class="table2">
<tr class="throw">
- <td colspan="2">{L_TN_STATS}</td>
+ <td colspan="2">{'tn_stats'|@translate}</td>
</tr>
<tr>
- <td>{L_TN_NB_STATS}</td>
- <td style="text-align:center;">{results.TN_NB}</td>
+ <td>{'tn_stats_nb'|@translate}</td>
+ <td style="text-align:center;">{$results.TN_NB}</td>
</tr>
<tr>
- <td>{L_TN_TOTAL}</td>
- <td style="text-align:right;">{results.TN_TOTAL}</td>
+ <td>{'tn_stats_total'|@translate}</td>
+ <td style="text-align:right;">{$results.TN_TOTAL}</td>
</tr>
<tr>
- <td>{L_TN_MAX}</td>
- <td style="text-align:right;" class="worst_gen_time">{results.TN_MAX}</td>
+ <td>{'tn_stats_max'|@translate}</td>
+ <td style="text-align:right;">{$results.TN_MAX}</td>
</tr>
<tr>
- <td>{L_TN_MIN}</td>
- <td style="text-align:right;" class="best_gen_time">{results.TN_MIN}</td>
+ <td>{'tn_stats_min'|@translate}</td>
+ <td style="text-align:right;">{$results.TN_MIN}</td>
</tr>
<tr>
- <td>{L_TN_AVERAGE}</td>
- <td style="text-align:right;">{results.TN_AVERAGE}</td>
+ <td>{'tn_stats_mean'|@translate}</td>
+ <td style="text-align:right;">{$results.TN_AVERAGE}</td>
</tr>
</table>
<br />
-<!-- END results -->
+{/if}
-<!-- BEGIN params -->
-<form method="post" action="{params.F_ACTION}" class="properties">
+{if isset($params) }
+<form method="post" action="{$params.F_ACTION}" class="properties">
<fieldset>
- <legend>{L_PARAMS}</legend>
+ <legend>{'tn_params_title'|@translate}</legend>
<ul>
<li>
- <span class="property">{L_GD}</span>
+ <span class="property">{'tn_params_GD'|@translate}</span>
<label>
- <input type="radio" name="gd" value="2" {params.GD2_CHECKED} />2.x
+ <input type="radio" name="gd" value="2" {if $params.GD_SELECTED==2}checked="checked"{/if} />2.x
</label>
<label>
- <input type="radio" name="gd" value="1" {params.GD1_CHECKED} />1.x
+ <input type="radio" name="gd" value="1" {if $params.GD_SELECTED==1}checked="checked"{/if} />1.x
</label>
</li>
<li>
<span class="property">
- <label for="width">{lang:maximum width}</label>
+ <label for="width">{'maximum width'|@translate}</label>
</span>
- <input type="text" id="width" name="width" value="{params.WIDTH_TN}" />
+ <input type="text" id="width" name="width" value="{$params.WIDTH_TN}" />
</li>
<li>
<span class="property">
- <label for="height">{lang:maximum height}</label>
+ <label for="height">{'maximum height'|@translate}</label>
</span>
- <input type="text" id="height" name="height" value="{params.HEIGHT_TN}" />
+ <input type="text" id="height" name="height" value="{$params.HEIGHT_TN}" />
</li>
<li>
- <span class="property">{lang:Number of thumbnails to create}</span>
- <label><input type="radio" name="n" value="5" {params.n_5_CHECKED} /> 5</label>
- <label><input type="radio" name="n" value="10" {params.n_10_CHECKED} /> 10</label>
- <label><input type="radio" name="n" value="20" {params.n_20_CHECKED} /> 20</label>
- <label><input type="radio" name="n" value="all" {params.n_all_CHECKED} /> {L_ALL}</label>
+ <span class="property">{'Number of thumbnails to create'|@translate}</span>
+ <label><input type="radio" name="n" value="5" {if $params.N_SELECTED==5}checked="checked"{/if} /> 5</label>
+ <label><input type="radio" name="n" value="10" {if $params.N_SELECTED==10}checked="checked"{/if} /> 10</label>
+ <label><input type="radio" name="n" value="20" {if $params.N_SELECTED==20}checked="checked"{/if} /> 20</label>
+ <label><input type="radio" name="n" value="all" {if $params.N_SELECTED=='all'}checked="checked"{/if} /> {'tn_all'|@translate}</label>
</li>
</ul>
</fieldset>
- <p><input class="submit" type="submit" name="submit" value="{L_SUBMIT}" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/></p>
</form>
-<!-- END params -->
-
-<!-- BEGIN warning -->
-<div style="text-align:center;font-weight:bold;margin:10px;"> [ {L_UNLINK} ]</div>
-<!-- END warning -->
+{/if} {*isset params*}
-<!-- BEGIN remainings -->
-<div class="admin">{remainings.TOTAL_IMG} {L_REMAINING}</div>
+{if !empty($remainings) }
+<div class="admin">{$TOTAL_NB_REMAINING} {'tn_alone_title'|@translate}</div>
<table style="width:100%;">
<tr class="throw">
<td>&nbsp;</td>
- <td style="width:60%;">{L_PATH}</td>
- <td>{L_FILESIZE}</td>
- <td>{L_WIDTH}</td>
- <td>{L_HEIGHT}</td>
+ <td style="width:60%;">{'path'|@translate}</td>
+ <td>{'filesize'|@translate}</td>
+ <td>{'Dimensions'|@translate}</td>
</tr>
- <!-- BEGIN remaining -->
- <tr class="{remainings.remaining.T_CLASS}">
- <td>{remainings.remaining.NB_IMG}</td>
- <td><div style="margin-left:10px;">{remainings.remaining.PATH}</div></td>
- <td><div style="margin-left:10px;">{remainings.remaining.FILESIZE_IMG}</div></td>
- <td><div style="margin-left:10px;">{remainings.remaining.WIDTH_IMG}</div></td>
- <td><div style="margin-left:10px;">{remainings.remaining.HEIGHT_IMG}</div></td>
+ {foreach from=$remainings item=elt name=remain_loop}
+ <tr class="{if $smarty.foreach.remain_loop.index is odd}row1{else}row2{/if}">
+ <td>{$smarty.foreach.remain_loop.iteration}</td>
+ <td><div style="margin-left:10px;">{$elt.PATH}</div></td>
+ <td><div style="margin-left:10px;">{$elt.FILESIZE_IMG}</div></td>
+ <td><div style="margin-left:10px;">{$elt.WIDTH_IMG} x {$elt.HEIGHT_IMG}</div></td>
</tr>
- <!-- END remaining -->
+ {/foreach}
</table>
-<!-- END remainings -->
+{else}
+<div style="text-align:center;font-weight:bold;margin:10px;"> [ {'tn_no_missing'|@translate} ]</div>
+{/if}
diff --git a/template/yoga/redirect.tpl b/template/yoga/redirect.tpl
index 308411aec..aa007426f 100644
--- a/template/yoga/redirect.tpl
+++ b/template/yoga/redirect.tpl
@@ -1,3 +1,3 @@
{* $Id$ *}
<p>{$REDIRECT_MSG}</p>
-<p><a href="{$refresh.U_REFRESH}">{'click_to_redirect'|@translate}</a></p>
+<p><a href="{$page_refresh.U_REFRESH}">{'click_to_redirect'|@translate}</a></p>