forked from refinery/refinerycms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
better theme UI. Now shows preview image, allows you to select the th…
…eme you want to apply right now and also checks to make sure the theme directory is writable for Heroku. If it's not then disable adding and editing themes.
- Loading branch information
Showing
10 changed files
with
81 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
ActionController::Routing::Routes.draw do |map| | ||
|
||
map.resources :resources | ||
|
||
map.namespace(:admin) do |admin| | ||
admin.resources :resources, :collection => {:insert => :get} | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 23 additions & 17 deletions
40
vendor/plugins/themes/app/views/admin/themes/_theme.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
<li class='clearfix record <%= cycle("on", "on-hover") %>'> | ||
<span class='title'> | ||
<span class='actions'> | ||
<%= link_to refinery_icon_tag('page_white_put.png'), theme.public_filename, | ||
:title => "Download this theme (#{number_to_human_size(theme.size)})" %> | ||
<%= link_to refinery_icon_tag('application_edit.png'), edit_admin_theme_url(theme), | ||
:title => "Edit this theme" %> | ||
<%= link_to refinery_icon_tag('delete.png'), admin_theme_path(theme), | ||
:confirm => "Are you sure you want to delete '#{theme.title}'?", | ||
:class => "cancel", :method => :delete, | ||
:title => "Remove this theme forever" %> | ||
</span> | ||
<%=h theme.title %> | ||
<span class="preview"> | ||
- <%= number_to_human_size(theme.size) %> - <%= theme.theme_path -%> | ||
</span> | ||
</span> | ||
<li class=''> | ||
|
||
<p> | ||
<%=h theme.title %> | ||
</p> | ||
<%= image_tag(preview_image_admin_theme_url(theme), :width => 135, :height => 135) %> | ||
<p> | ||
|
||
<span class='actions'> | ||
<%= link_to refinery_icon_tag('star.png'), activate_admin_theme_url(theme) %> | ||
<%= link_to refinery_icon_tag('page_white_put.png'), theme.public_filename, | ||
:title => "Download this theme (#{number_to_human_size(theme.size)})" %> | ||
<% if Theme.first.theme_directory_is_writable? %> | ||
<%= link_to refinery_icon_tag('application_edit.png'), edit_admin_theme_url(theme), | ||
:title => "Edit this theme" %> | ||
<% end %> | ||
<%= link_to refinery_icon_tag('delete.png'), admin_theme_path(theme), | ||
:confirm => "Are you sure you want to delete '#{theme.title}'?", | ||
:class => "cancel", :method => :delete, | ||
:title => "Remove this theme forever" %> | ||
</span> | ||
</p> | ||
|
||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters