diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-16 03:06:41 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-16 03:06:41 +0000 |
commit | d9b6ce8e875128e0bcac16c09db67636370856d0 (patch) | |
tree | ff3c20b659c1bde4df2d122d622ba7702f324a65 | |
parent | bbc2dc24191681c863badea1e04b08cf44e46dc5 (diff) |
- adviser mode: added check on admin profile page and removed 2 read-only TAG_INPUT_ENABLED
- simplified tag code in picture.php
- reduced size of dark/theme.css by combining selectors with identical content
git-svn-id: http://piwigo.org/svn/trunk@1827 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/profile.php | 8 | ||||
-rw-r--r-- | picture.php | 37 | ||||
-rw-r--r-- | template/yoga/admin/element_set_global.tpl | 2 | ||||
-rw-r--r-- | template/yoga/admin/history.tpl | 2 | ||||
-rw-r--r-- | template/yoga/admin/user_list.tpl | 2 | ||||
-rw-r--r-- | template/yoga/theme/dark/theme.css | 20 |
6 files changed, 22 insertions, 49 deletions
diff --git a/admin/profile.php b/admin/profile.php index 0cf36e42c..2263a6fff 100644 --- a/admin/profile.php +++ b/admin/profile.php @@ -32,14 +32,18 @@ $edit_user = build_user( $_GET['user_id'], false ); include_once(PHPWG_ROOT_PATH.'profile.php'); -save_profile_from_post( $edit_user, $errors); +$errors = array(); +if ( !is_adviser() ) +{ + save_profile_from_post( $edit_user, $errors); +} load_profile_in_template( get_root_url().'admin.php?page=profile&user_id='.$edit_user['id'], get_root_url().'admin.php?page=user_list', $edit_user ); -$page['errors'] = array_merge( $page['errors'], $errors); +$page['errors'] = array_merge($page['errors'], $errors ); $template->set_filename('profile', 'admin/profile.tpl'); $template->assign_var_from_handle('ADMIN_CONTENT', 'profile'); diff --git a/picture.php b/picture.php index 7df5113b3..3d258fb32 100644 --- a/picture.php +++ b/picture.php @@ -748,41 +748,22 @@ $infos['INFO_VISITS'] = $picture['current']['hit']; $infos['INFO_FILE'] = $picture['current']['file']; // tags -$query = ' -SELECT id, name, url_name - FROM '.IMAGE_TAG_TABLE.' - INNER JOIN '.TAGS_TABLE.' ON tag_id = id - WHERE image_id = '.$page['image_id'].' -;'; -$result = pwg_query($query); - -if (mysql_num_rows($result) > 0) +$tags = get_common_tags( array($page['image_id']), -1); +if ( count($tags) ) { - $tags = array(); - $tag_names = array(); - - while ($row = mysql_fetch_array($result)) + $infos['INFO_TAGS'] = ''; + foreach ($tags as $num => $tag) { - array_push( - $tags, - '<a href="' + $infos['INFO_TAGS'] .= $num ? ' ,' : ''; + $infos['INFO_TAGS'] .= '<a href="' .make_index_url( array( - 'tags' => array( - array( - 'id' => $row['id'], - 'url_name' => $row['url_name'], - ), - ) + 'tags' => array($tag) ) ) - .'">'.$row['name'].'</a>' - ); - array_push( $tag_names, $row['name'] ); + .'">'.$tag['name'].'</a>'; } - - $infos['INFO_TAGS'] = implode(', ', $tags); - $header_infos['INFO_TAGS'] = implode(', ', $tag_names); + $header_infos['INFO_TAGS'] = strip_tags($infos['INFO_TAGS']); } else { diff --git a/template/yoga/admin/element_set_global.tpl b/template/yoga/admin/element_set_global.tpl index 0548097c5..1c2c3ee33 100644 --- a/template/yoga/admin/element_set_global.tpl +++ b/template/yoga/admin/element_set_global.tpl @@ -164,7 +164,7 @@ </ul> - <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit_caddie" {TAG_INPUT_ENABLED}/></p> + <p><input class="submit" type="submit" value="{L_SUBMIT}" name="submit_caddie" /></p> </fieldset> diff --git a/template/yoga/admin/history.tpl b/template/yoga/admin/history.tpl index f0d364d6f..697c37df5 100644 --- a/template/yoga/admin/history.tpl +++ b/template/yoga/admin/history.tpl @@ -82,7 +82,7 @@ </select> </label> - <input class="submit" type="submit" name="submit" value="{lang:submit}" {TAG_INPUT_ENABLED}/> + <input class="submit" type="submit" name="submit" value="{lang:submit}" /> </fieldset> </form> diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl index 7aef79821..8f38fc9ae 100644 --- a/template/yoga/admin/user_list.tpl +++ b/template/yoga/admin/user_list.tpl @@ -58,7 +58,7 @@ </select> </label> - <input class="submit" type="submit" name="submit_filter" value="{lang:submit}" {TAG_INPUT_ENABLED}/> + <input class="submit" type="submit" name="submit_filter" value="{lang:submit}" /> </fieldset> diff --git a/template/yoga/theme/dark/theme.css b/template/yoga/theme/dark/theme.css index 13d27f877..982d4f40d 100644 --- a/template/yoga/theme/dark/theme.css +++ b/template/yoga/theme/dark/theme.css @@ -83,24 +83,15 @@ FIELDSET, INPUT, SELECT, TEXTAREA, border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */ } -#content UL.thumbnails SPAN.wrap2:hover { - background-color: AntiqueWhite; - border-color: yellow; /* thumbnails border color when mouse cursor is over it */ - color: black; -} - -#content UL.thumbnailCategories DIV.thumbnailCategory:hover { - background-color: AntiqueWhite; - border-color: yellow; /* thumbnails border color when mouse cursor is over it */ - color: black; -} - +#content UL.thumbnails SPAN.wrap2:hover, +#content UL.thumbnailCategories DIV.thumbnailCategory:hover, #content UL.thumbnailCategories DIV.thumbnailCategory:hover A { background-color: AntiqueWhite; border-color: yellow; /* thumbnails border color when mouse cursor is over it */ color: black; } + /* links */ A, INPUT.rateButton { color: #FFFFFF; @@ -110,10 +101,7 @@ A:hover { color: #FFF48E; } -#imageToolBar A, #imageToolBar A:hover { - border-bottom: none; -} - +#imageToolBar A, #imageToolBar A:hover, A.navThumb, A.navThumb:hover { border-bottom: none; } |