disguise 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/controllers/admin/disguise/themes_controller.rb +5 -1
- data/app/views/admin/themes/_theme.html.erb +1 -1
- data/app/views/admin/themes/edit.html.erb +1 -1
- data/disguise.gemspec +2 -2
- data/locales/en.yml +2 -1
- data/test/rails_root/test/functional/admin/domain_themes_controller_test.rb +12 -3
- metadata +2 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.4
|
|
@@ -21,7 +21,11 @@ class Admin::Disguise::ThemesController < ApplicationController
|
|
|
21
21
|
def update
|
|
22
22
|
@theme.update_attributes!(params[:theme])
|
|
23
23
|
respond_to do |format|
|
|
24
|
-
|
|
24
|
+
if @theme.name.blank?
|
|
25
|
+
flash[:notice] = t('disguise.theme_removed')
|
|
26
|
+
else
|
|
27
|
+
flash[:notice] = t('disguise.theme_updated')
|
|
28
|
+
end
|
|
25
29
|
format.html { redirect_to edit_admin_theme_path }
|
|
26
30
|
end
|
|
27
31
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<h3><%= theme[:name] %></h3>
|
|
3
3
|
<% form_for @theme, :url => admin_theme_path, :html => { :method => :put } do |f| -%>
|
|
4
4
|
<%= f.hidden_field :name, :value => theme[:name] %>
|
|
5
|
-
<%= image_submit_tag theme[:preview_image] %>
|
|
5
|
+
<%= image_submit_tag theme[:preview_image], :id => "#{theme[:name].parameterize}", :name => "#{theme[:name].parameterize}" %>
|
|
6
6
|
<%= theme[:description] %>
|
|
7
7
|
<% end -%>
|
|
8
8
|
<% if DomainTheme.use_domain_themes? -%>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<%= render :partial => 'admin/themes/theme', :object => @current_theme %>
|
|
9
9
|
<% form_for @theme, :url => admin_theme_path, :html => { :method => :put } do |f| -%>
|
|
10
10
|
<%= f.hidden_field :name, :value => '' %>
|
|
11
|
-
<%= submit_tag t('disguise.remove_all_themes') %>
|
|
11
|
+
<%= submit_tag t('disguise.remove_all_themes'), :id => 'remove_all_themes', :name => 'remove_all_themes' %>
|
|
12
12
|
<% end -%>
|
|
13
13
|
<% else -%>
|
|
14
14
|
<%= t('disguise.no_current_theme') %>
|
data/disguise.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{disguise}
|
|
5
|
-
s.version = "0.3.
|
|
5
|
+
s.version = "0.3.4"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Justin Ball"]
|
|
9
|
-
s.date = %q{2009-07-
|
|
9
|
+
s.date = %q{2009-07-22}
|
|
10
10
|
s.description = %q{Add themes to your Rails application to easily change the view layer and impress everyone you know}
|
|
11
11
|
s.email = %q{justinball@gmail.com}
|
|
12
12
|
s.extra_rdoc_files = [
|
data/locales/en.yml
CHANGED
|
@@ -15,4 +15,5 @@ en:
|
|
|
15
15
|
theme_uri_label: Url for Theme
|
|
16
16
|
uris_title: "This theme will be displayed for all the following urls"
|
|
17
17
|
error_creating_domain_theme: "There was a problem adding the url: {{error}}"
|
|
18
|
-
uri_deleted: "The specified url has been deleted"
|
|
18
|
+
uri_deleted: "The specified url has been deleted"
|
|
19
|
+
theme_removed: "All themes have been removed"
|
|
@@ -2,10 +2,9 @@ require File.dirname(__FILE__) + '/../../test_helper'
|
|
|
2
2
|
|
|
3
3
|
class Admin::DomainThemesControllerTest < ActionController::TestCase
|
|
4
4
|
|
|
5
|
+
tests Admin::DomainThemesController
|
|
6
|
+
|
|
5
7
|
def setup
|
|
6
|
-
@controller = Admin::DomainThemesController.new
|
|
7
|
-
@request = ActionController::TestRequest.new
|
|
8
|
-
@response = ActionController::TestResponse.new
|
|
9
8
|
@new_uri = 'red.example.com'
|
|
10
9
|
end
|
|
11
10
|
|
|
@@ -35,4 +34,14 @@ class Admin::DomainThemesControllerTest < ActionController::TestCase
|
|
|
35
34
|
should_redirect_to("edit theme") { edit_admin_theme_path }
|
|
36
35
|
end
|
|
37
36
|
|
|
37
|
+
context "DELETE to destroy" do
|
|
38
|
+
setup do
|
|
39
|
+
@domain_theme = Factory(:domain_theme)
|
|
40
|
+
delete :destroy, :id => @domain_theme.to_param
|
|
41
|
+
end
|
|
42
|
+
should_set_the_flash_to(I18n.t('disguise.uri_deleted'))
|
|
43
|
+
should_redirect_to("admin edit theme") { edit_admin_theme_path }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
|
|
38
47
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: disguise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Ball
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-07-
|
|
12
|
+
date: 2009-07-22 00:00:00 -06:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|