From ca230a6f53e3a102faf5cb3633465ee8fc326663 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sun, 18 Dec 2011 21:46:24 +0000 Subject: feature:2538 Make a unified messages management use only $page['infos'] and $page['errors'] vars and and necessary template to all main pages git-svn-id: http://piwigo.org/svn/trunk@12764 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/Sylvia/theme.css | 12 ++++-------- themes/default/template/about.tpl | 3 +++ themes/default/template/comments.tpl | 2 ++ themes/default/template/identification.tpl | 10 +--------- themes/default/template/index.tpl | 2 ++ themes/default/template/infos_errors.tpl | 19 +++++++++++++++++++ themes/default/template/nbm.tpl | 20 +------------------- themes/default/template/notification.tpl | 2 ++ themes/default/template/password.tpl | 20 +------------------- themes/default/template/picture.tpl | 19 +------------------ themes/default/template/profile.tpl | 12 ++---------- themes/default/template/register.tpl | 10 +--------- themes/default/template/search.tpl | 10 +--------- themes/default/template/tags.tpl | 2 ++ themes/default/theme.css | 4 ++-- 15 files changed, 44 insertions(+), 103 deletions(-) create mode 100644 themes/default/template/infos_errors.tpl (limited to 'themes') diff --git a/themes/Sylvia/theme.css b/themes/Sylvia/theme.css index bc8b131a9..9093cd475 100644 --- a/themes/Sylvia/theme.css +++ b/themes/Sylvia/theme.css @@ -249,19 +249,15 @@ .infos { color:#f70; border:0; - background-color: transparent; - margin-left:125px; - padding:5px 0px 0pt 10pt; - min-height: 48px; + background:transparent url(icon/infos.png) no-repeat center right; + margin-left:40px; text-align:left; } .errors { color:#f33; border:0; - background: transparent url(icon/errors.png) no-repeat scroll right top; - margin-left:125px; - padding:5px 0px 0pt 10pt; - min-height: 48px; + background:transparent url(icon/errors.png) no-repeat center right; + margin-left:40px; text-align:left; font-weight:bold; } diff --git a/themes/default/template/about.tpl b/themes/default/template/about.tpl index 55f2ec830..407ca2839 100644 --- a/themes/default/template/about.tpl +++ b/themes/default/template/about.tpl @@ -8,6 +8,9 @@

{'About'|@translate}

+ + {include file='infos_errors.tpl'} +
{$ABOUT_MESSAGE} {if isset($THEME_ABOUT) } diff --git a/themes/default/template/comments.tpl b/themes/default/template/comments.tpl index 28a0a5074..8ea49754c 100644 --- a/themes/default/template/comments.tpl +++ b/themes/default/template/comments.tpl @@ -10,6 +10,8 @@

{'User comments'|@translate}

+{include file='infos_errors.tpl'} +
diff --git a/themes/default/template/identification.tpl b/themes/default/template/identification.tpl index 3deff9c54..ecdff0bb1 100644 --- a/themes/default/template/identification.tpl +++ b/themes/default/template/identification.tpl @@ -10,15 +10,7 @@

{'Identification'|@translate}

- {if isset($errors) } -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
- {/if} +{include file='infos_errors.tpl'}
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl index 5b33c66c0..815dcbd8e 100644 --- a/themes/default/template/index.tpl +++ b/themes/default/template/index.tpl @@ -79,6 +79,8 @@ {* *} +{include file='infos_errors.tpl'} + {if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} {if !empty($category_search_results)} diff --git a/themes/default/template/infos_errors.tpl b/themes/default/template/infos_errors.tpl new file mode 100644 index 000000000..ce2db88d9 --- /dev/null +++ b/themes/default/template/infos_errors.tpl @@ -0,0 +1,19 @@ +{if isset($errors) } +
+
    + {foreach from=$errors item=error} +
  • {$error}
  • + {/foreach} +
+
+{/if} + +{if not empty($infos)} +
+
    + {foreach from=$infos item=info} +
  • {$info}
  • + {/foreach} +
+
+{/if} \ No newline at end of file diff --git a/themes/default/template/nbm.tpl b/themes/default/template/nbm.tpl index 943f9cdc7..c586e9e46 100644 --- a/themes/default/template/nbm.tpl +++ b/themes/default/template/nbm.tpl @@ -9,24 +9,6 @@

{'Notification'|@translate}

- {if not empty($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
- {/if} - - {if not empty($infos)} -
-
    - {foreach from=$infos item=info} -
  • {$info}
  • - {/foreach} -
-
- {/if} +{include file='infos_errors.tpl'} diff --git a/themes/default/template/notification.tpl b/themes/default/template/notification.tpl index 935957060..2a0718f5e 100644 --- a/themes/default/template/notification.tpl +++ b/themes/default/template/notification.tpl @@ -14,6 +14,8 @@

{'Notification'|@translate}

+ + {include file='infos_errors.tpl'}

{'The RSS notification feed provides notification on news from this website : new photos, updated albums, new comments. Use a RSS feed reader.'|@translate}

diff --git a/themes/default/template/password.tpl b/themes/default/template/password.tpl index 493e1000f..2546adea2 100644 --- a/themes/default/template/password.tpl +++ b/themes/default/template/password.tpl @@ -12,25 +12,7 @@

{$title}

- {if count($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
- {/if} - - {if count($infos)} -
-
    - {foreach from=$infos item=info} -
  • {$info}
  • - {/foreach} -
-
- {/if} +{include file='infos_errors.tpl'} {if $action ne 'none'} diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index acfdc95e6..7eca7e650 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -7,24 +7,7 @@
{/if} -{if isset($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
-{/if} -{if isset($infos)} -
-
    - {foreach from=$infos item=info} -
  • {$info}
  • - {/foreach} -
-
-{/if} +{include file='infos_errors.tpl'} {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} diff --git a/themes/default/template/profile.tpl b/themes/default/template/profile.tpl index 7870cf832..0cd94c6b8 100644 --- a/themes/default/template/profile.tpl +++ b/themes/default/template/profile.tpl @@ -1,16 +1,6 @@ {if isset($MENUBAR)}{$MENUBAR}{/if}
-{if isset($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
-{/if} - +{include file='infos_errors.tpl'} + {$PROFILE_CONTENT}
diff --git a/themes/default/template/register.tpl b/themes/default/template/register.tpl index 4530ad5bf..e1ecfffc5 100644 --- a/themes/default/template/register.tpl +++ b/themes/default/template/register.tpl @@ -12,15 +12,7 @@

{'Registration'|@translate}

-{if isset($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
-{/if} +{include file='infos_errors.tpl'}
diff --git a/themes/default/template/search.tpl b/themes/default/template/search.tpl index b2b83b2b7..dd40a66c1 100644 --- a/themes/default/template/search.tpl +++ b/themes/default/template/search.tpl @@ -30,15 +30,7 @@

{'Search'|@translate}

-{if isset($errors) } -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
-{/if} +{include file='infos_errors.tpl'}
diff --git a/themes/default/template/tags.tpl b/themes/default/template/tags.tpl index 88c781142..2858ae9f3 100644 --- a/themes/default/template/tags.tpl +++ b/themes/default/template/tags.tpl @@ -20,6 +20,8 @@

{'Tags'|@translate}

+{include file='infos_errors.tpl'} + {if isset($tags)} {if $display_mode == 'cloud'}
diff --git a/themes/default/theme.css b/themes/default/theme.css index d8a219d89..73a2e0d20 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -734,14 +734,14 @@ INPUT[type="radio"], INPUT[type="checkbox"] { font-weight: bold; margin: 5px; border: 1px solid red; - background: #ffe1e1 url(icon/errors.png) no-repeat top right; + background: #ffe1e1 url(icon/errors.png) no-repeat center right; padding: 10px 50px 10px 10px; } /* Informations box */ .infos { color: #002000; - background: #98fb98 url(icon/infos.png) no-repeat top right; + background: #98fb98 url(icon/infos.png) no-repeat center right; margin: 5px; padding: 10px 50px 10px 10px; } -- cgit v1.2.3