Skip to content

Commit

Permalink
Add background highlight to currently active theme in admin
Browse files Browse the repository at this point in the history
Instead of a small bit of italic text, mark out the current theme
in use with an alert DIV. Clearer, quick to see if you have many
themes to choose from.

Tidy up the if-else block uses as the contents are mostly different
between inactive choices and the active one.

"Use this theme" sounded more direct and action packed than
"Choose this theme" for the button.

Cleans up language file definitions orphaned by removal of
references to Typogarden and installing themes in
commit 82c73cd
  • Loading branch information
randomecho committed Feb 23, 2013
1 parent 4dbbc8c commit 352ee29
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 83 deletions.
26 changes: 13 additions & 13 deletions app/views/admin/themes/index.html.erb
Expand Up @@ -6,27 +6,27 @@
<% if i == 0 %>
<div class='row'>
<% end %>

<div class='span6'>
<% if j > 1 %>
<hr />
<% end %>
<h4><%= theme.name %></h4>
<% if theme.path == @active.path -%>
<div class='alert container-fluid'>
<h3><%= theme.name %> - <%= _("Active theme")%></h3>
<%= image_tag(url_for(:action => 'preview', :theme => theme.name, :skip_relative_url_root => true)) %>
<%= theme.description_html %>
<% else %>
<%= link_to(image_tag(url_for(:action => 'preview', :theme => theme.name, :skip_relative_url_root => true)), :action => 'switchto', :theme => theme.name) %>
<% end %>
<%= theme.description_html %>
<% if theme.path == @active.path -%>
<p><em>(<%= _("Active theme")%>)</em></p>
<% else -%>
<p><%= link_to(_("Chose this theme"), {:action => 'switchto', :theme => theme.name}, :class => 'btn btn-info') %></p>
<% end -%>
<div class='container-fluid'>
<h4><%= link_to(theme.name, {:action => 'switchto', :theme => theme.name}, :title => _("Use this theme")) %></h4>
<%= link_to(image_tag(url_for(:action => 'preview', :theme => theme.name, :skip_relative_url_root => true)),
{:action => 'switchto', :theme => theme.name}, :title => _("Use this theme")) %>
<%= theme.description_html %>
<p><%= link_to(_("Use this theme"), {:action => 'switchto', :theme => theme.name}, :class => 'btn btn-info') %></p>
<% end -%>
</div>
</div>

<% if i == 1 %>
</div>
<% end%>
<% end %>
<% i = (i == 0) ? 1 : 0%>
<% j += 1 %>
<% end %>
6 changes: 1 addition & 5 deletions lang/da_DK.rb
Expand Up @@ -586,13 +586,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Aktiv tema"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Vælg et tema"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/de_DE.rb
Expand Up @@ -586,13 +586,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Aktives Motiv"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Motiv auswählen"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/es_MX.rb
Expand Up @@ -589,13 +589,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Tema activo"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Escoge un tema"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
5 changes: 1 addition & 4 deletions lang/fr_FR.rb
Expand Up @@ -571,11 +571,8 @@

# app/views/admin/themes/index.html.erb
l.store "Active theme", "Thème actif"
l.store "Chose this theme", "Choisir ce thème"
l.store "Choose a theme", "Sélectionnez un thème"
l.store "Design", "Personnalisation"
l.store "Choose theme", "Choisir un thème"
l.store "Customize sidebar", "Greffons"
l.store "Use this theme", "Choisir ce thème"

# app/views/admin/users/_form.html.erb
l.store "Account settings", "Paramètres du compte"
Expand Down
6 changes: 1 addition & 5 deletions lang/he_IL.rb
Expand Up @@ -587,13 +587,9 @@
l.store "Theme editor", "עורך העיצוב"

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "עיצוב פעיל"
l.store "Get more themes", "קבל עיצובים נוספים"
l.store "You can download third party themes from officially supported %s ", "תוכל להוריד עיצובים נוספים מהאתר %s"
l.store "Typogarden", "Typogarden"
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", "כדי להתקין עיצוב עליך תצטרך להעלות אותא אל ספריית העיצובים שלך (Themes). ברגע שהעיצוב הועלה תוכל לראות בדף זה."
l.store "Choose a theme", "בחר עיצוב"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/it_IT.rb
Expand Up @@ -587,13 +587,9 @@
l.store "Theme editor", "Editor dei temi"

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Tema Attivo"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Seleziona un tema"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/ja_JP.rb
Expand Up @@ -586,13 +586,9 @@
l.store "Theme editor", "テーマエディタ"

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "現在のテーマ"
l.store "Get more themes", "他のテーマの入手"
l.store "You can download third party themes from officially supported %s ", "公式サイト%sからサードパーティのテーマをダウンロードできます。"
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", "テーマをインストールするには、アプリケーションのthemes/ディレクトリに任意のテーマのフォルダをアップロードしてください。そうすればそのテーマをこのページで閲覧することができます。"
l.store "Choose a theme", "テーマの選択"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/lt_LT.rb
Expand Up @@ -587,13 +587,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Aktives Motiv"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Motiv auswählen"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
7 changes: 1 addition & 6 deletions lang/nb_NO.rb
Expand Up @@ -598,14 +598,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Aktivt tema"
l.store "Chose this theme", "Velg dette temaet"
l.store "Get more themes", "Hent flere temaer"
l.store "You can download third party themes from officially supported %s ", "Du kan laste ned tredjepartstemaer fra offisielt støttede %s "
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", "For å installere et tema må du laste opp temakatalogen til themes-katalogen til Typo. Når et tema er lastet opp, vil du se det på denne siden."
l.store "Choose a theme", "Velg et tema"
l.store "Use this theme", "Velg dette temaet"

# app/views/admin/users/_form.html.erb
l.store "Account settings", "Kontoinnstillinger"
Expand Down
6 changes: 1 addition & 5 deletions lang/nl_NL.rb
Expand Up @@ -582,13 +582,9 @@
l.store "Theme editor", "Thema editor"

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Actieve thema's"
l.store "Get more themes", "Haal meer thema's op"
l.store "You can download third party themes from officially supported %s ", "Je kunt thema's van derden downloaden van officieel ondersteunde %s "
l.store "Typogarden", "Typogarden"
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", "Om een thema te installeren moet je het uploaden in de themes map. Zodra het is geupload zou je het op deze pagina moeten zien."
l.store "Choose a theme", "Kies een thema"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", "Account instellingen"
Expand Down
6 changes: 1 addition & 5 deletions lang/pl_PL.rb
Expand Up @@ -590,13 +590,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Temat aktywny"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", ""
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/ro_RO.rb
Expand Up @@ -587,13 +587,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "Tema activă"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "Alege o temă"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/zh_CN.rb
Expand Up @@ -594,13 +594,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "執行中主題"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "選擇主題"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down
6 changes: 1 addition & 5 deletions lang/zh_TW.rb
Expand Up @@ -586,13 +586,9 @@
l.store "Theme editor", ""

# app/views/admin/themes/index.html.erb
l.store "Choose theme", ""
l.store "Active theme", "執行中主題"
l.store "Get more themes", ""
l.store "You can download third party themes from officially supported %s ", ""
l.store "Typogarden", ""
l.store "To install a theme you just need to upload the theme folder into your themes directory. Once a theme is uploaded, you should see it on this page.", ""
l.store "Choose a theme", "選擇主題"
l.store "Use this theme", ""

# app/views/admin/users/_form.html.erb
l.store "Account settings", ""
Expand Down

0 comments on commit 352ee29

Please sign in to comment.