- improvement : screen admin/picture_modify rewritten. Presentation copied

from admin/cat_modify : fieldsets regroup fields. Ability to synchronize
  metadata for the displayed item.

- bug 110 fixed : "return to element view from element edition fails
  depending on permissions". If a reachable (for the connected admin)
  category is available, a "jump to" link is displayed, by default, using
  the category given in URL.

- bug fixed : in mass_updates function, the first item of $fields['update']
  has not always 0 for id (as in any array).

- modification : get_keywords function understands spaces as separator,
  allow less than 3 chars keywords, allow quotes.

- new : ability to allow HTML in picture or category description (false by
  default)


git-svn-id: http://piwigo.org/svn/trunk@825 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2005-08-18 17:59:00 +00:00
parent a7e5dbf37c
commit 7a8b502e11
12 changed files with 460 additions and 228 deletions

View file

@ -41,36 +41,26 @@ $template->set_filenames( array('categories'=>'admin/cat_modify.tpl') );
//--------------------------------------------------------- form criteria check
if (isset($_POST['submit']))
{
$query = 'UPDATE '.CATEGORIES_TABLE;
$query.= ' SET name = ';
if ( empty($_POST['name']))
$query.= 'NULL';
else
$query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'";
$data =
array(
'id' => $_GET['cat_id'],
'name' => @$_POST['name'],
'commentable' => $_POST['commentable'],
'uploadable' =>
isset($_POST['uploadable']) ? $_POST['uploadable'] : 'false',
'comment' =>
$conf['allow_html_descriptions'] ?
@$_POST['comment'] : strip_tags(@$_POST['comment'])
);
$query.= ', comment = ';
if ( empty($_POST['comment']))
$query.= 'NULL';
else
$query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'";
if ( isset( $_POST['uploadable'] ) )
$query.= ", uploadable = '".$_POST['uploadable']."'";
if ( isset( $_POST['commentable'] ) )
$query.= ", commentable = '".$_POST['commentable']."'";
if ( isset( $_POST['associate'] ) )
{
$query.= ', id_uppercat = ';
if ( $_POST['associate'] == -1 or $_POST['associate'] == '' )
$query.= 'NULL';
else
$query.= $_POST['associate'];
}
$query.= ' WHERE id = '.$_GET['cat_id'];
$query.= ';';
pwg_query( $query );
mass_updates(
CATEGORIES_TABLE,
array(
'primary' => array('id'),
'update' => array_diff(array_keys($data), array('id'))
),
array($data)
);
set_cat_visible(array($_GET['cat_id']), $_POST['visible']);
set_cat_status(array($_GET['cat_id']), $_POST['status']);

View file

@ -201,11 +201,11 @@ $template->set_filenames(array('cat_perm'=>'admin/cat_perm.tpl'));
$template->assign_vars(
array(
'TITLE' =>
sprintf(
l10n('Manage permissions for category "%s"'),
get_cat_display_name_from_id($page['cat'])
)
'CATEGORIES_NAV' =>
get_cat_display_name_from_id(
$page['cat'],
'admin.php?page=cat_modify&cat_id='
),
'F_ACTION' =>
add_session_id(
PHPWG_ROOT_PATH.'admin.php?page=cat_perm&cat='.$page['cat']

View file

@ -582,23 +582,23 @@ function date_convert_back( $date )
}
}
// get_keywords returns an array with relevant keywords found in the string
// given in argument. Keywords must be separated by comma in this string.
// keywords must :
// - be longer or equal to 3 characters
// - not contain ', " or blank characters
// - unique in the string ("test,test" -> "test")
/**
* returns an array with relevant keywords found in the given string.
*
* Keywords must be separated by comma or space characters.
*
* @param string keywords_string
* @return array
*/
function get_keywords($keywords_string)
{
$keywords = array();
$candidates = explode( ',', $keywords_string );
foreach ( $candidates as $candidate ) {
if ( strlen($candidate) >= 3 and !preg_match( '/(\'|"|\s)/', $candidate ) )
array_push( $keywords, $candidate );
}
return array_unique( $keywords );
return
array_unique(
preg_split(
'/[\s,]+/',
$keywords_string
)
);
}
/**
@ -742,14 +742,15 @@ function mass_updates($tablename, $dbfields, $datas)
$query = '
UPDATE '.$tablename.'
SET ';
$is_first = true;
foreach ($dbfields['update'] as $num => $key)
{
if ($num >= 1)
if (!$is_first)
{
$query.= ",\n ";
}
$query.= $key.' = ';
if (isset($data[$key]))
if (isset($data[$key]) and $data[$key] != '')
{
$query.= '\''.$data[$key].'\'';
}
@ -757,6 +758,7 @@ UPDATE '.$tablename.'
{
$query.= 'NULL';
}
$is_first = false;
}
$query.= '
WHERE ';

View file

@ -204,4 +204,28 @@ SELECT id, path
return $files;
}
// used_metadata string is displayed to inform admin which metadata will be
// used from files for synchronization
function get_used_metadata_list()
{
global $conf;
$used_metadata = array('filesize', 'width', 'height');
if ($conf['use_exif'])
{
array_push($used_metadata, 'date_creation');
}
if ($conf['use_iptc'])
{
foreach (array_keys($conf['use_iptc_mapping']) as $key)
{
array_push($used_metadata, $key);
}
}
return array_unique($used_metadata);
}
?>

View file

@ -27,61 +27,93 @@
if(!defined("PHPWG_ROOT_PATH"))
{
die ("Hacking attempt!");
die('Hacking attempt!');
}
include_once(PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
//--------------------------------------------------------- update informations
// first, we verify whether there is a mistake on the given creation date
if (isset($_POST['date_creation']) and !empty($_POST['date_creation']))
// +-----------------------------------------------------------------------+
// | synchronize metadata |
// +-----------------------------------------------------------------------+
if (isset($_GET['sync_metadata']))
{
if (!check_date_format($_POST['date_creation']))
$query = '
SELECT path
FROM '.IMAGES_TABLE.'
WHERE id = '.$_GET['image_id'].'
;';
list($path) = mysql_fetch_row(pwg_query($query));
update_metadata(array($_GET['image_id'] => $path));
array_push($page['infos'], l10n('Metadata synchronized from file'));
}
//--------------------------------------------------------- update informations
// first, we verify whether there is a mistake on the given creation date
if (isset($_POST['date_creation_action'])
and 'set' == $_POST['date_creation_action'])
{
if (!checkdate(
$_POST['date_creation_month'],
$_POST['date_creation_day'],
$_POST['date_creation_year'])
)
{
array_push($page['errors'], $lang['err_date']);
}
}
if (isset($_POST['submit']) and count($page['errors']) == 0)
{
$query = 'UPDATE '.IMAGES_TABLE.' SET name = ';
if ($_POST['name'] == '')
$query.= 'NULL';
else
$query.= "'".htmlentities($_POST['name'], ENT_QUOTES)."'";
$data = array();
$data{'id'} = $_GET['image_id'];
$data{'name'} = $_POST['name'];
$data{'author'} = $_POST['author'];
$query.= ', author = ';
if ($_POST['author'] == '')
$query.= 'NULL';
else
$query.= "'".htmlentities($_POST['author'],ENT_QUOTES)."'";
$query.= ', comment = ';
if ($_POST['comment'] == '')
$query.= 'NULL';
else
$query.= "'".htmlentities($_POST['comment'],ENT_QUOTES)."'";
$query.= ', date_creation = ';
if (!empty($_POST['date_creation']))
$query.= "'".date_convert($_POST['date_creation'])."'";
else if ($_POST['date_creation'] == '')
$query.= 'NULL';
$query.= ', keywords = ';
$keywords_array = get_keywords($_POST['keywords']);
if (count($keywords_array) == 0)
$query.= 'NULL';
if ($conf['allow_html_descriptions'])
{
$data{'comment'} = @$_POST['description'];
}
else
{
$query.= "'";
foreach ($keywords_array as $i => $keyword) {
if ($i > 0) $query.= ',';
$query.= $keyword;
}
$query.= "'";
$data{'comment'} = strip_tags(@$_POST['description']);
}
$query.= ' WHERE id = '.$_GET['image_id'];
$query.= ';';
pwg_query($query);
if (isset($_POST['date_creation_action']))
{
if ('set' == $_POST['date_creation_action'])
{
$data{'date_creation'} = $_POST['date_creation_year']
.'-'.$_POST['date_creation_month']
.'-'.$_POST['date_creation_day'];
}
else if ('unset' == $_POST['date_creation_action'])
{
$data{'date_creation'} = '';
}
}
$keywords = get_keywords($_POST['keywords']);
if (count($keywords) > 0)
{
$data{'keywords'} = implode(',', $keywords);
}
else
{
$data{'keywords'} = '';
}
mass_updates(
IMAGES_TABLE,
array(
'primary' => array('id'),
'update' => array_diff(array_keys($data), array('id'))
),
array($data)
);
array_push($page['infos'], l10n('Picture informations updated'));
}
// associate the element to other categories than its storage category
if (isset($_POST['associate'])
@ -137,85 +169,175 @@ if (isset($_POST['dismiss'])
// retrieving direct information about picture
$query = '
SELECT i.*, c.uppercats
FROM '.IMAGES_TABLE.' AS i
INNER JOIN '.CATEGORIES_TABLE.' AS c ON i.storage_category_id = c.id
WHERE i.id = '.$_GET['image_id'].'
SELECT *
FROM '.IMAGES_TABLE.'
WHERE id = '.$_GET['image_id'].'
;';
$row = mysql_fetch_array(pwg_query($query));
$storage_category_id = $row['storage_category_id'];
if (empty($row['name']))
{
$title = str_replace('_', ' ',get_filename_wo_extension($row['file']));
}
else
{
$title = $row['name'];
}
// Navigation path
$thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
$url_img = PHPWG_ROOT_PATH.'picture.php?image_id='.$_GET['image_id'];
$url_img .= '&cat='.$row['storage_category_id'];
$date = isset($_POST['date_creation']) && empty($page['errors'])
?$_POST['date_creation']:date_convert_back(@$row['date_creation']);
$url = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id=';
$storage_category = get_cat_display_name_cache($row['uppercats'],
$url,
false);
//----------------------------------------------------- template initialization
// +-----------------------------------------------------------------------+
// | template init |
// +-----------------------------------------------------------------------+
$template->set_filenames(
array(
'picture_modify' => 'admin/picture_modify.tpl'
)
);
$template->assign_vars(array(
'TITLE_IMG'=>$title,
'STORAGE_CATEGORY_IMG'=>$storage_category,
'PATH_IMG'=>$row['path'],
'FILE_IMG'=>$row['file'],
'TN_URL_IMG'=>$thumbnail_url,
'URL_IMG'=>add_session_id($url_img),
'DEFAULT_NAME_IMG'=>str_replace('_',' ',get_filename_wo_extension($row['file'])),
'FILE_IMG'=>$row['file'],
'NAME_IMG'=>isset($_POST['name'])?$_POST['name']:@$row['name'],
'SIZE_IMG'=>@$row['width'].' * '.@$row['height'],
'FILESIZE_IMG'=>@$row['filesize'].' KB',
'REGISTRATION_DATE_IMG'
=> format_date($row['date_available'], 'mysql_datetime', true),
'AUTHOR_IMG'=>isset($_POST['author'])?$_POST['author']:@$row['author'],
'CREATION_DATE_IMG'=>$date,
'KEYWORDS_IMG'=>isset($_POST['keywords'])?$_POST['keywords']:@$row['keywords'],
'COMMENT_IMG'=>isset($_POST['comment'])?$_POST['comment']:@$row['comment'],
$template->assign_vars(
array(
'U_SYNC' =>
add_session_id(
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
'&image_id='.$_GET['image_id'].
(isset($_GET['cat_id']) ? '&cat_id='.$_GET['cat_id'] : '').
'&sync_metadata=1'
),
'L_UPLOAD_NAME'=>$lang['upload_name'],
'L_DEFAULT'=>$lang['default'],
'L_FILE'=>$lang['file'],
'L_SIZE'=>$lang['size'],
'L_FILESIZE'=>$lang['filesize'],
'L_REGISTRATION_DATE'=>$lang['registration_date'],
'L_AUTHOR'=>$lang['author'],
'L_CREATION_DATE'=>$lang['creation_date'],
'L_KEYWORDS'=>$lang['keywords'],
'L_COMMENT'=>$lang['description'],
'L_CATEGORIES'=>$lang['categories'],
'L_DISSOCIATE'=>$lang['dissociate'],
'L_INFOIMAGE_ASSOCIATE'=>$lang['infoimage_associate'],
'L_SUBMIT'=>$lang['submit'],
'L_RESET'=>$lang['reset'],
'L_CAT_ASSOCIATED'=>$lang['infoimage_associated'],
'L_CAT_DISSOCIATED'=>$lang['infoimage_dissociated'],
'L_PATH'=>$lang['path'],
'L_STORAGE_CATEGORY'=>$lang['storage_category'],
'L_REPRESENTS'=>$lang['represents'],
'L_DOESNT_REPRESENT'=>$lang['doesnt_represent'],
'PATH'=>$row['path'],
'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?'.$_SERVER['QUERY_STRING'])
));
'TN_SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']),
'NAME' =>
isset($_POST['name']) ?
stripslashes($_POST['name']) : @$row['name'],
'DIMENSIONS' => @$row['width'].' * '.@$row['height'],
'FILESIZE' => @$row['filesize'].' KB',
'REGISTRATION_DATE' =>
format_date($row['date_available'], 'mysql_datetime', false),
'AUTHOR' => isset($_POST['author']) ? $_POST['author'] : @$row['author'],
'CREATION_DATE' => $date,
'KEYWORDS' =>
isset($_POST['keywords']) ?
stripslashes($_POST['keywords']) : @$row['keywords'],
'DESCRIPTION' =>
isset($_POST['description']) ?
stripslashes($_POST['description']) : @$row['comment'],
'F_ACTION' =>
add_session_id(
PHPWG_ROOT_PATH.'admin.php'
.get_query_string_diff(array('sync_metadata'))
)
)
);
// creation date
unset($day, $month, $year);
if (isset($_POST['date_creation_action'])
and 'set' == $_POST['date_creation_action'])
{
foreach (array('day', 'month', 'year') as $varname)
{
$$varname = $_POST['date_creation_'.$varname];
}
}
else if (isset($row['date_creation']) and !empty($row['date_creation']))
{
list($year, $month, $day) = explode('-', $row['date_creation']);
}
else
{
list($year, $month, $day) = array('', 0, 0);
}
get_day_list('date_creation_day', $day);
get_month_list('date_creation_month', $month);
$template->assign_vars(array('DATE_CREATION_YEAR_VALUE' => $year));
$query = '
SELECT category_id, uppercats
FROM '.IMAGE_CATEGORY_TABLE.' AS ic
INNER JOIN '.CATEGORIES_TABLE.' AS c
ON c.id = ic.category_id
WHERE image_id = '.$_GET['image_id'].'
;';
$result = pwg_query($query);
if (mysql_num_rows($result) > 1)
{
$template->assign_block_vars('links', array());
}
while ($row = mysql_fetch_array($result))
{
$name =
get_cat_display_name_cache(
$row['uppercats'],
PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id=',
false
);
if ($row['category_id'] == $storage_category_id)
{
$template->assign_vars(array('STORAGE_CATEGORY' => $name));
}
else
{
$template->assign_block_vars('links.category', array('NAME' => $name));
}
}
// jump to link
//
// 1. find all linked categories that are reachable for the current user.
// 2. if a category is available in the URL, use it if reachable
// 3. if URL category not available or reachable, use the first reachable
// linked category
// 4. if no category reachable, no jumpto link
$base_url_img = PHPWG_ROOT_PATH.'picture.php';
$base_url_img.= '?image_id='.$_GET['image_id'];
$base_url_img.= '&cat=';
unset($url_img);
$query = '
SELECT category_id
FROM '.IMAGE_CATEGORY_TABLE.'
WHERE image_id = '.$_GET['image_id'].'
;';
$authorizeds = array_diff(
array_from_query($query, 'category_id'),
explode(',', calculate_permissions($user['id'], $user['status']))
);
if (isset($_GET['cat_id'])
and in_array($_GET['cat_id'], $authorizeds))
{
$url_img = $base_url_img.$_GET['cat_id'];
}
else
{
foreach ($authorizeds as $category)
{
$url_img = $base_url_img.$category;
break;
}
}
if (isset($url_img))
{
$template->assign_block_vars(
'jumpto',
array(
'URL' => $url_img
)
);
}
// associate to another category ?
$query = '
@ -258,6 +380,5 @@ display_select_cat_wrapper($query, array(), 'dismissed_option');
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'picture_modify');
?>

View file

@ -1,3 +1,24 @@
2005-08-18 Pierrick LE GALL
* improvement : screen admin/picture_modify
rewritten. Presentation copied from admin/cat_modify : fieldsets
regroup fields. Ability to synchronize metadata for the displayed
item.
* bug 110 fixed : "return to element view from element edition
fails depending on permissions". If a reachable (for the connected
admin) category is available, a "jump to" link is displayed, by
default, using the category given in URL.
* bug fixed : in mass_updates function, the first item of
$fields['update'] has not always 0 for id (as in any array).
* modification : get_keywords function understands spaces as
separator, allow less than 3 chars keywords, allow quotes.
* new : ability to allow HTML in picture or category description
(false by default)
2005-08-17 Pierrick LE GALL
* improvement : in admin/user_perm, already authorized categories

View file

@ -265,4 +265,8 @@ $conf['guest_id'] = 2;
// must update categories informations in screen [Admin > General >
// Maintenance].
$conf['allow_random_representative'] = false;
// allow_html_descriptions : authorize administrators to use HTML in
// category and element description.
$conf['allow_html_descriptions'] = true;
?>

View file

@ -259,8 +259,9 @@ function get_cat_display_name($cat_informations,
}
else
{
$output.= '
<a class="" href="'.add_session_id(PHPWG_ROOT_PATH.$url.$id).'">'.$name.'</a>';
$output.= '<a class=""';
$output.= ' href="'.add_session_id(PHPWG_ROOT_PATH.$url.$id).'">';
$output.= $name.'</a>';
}
}
if ($replace_space)
@ -455,6 +456,6 @@ function get_cat_display_name_from_id($cat_id,
$replace_space = true)
{
$cat_info = get_cat_info($cat_id);
get_cat_display_name($cat_info['id'], $url, $replace_space);
return get_cat_display_name($cat_info['name'], $url, $replace_space);
}
?>

View file

@ -1,4 +1,6 @@
<h1>{TITLE}</h1>
<h1>{lang:Manage permissions for a category}</h1>
<h2>{CATEGORIES_NAV}</h2>
<form action="{F_ACTION}" method="post" id="categoryPermissions">

View file

@ -1,75 +1,131 @@
<h1>{lang:title_picmod}</h1>
<div class="admin">{TITLE_IMG}</div>
<form action="{F_ACTION}" method="POST">
<table style="width:100%;">
<img src="{TN_SRC}" alt="{lang:thumbnail}" class="thumbnail" />
<ul class="categoryActions">
<!-- BEGIN jumpto -->
<li><a href="{jumpto.URL}" title="{lang:jump to image}"><img src="./template/default/theme/category_jump-to.png" alt="{lang:jump to}" /></a></li>
<!-- END jumpto -->
<li><a href="{U_SYNC}" title="{lang:synchronize metadata}"><img src="./template/default/theme/sync_metadata.png" alt="{lang:synchronize}" /></a></li>
</ul>
<form action="{F_ACTION}" method="post">
<fieldset>
<legend>{lang:Informations}</legend>
<table>
<tr>
<td colspan="2" align="center"><a href="{URL_IMG}" class="thumbnail"><img src="{TN_URL_IMG}" alt="" class="miniature" /></a></td>
<td><strong>{lang:Path}</strong></td>
<td>{PATH}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_UPLOAD_NAME}</strong></td>
<td class="row1"><input type="text" name="name" value="{NAME_IMG}" /> [ {L_DEFAULT} : {DEFAULT_NAME_IMG} ]</td>
<td><strong>{lang:Registration date}</strong></td>
<td>{REGISTRATION_DATE}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_FILE}</strong></td>
<td class="row1">{FILE_IMG}</td>
<td><strong>{lang:Dimensions}</strong></td>
<td>{DIMENSIONS}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_SIZE}</strong></td>
<td class="row1">{SIZE_IMG}</td>
<td><strong>{lang:Filesize}</strong></td>
<td>{FILESIZE}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_FILESIZE}</strong></td>
<td class="row1">{FILESIZE_IMG}</td>
<td><strong>{lang:Storage category}</strong></td>
<td>{STORAGE_CATEGORY}</td>
</tr>
<!-- BEGIN links -->
<tr>
<td style="width:50%;"><strong>{L_REGISTRATION_DATE}</strong></td>
<td class="row1">{REGISTRATION_DATE_IMG}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_PATH}</strong></td>
<td class="row1">{PATH_IMG}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_STORAGE_CATEGORY}</strong></td>
<td class="row1">{STORAGE_CATEGORY_IMG}</td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_AUTHOR}</strong></td>
<td class="row1"><input type="text" name="author" value="{AUTHOR_IMG}" /></td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_CREATION_DATE}</strong></td>
<td class="row1"><input type="text" name="date_creation" value="{CREATION_DATE_IMG}" /></td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_KEYWORDS}</strong></td>
<td class="row1"><input type="text" name="keywords" value="{KEYWORDS_IMG}" size="50" /></td>
</tr>
<tr>
<td style="width:50%;"><strong>{L_COMMENT}</strong></td>
<td class="row1"><textarea name="comment" rows="5" cols="50" style="overflow:auto">{COMMENT_IMG}</textarea></td>
</tr>
<tr>
<td colspan="2"><div style="margin-bottom:0px">&nbsp;</div></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="{L_SUBMIT}" class="bouton" />
<input type="reset" name="reset" value="{L_RESET}" class="bouton" />
<td><strong>{lang:Linked categories}</strong></td>
<td>
<ul>
<!-- BEGIN category -->
<li>{links.category.NAME}</li>
<!-- END category -->
</ul>
</td>
</tr>
<!-- END links -->
</table>
</fieldset>
<fieldset>
<legend>{lang:Properties}</legend>
<table>
<tr>
<td><strong>{lang:Name}</strong></td>
<td><input type="text" name="name" value="{NAME}" /></td>
</tr>
<tr>
<td><strong>{lang:Author}</strong></td>
<td><input type="text" name="author" value="{AUTHOR}" /></td>
</tr>
<tr>
<td><strong>{lang:Creation date}</strong></td>
<td>
<label><input type="radio" name="date_creation_action" value="unset" /> unset</label>
<input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> 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 -->
</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>
<input onmousedown="document.getElementById('date_creation_action_set').checked = true;"
name="date_creation_year"
type="text"
size="4"
maxlength="4"
value="{DATE_CREATION_YEAR_VALUE}" />
</td>
</tr>
<tr>
<td><strong>{lang:Keywords}</strong></td>
<td><input type="text" name="keywords" value="{KEYWORDS}" size="50" /></td>
</tr>
<tr>
<td><strong>{lang:Description}</strong></td>
<td><textarea name="description" rows="5" cols="50" style="overflow:auto">{DESCRIPTION}</textarea></td>
</tr>
</table>
<p style="text-align:center;">
<input type="submit" value="{lang:Submit}" name="submit" />
<input type="reset" value="{lang:Reset}" name="reset" />
</p>
</fieldset>
</form>
<form name="form1" method="post" action="{F_ACTION}">
<form id="associations" method="post" action="{F_ACTION}#associations">
<fieldset>
<legend>{lang:Association to categories}</legend>
<table class="doubleSelect">
<tr>
<td>
<h3>{L_CAT_ASSOCIATED}</h3>
<h3>{lang:Associated}</h3>
<select class="categoryList" name="cat_associated[]" multiple="multiple" size="30">
<!-- BEGIN associated_option -->
<option {associated_option.SELECTED} value="{associated_option.VALUE}">{associated_option.OPTION}</option>
@ -79,7 +135,7 @@
</td>
<td>
<h3>{L_CAT_DISSOCIATED}</h3>
<h3>{lang:Dissociated}</h3>
<select class="categoryList" name="cat_dissociated[]" multiple="multiple" size="30">
<!-- BEGIN dissociated_option -->
<option {dissociated_option.SELECTED} value="{dissociated_option.VALUE}">{dissociated_option.OPTION}</option>
@ -93,14 +149,14 @@
</fieldset>
</form>
<form name="form2" method="post" action="{F_ACTION}">
<form id="representation" method="post" action="{F_ACTION}#representation">
<fieldset>
<legend>{lang:Representation of categories}</legend>
<table class="doubleSelect">
<tr>
<td>
<h3>{L_REPRESENTS}</h3>
<h3>{lang:Represents}</h3>
<select class="categoryList" name="cat_elected[]" multiple="multiple" size="30">
<!-- BEGIN elected_option -->
<option {elected_option.SELECTED} value="{elected_option.VALUE}">{elected_option.OPTION}</option>
@ -110,7 +166,7 @@
</td>
<td>
<h3>{L_DOESNT_REPRESENT}</h3>
<h3>{lang:Does not represent}</h3>
<select class="categoryList" name="cat_dismissed[]" multiple="multiple" size="30">
<!-- BEGIN dismissed_option -->
<option {dismissed_option.SELECTED} value="{dismissed_option.VALUE}">{dismissed_option.OPTION}</option>

View file

@ -426,6 +426,11 @@ form#categoryOrdering ul.categoryActions {
margin-top: 5px;
}
ul.categoryActions {
margin: 5px;
padding: 5px;
}
div.titrePage ul.categoryActions {
float: right;
margin: 0;
@ -605,3 +610,9 @@ div#adminMain>fieldset {
fieldset>legend {
font-style: italic;
}
div#adminMain img.thumbnail {
border: 1px solid white;
margin: 0 auto;
display: block;
}

Binary file not shown.