app/views/admin/themes/edit.html.erb in disguise-0.1.3 vs app/views/admin/themes/edit.html.erb in disguise-0.2.0
- old
+ new
@@ -1,15 +1,20 @@
<h1><%= t('disguise.set_theme') %></h1>
-
-<h2><%= t('disguise.current_theme') %></h2>
<div id="current-theme">
- <% if @current_theme -%>
- <%= render :partial => 'admin/themes/theme', :object => @current_theme %>
- TODO add code to remove all themes so that the application uses the default app layout.
+ <% if DomainTheme.use_domain_themes? -%>
+ <%= t('disguise.use_domain_themes') %>
<% else -%>
- <%= t('disguise.no_current_theme') %>
+ <h2><%= t('disguise.name_theme') %></h2>
+ <% if @current_theme -%>
+ <%= render :partial => 'admin/themes/theme', :object => @current_theme %>
+ <% form_for @theme, :url => admin_theme_path, :html => { :method => :put } do |f| -%>
+ <%= f.hidden_field :name, :value => '' %>
+ <%= submit_tag t('disguise.remove_all_themes') %>
+ <% end -%>
+ <% else -%>
+ <%= t('disguise.no_current_theme') %>
+ <% end -%>
<% end -%>
</div>
-
<h2><%= t('disguise.activate_theme_message') %></h2>
<%= error_messages_for :theme %>
-<%= render :partial => 'admin/themes/theme', :collection => @themes %>
\ No newline at end of file
+<%= render :partial => 'admin/themes/theme', :collection => @themes %>