app-themer 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -7
- data/VERSION +1 -1
- data/app-themer.gemspec +1 -1
- data/lib/generators/app_themer/layout/layout_generator.rb +8 -8
- data/lib/generators/app_themer/layout/templates/admin.html.erb +6 -6
- data/lib/generators/app_themer/views/templates/_form.html.erb +2 -2
- data/lib/generators/app_themer/views/templates/edit.html.erb +4 -4
- data/lib/generators/app_themer/views/templates/new.html.erb +3 -3
- data/lib/generators/app_themer/views/templates/show.html.erb +5 -5
- data/lib/generators/app_themer/views/templates/tables.html.erb +7 -7
- data/lib/generators/app_themer/views/views_generator.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -8,7 +8,7 @@ it wants to be an idea to start developing a complete web application layout.
|
|
8
8
|
Installation
|
9
9
|
------------
|
10
10
|
|
11
|
-
You can use app-themer with Rails 3. Specify the
|
11
|
+
You can use app-themer with Rails 3. Specify the app-themer gem in your Gemfile, only for :development and :test
|
12
12
|
|
13
13
|
group :development, :test do
|
14
14
|
gem 'app-themer'
|
@@ -93,7 +93,7 @@ If you want to show form error messages inside the generated forms, use the foll
|
|
93
93
|
If you want to have translated pages, simple create in your locale.yml the keys just like config/locales/en_us.yml example.
|
94
94
|
|
95
95
|
en_us:
|
96
|
-
|
96
|
+
app-themer:
|
97
97
|
save: Save
|
98
98
|
cancel: Cancel
|
99
99
|
list: List
|
@@ -120,11 +120,11 @@ Contributing
|
|
120
120
|
Links
|
121
121
|
-----
|
122
122
|
|
123
|
-
* Repository: git://github.com/pilu/
|
124
|
-
* List: <http://groups.google.com/group/
|
125
|
-
* Issues: <http://github.com/pilu/
|
126
|
-
* Gem: <http://gemcutter.org/gems/
|
127
|
-
* Themes: <http://pilu.github.com/
|
123
|
+
* Repository: git://github.com/pilu/app-themer.git
|
124
|
+
* List: <http://groups.google.com/group/app-themer-generator>
|
125
|
+
* Issues: <http://github.com/pilu/app-themer/issues>
|
126
|
+
* Gem: <http://gemcutter.org/gems/app-themer>
|
127
|
+
* Themes: <http://pilu.github.com/app-themer>
|
128
128
|
|
129
129
|
Author
|
130
130
|
------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/app-themer.gemspec
CHANGED
@@ -22,22 +22,22 @@ module AppThemer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def copy_base_stylesheets
|
25
|
-
copy_file "#{stylesheets_path}/base.css", "public/stylesheets/
|
26
|
-
copy_file "#{stylesheets_path}/handheld.css", "public/stylesheets/
|
27
|
-
copy_file "#{stylesheets_path}/override.css", "public/stylesheets/
|
25
|
+
copy_file "#{stylesheets_path}/base.css", "public/stylesheets/app-themer/base.css"
|
26
|
+
copy_file "#{stylesheets_path}/handheld.css", "public/stylesheets/app-themer/handheld.css"
|
27
|
+
copy_file "#{stylesheets_path}/override.css", "public/stylesheets/app-themer/override.css"
|
28
28
|
end
|
29
29
|
|
30
30
|
def copy_theme_stylesheets
|
31
|
-
directory "#{stylesheets_path}/themes/#{options.theme}", "public/stylesheets/
|
31
|
+
directory "#{stylesheets_path}/themes/#{options.theme}", "public/stylesheets/app-themer/themes/#{options.theme}"
|
32
32
|
end
|
33
33
|
|
34
34
|
def copy_images
|
35
|
-
directory "#{images_path}", "public/images/
|
35
|
+
directory "#{images_path}", "public/images/app-themer"
|
36
36
|
end
|
37
37
|
|
38
38
|
def copy_javascripts
|
39
|
-
copy_file "#{javascripts_path}/dd_belatedpng.js", "public/javascripts/
|
40
|
-
copy_file "#{javascripts_path}/modernizr-1.5.min.js", "public/javascripts/
|
39
|
+
copy_file "#{javascripts_path}/dd_belatedpng.js", "public/javascripts/app-themer/dd_belatedpng.js"
|
40
|
+
copy_file "#{javascripts_path}/modernizr-1.5.min.js", "public/javascripts/app-themer/modernizr-1.5.min.js"
|
41
41
|
end
|
42
42
|
|
43
43
|
protected
|
@@ -56,7 +56,7 @@ module AppThemer
|
|
56
56
|
|
57
57
|
def generate_haml_layout(layout_template)
|
58
58
|
require 'haml'
|
59
|
-
Dir.mktmpdir('
|
59
|
+
Dir.mktmpdir('app-themer-haml') do |haml_root|
|
60
60
|
tmp_html_path = "#{haml_root}/#{layout_template}"
|
61
61
|
tmp_haml_path = "#{haml_root}/#{layout_template}.haml"
|
62
62
|
template layout_template, tmp_html_path, :verbose => false
|
@@ -6,8 +6,8 @@
|
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
7
7
|
|
8
8
|
<title><%= options.app_name %></title>
|
9
|
-
<%%= stylesheet_link_tag "
|
10
|
-
<%%= javascript_include_tag "
|
9
|
+
<%%= stylesheet_link_tag "app-themer/base", "app-themer/handheld", "app-themer/themes/<%= options.theme %>/style", "app-themer/override", :cache => true %>
|
10
|
+
<%%= javascript_include_tag "app-themer/modernizr-1.5.min.js" %>
|
11
11
|
<%%= csrf_meta_tag %>
|
12
12
|
</head>
|
13
13
|
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
|
@@ -21,9 +21,9 @@
|
|
21
21
|
<h1><a href="/"><%= options.app_name %></a></h1>
|
22
22
|
<nav id="main-navigation">
|
23
23
|
<ul class="clearfix">
|
24
|
-
<li class="right"><a href="/logout" class="logout"><%%= t("
|
25
|
-
<li class="right"><a href="#"><%%= t("
|
26
|
-
<li class="right"><a href="#"><%%= t("
|
24
|
+
<li class="right"><a href="/logout" class="logout"><%%= t("app-themer.logout", :default => "Logout") %></a></li>
|
25
|
+
<li class="right"><a href="#"><%%= t("app-themer.settings", :default => "Settings") %></a></li>
|
26
|
+
<li class="right"><a href="#"><%%= t("app-themer.profile", :default => "Profile") %></a></li>
|
27
27
|
</ul>
|
28
28
|
</nav>
|
29
29
|
</header>
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<%%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" %>
|
53
53
|
|
54
54
|
<!--[if lt IE 7 ]>
|
55
|
-
<%%= javascript_include_tag "
|
55
|
+
<%%= javascript_include_tag "app-themer/dd_belatedpng.js" %>
|
56
56
|
<script>DD_belatedPNG.fix('.button img, #sidebar ul li');</script>
|
57
57
|
<![endif]-->
|
58
58
|
</body>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%- end -%>
|
8
8
|
<div class="clearfix">
|
9
9
|
<button class="button" type="submit">
|
10
|
-
<%%= image_tag("
|
10
|
+
<%%= image_tag("app-themer/icons/tick.png", :alt => "#{t("app-themer.save", :default => "Save")}") %> <%%= t("app-themer.save", :default => "Save") %>
|
11
11
|
</button>
|
12
|
-
<%%= link_to image_tag("
|
12
|
+
<%%= link_to image_tag("app-themer/icons/cross.png", :alt => "#{t("app-themer.cancel", :default => "Cancel")}") + " " + t("app-themer.cancel", :default => "Cancel"), <%= controller_routing_path %>_path, :class => "button" %>
|
13
13
|
</div>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<section>
|
2
2
|
<nav class="secondary">
|
3
3
|
<ul class="clearfix">
|
4
|
-
<li class="first"><%%= link_to "#{t("
|
5
|
-
<li><%%= link_to "#{t("
|
6
|
-
<li class="active"><%%= link_to "#{t("
|
4
|
+
<li class="first"><%%= link_to "#{t("app-themer.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
5
|
+
<li><%%= link_to "#{t("app-themer.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
6
|
+
<li class="active"><%%= link_to "#{t("app-themer.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path %></li>
|
7
7
|
</ul>
|
8
8
|
</nav>
|
9
9
|
<div class="content">
|
10
|
-
<h2><%%= t("
|
10
|
+
<h2><%%= t("app-themer.edit", :default => "Edit") %> <%= model_name %></h2>
|
11
11
|
|
12
12
|
<%%= form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => :form } do |f| -%>
|
13
13
|
<%%= render :partial => "form", :locals => {:f => f} %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<section>
|
2
2
|
<nav class="secondary">
|
3
3
|
<ul class="clearfix">
|
4
|
-
<li class="first"><%%= link_to "#{t("
|
5
|
-
<li class="active"><%%= link_to "#{t("
|
4
|
+
<li class="first"><%%= link_to "#{t("app-themer.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
5
|
+
<li class="active"><%%= link_to "#{t("app-themer.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
6
6
|
</ul>
|
7
7
|
</nav>
|
8
8
|
<div class="content">
|
9
|
-
<h2><%%= t("
|
9
|
+
<h2><%%= t("app-themer.new", :default => "New")%> <%= model_name %></h2>
|
10
10
|
<%%= form_for :<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f| -%>
|
11
11
|
<%%= render :partial => "form", :locals => {:f => f} %>
|
12
12
|
<%% end -%>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<section>
|
2
2
|
<nav class="secondary">
|
3
3
|
<ul class="clearfix">
|
4
|
-
<li class="first"><%%= link_to "#{t("
|
5
|
-
<li><%%= link_to "#{t("
|
6
|
-
<li class="active"><%%= link_to "#{t("
|
4
|
+
<li class="first"><%%= link_to "#{t("app-themer.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
5
|
+
<li><%%= link_to "#{t("app-themer.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
6
|
+
<li class="active"><%%= link_to "#{t("app-themer.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
|
7
7
|
</ul>
|
8
8
|
</nav>
|
9
9
|
<div class="content">
|
@@ -14,8 +14,8 @@
|
|
14
14
|
</p>
|
15
15
|
<%- end -%>
|
16
16
|
<div class="clearfix">
|
17
|
-
<%%= link_to image_tag("
|
18
|
-
<%%= link_to image_tag("
|
17
|
+
<%%= link_to image_tag("app-themer/icons/application_edit.png", :alt => "#{t("app-themer.edit", :default=> "Edit")}") + " " + t("app-themer.edit", :default=> "Edit"), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => "button" %>
|
18
|
+
<%%= link_to image_tag("app-themer/icons/cross.png", :alt => "#{t("app-themer.delete", :default=> "Delete")}") + " " + t("app-themer.delete", :default => "Delete"), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :class => "button", :confirm => "#{t("app-themer.confirm", :default => "Are you sure?")}" %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
</section>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<section>
|
2
2
|
<nav class="secondary">
|
3
3
|
<ul class="clearfix">
|
4
|
-
<li class="first active"><%%= link_to "#{t("
|
5
|
-
<li><%%= link_to "#{t("
|
4
|
+
<li class="first active"><%%= link_to "#{t("app-themer.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
5
|
+
<li><%%= link_to "#{t("app-themer.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
6
6
|
</ul>
|
7
7
|
</nav>
|
8
8
|
<div class="content">
|
9
|
-
<h2><%%= t("
|
9
|
+
<h2><%%= t("app-themer.all", :default => "All") %> <%= plural_model_name %></h2>
|
10
10
|
<table class="table">
|
11
11
|
<tr>
|
12
12
|
<th class="first">ID</th>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<%%= t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>")) %>
|
16
16
|
</th>
|
17
17
|
<% end -%>
|
18
|
-
<th><%%= t("
|
18
|
+
<th><%%= t("app-themer.created_at", :default => "Created at") %></th>
|
19
19
|
<th class="last"> </th>
|
20
20
|
</tr>
|
21
21
|
<%% @<%= plural_resource_name %>.each do |<%= resource_name %>| -%>
|
@@ -32,9 +32,9 @@
|
|
32
32
|
<%%= <%= resource_name %>.created_at %>
|
33
33
|
</td>
|
34
34
|
<td class="last">
|
35
|
-
<%%= link_to "#{t("
|
36
|
-
<%%= link_to "#{t("
|
37
|
-
<%%= link_to "#{t("
|
35
|
+
<%%= link_to "#{t("app-themer.show", :default => "Show")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
|
36
|
+
<%%= link_to "#{t("app-themer.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
|
37
|
+
<%%= link_to "#{t("app-themer.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("app-themer.confirm", :default => "Are you sure?")}" %>
|
38
38
|
</td>
|
39
39
|
</tr>
|
40
40
|
<%% end -%>
|
@@ -108,7 +108,7 @@ module AppThemer
|
|
108
108
|
|
109
109
|
def generate_haml_views(views)
|
110
110
|
require 'haml'
|
111
|
-
Dir.mktmpdir('
|
111
|
+
Dir.mktmpdir('app-themer-haml') do |haml_root|
|
112
112
|
views.each do |template_name, output_path|
|
113
113
|
tmp_html_path = "#{haml_root}/#{template_name}"
|
114
114
|
tmp_haml_path = "#{haml_root}/#{template_name}.haml"
|