diff --git a/app/models/environment.rb b/app/models/environment.rb
index 71b8639..dd74905 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -48,6 +48,7 @@ class Environment < ActiveRecord::Base
'select_preferred_domain' => _('Select preferred domains per profile'),
'display_wizard_signup' => _('Display wizard signup'),
'use_portal_community' => _('Use the portal as news source for front page'),
+ 'user_themes' => N_('Allow users to create their own themes'),
}
end
diff --git a/app/views/themes/index.rhtml b/app/views/themes/index.rhtml
index 7ae5906..a63c598 100644
--- a/app/views/themes/index.rhtml
+++ b/app/views/themes/index.rhtml
@@ -65,31 +65,34 @@
<% end %>
-
-
- <%= _('My themes') %>
- |
-
- <% for themes in profile.themes.in_groups_of(3) %>
+ <% if environment.enabled?('user_themes') %>
- <% for theme in themes %>
-
- <%# FIXME add proper thumbnails %>
- <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) if theme %>
- |
-
- <%= theme.name if theme%>
- <%= link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) if theme %>
-
- <%= link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) if theme %>
- |
-
-
- |
- <% end %>
+
+ <%= _('My themes') %>
+ |
- |
+ <% for themes in profile.themes.in_groups_of(3) %>
+
+ <% for theme in themes %>
+
+ <%# FIXME add proper thumbnails %>
+ <%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) if theme %>
+ |
+
+ <%= theme.name if theme%>
+ <%= link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) if theme %>
+
+ <%= link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) if theme %>
+ |
+
+
+ |
+ <% end %>
+
+ |
+ <% end %>
<% end %>
+
<% button_bar do %>
--
libgit2 0.21.2