web-app-theme-rails 0.1.0
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/LICENSE +21 -0
- data/README.rdoc +86 -0
- data/lib/generators/web_app_theme.rb +105 -0
- data/lib/generators/web_app_theme/controller/controller_generator.rb +21 -0
- data/lib/generators/web_app_theme/controller/templates/view.html.erb +2 -0
- data/lib/generators/web_app_theme/controller/templates/view.html.haml +2 -0
- data/lib/generators/web_app_theme/layout/USAGE +36 -0
- data/lib/generators/web_app_theme/layout/layout_generator.rb +76 -0
- data/lib/generators/web_app_theme/layout/templates/config/locales/de_de.yml +15 -0
- data/lib/generators/web_app_theme/layout/templates/config/locales/pt_br.yml +12 -0
- data/lib/generators/web_app_theme/layout/templates/images/avatar.png +0 -0
- data/lib/generators/web_app_theme/layout/templates/images/icons/application_edit.png +0 -0
- data/lib/generators/web_app_theme/layout/templates/images/icons/cross.png +0 -0
- data/lib/generators/web_app_theme/layout/templates/images/icons/key.png +0 -0
- data/lib/generators/web_app_theme/layout/templates/images/icons/tick.png +0 -0
- data/lib/generators/web_app_theme/layout/templates/javascripts/jquery-1.3.min.js +19 -0
- data/lib/generators/web_app_theme/layout/templates/javascripts/jquery.localscroll.js +104 -0
- data/lib/generators/web_app_theme/layout/templates/javascripts/jquery.scrollTo.js +150 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/base.css +397 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/amro/style.css +357 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/bec-green/style.css +290 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/bec/style.css +301 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/blue/style.css +280 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/default/style.css +274 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/djime-cerulean/style.css +298 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/drastic-dark/style.css +373 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/kathleene/style.css +272 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/olive/style.css +338 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/orange/style.css +263 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/reidb-greenish/style.css +301 -0
- data/lib/generators/web_app_theme/layout/templates/stylesheets/themes/warehouse/style.css +391 -0
- data/lib/generators/web_app_theme/layout/templates/view_layout_administration.html.erb +47 -0
- data/lib/generators/web_app_theme/layout/templates/view_layout_administration.html.haml +32 -0
- data/lib/generators/web_app_theme/layout/templates/view_layout_sign.html.erb +17 -0
- data/lib/generators/web_app_theme/layout/templates/view_layout_sign.html.haml +12 -0
- data/lib/generators/web_app_theme/layout/templates/web_app_theme_override.css +1 -0
- data/lib/generators/web_app_theme/mailer/mailer_generator.rb +20 -0
- data/lib/generators/web_app_theme/mailer/templates/view.text.erb +3 -0
- data/lib/generators/web_app_theme/mailer/templates/view.text.haml +3 -0
- data/lib/generators/web_app_theme/scaffold/scaffold_generator.rb +57 -0
- data/lib/generators/web_app_theme/scaffold/templates/rails/_form.html.erb +23 -0
- data/lib/generators/web_app_theme/scaffold/templates/rails/edit.html.erb +6 -0
- data/lib/generators/web_app_theme/scaffold/templates/rails/index.html.erb +27 -0
- data/lib/generators/web_app_theme/scaffold/templates/rails/new.html.erb +5 -0
- data/lib/generators/web_app_theme/scaffold/templates/rails/show.html.erb +12 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_edit.html.erb +19 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_edit.html.haml +13 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_form.html.erb +13 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_form.html.haml +11 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_new.html.erb +18 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_new.html.haml +12 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_show.html.erb +25 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_show.html.haml +18 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_sidebar.html.erb +13 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_sidebar.html.haml +10 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_signin.html.erb +36 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_signin.html.haml +22 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_signup.html.erb +52 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_signup.html.haml +32 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_tables.html.erb +54 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_tables.html.haml +36 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_text.html.erb +18 -0
- data/lib/generators/web_app_theme/scaffold/templates/web_app_theme/view_text.html.haml +15 -0
- data/lib/web-app-theme-rails.rb +2 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/web-app-theme-rails_spec.rb +7 -0
- metadata +145 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<title><%= options[:app_name] %></title>
|
|
6
|
+
<%%= stylesheet_link_tag "web_app_theme", "web_app_theme_override", "themes/<%= options[:theme] %>/style", :cache => true %>
|
|
7
|
+
<%%= javascript_include_tag :defaults %>
|
|
8
|
+
<%%= csrf_meta_tag %>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="container">
|
|
12
|
+
<div id="header">
|
|
13
|
+
<h1><a href="/"><%= options[:app_name] %></a></h1>
|
|
14
|
+
<div id="user-navigation">
|
|
15
|
+
<ul class="wat-cf">
|
|
16
|
+
<li><a href="#"><%%= t("web-app-theme.profile", :default => "Profile") %></a></li>
|
|
17
|
+
<li><a href="#"><%%= t("web-app-theme.settings", :default => "Settings") %></a></li>
|
|
18
|
+
<li><a href="/logout" class="logout"><%%= t("web-app-theme.logout", :default => "Logout") %></a></li>
|
|
19
|
+
</ul>
|
|
20
|
+
</div>
|
|
21
|
+
<div id="main-navigation">
|
|
22
|
+
<ul class="wat-cf"></ul>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div id="wrapper" class="wat-cf">
|
|
26
|
+
<div class="flash">
|
|
27
|
+
<%% flash.each do |type, message| -%>
|
|
28
|
+
<div class="message <%%= type %>">
|
|
29
|
+
<p><%%= message %></p>
|
|
30
|
+
</div>
|
|
31
|
+
<%% end -%>
|
|
32
|
+
</div>
|
|
33
|
+
<div id="main">
|
|
34
|
+
<%%= yield %>
|
|
35
|
+
<div id="footer">
|
|
36
|
+
<div class="block">
|
|
37
|
+
<p>Copyright © <%%= Time.now.year %> <%= options[:app_name] %>.</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div id="sidebar">
|
|
42
|
+
<%%= yield :sidebar %>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
!!! Strict
|
|
2
|
+
%html
|
|
3
|
+
%head
|
|
4
|
+
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
|
|
5
|
+
%title <%= options[:app_name] %>
|
|
6
|
+
= stylesheet_link_tag "web_app_theme", "web_app_theme_override", "themes/<%= options[:theme] %>/style", :cache => true
|
|
7
|
+
= javascript_include_tag :defaults
|
|
8
|
+
= csrf_meta_tag
|
|
9
|
+
%body
|
|
10
|
+
#container
|
|
11
|
+
#header
|
|
12
|
+
%h1 <a href="/"><%= options[:app_name] %></a>
|
|
13
|
+
#user-navigation
|
|
14
|
+
%ul.wat-cf
|
|
15
|
+
<li><a href="#">#{ t("web-app-theme.profile", :default => "Profile") }</a></li>
|
|
16
|
+
<li><a href="#">#{ t("web-app-theme.settings", :default => "Settings") }</a></li>
|
|
17
|
+
<li><a href="/logout" class="logout">#{ t("web-app-theme.logout", :default => "Logout") }</a></li>
|
|
18
|
+
<div id="main-navigation">
|
|
19
|
+
<ul class="wat-cf"></ul>
|
|
20
|
+
</div>
|
|
21
|
+
#wrapper.wat-cf
|
|
22
|
+
.flash
|
|
23
|
+
- flash.each do |type, message|
|
|
24
|
+
.message{:class => type.to_s}
|
|
25
|
+
<p>#{ message }</p>
|
|
26
|
+
#main
|
|
27
|
+
= yield
|
|
28
|
+
#footer
|
|
29
|
+
.block
|
|
30
|
+
<p>Copyright © #{ Time.now.year } <%= options[:app_name] %>.</p>
|
|
31
|
+
#sidebar
|
|
32
|
+
= yield :sidebar
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<title><%= options[:app_name] %></title>
|
|
6
|
+
<%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style", :cache => true %>
|
|
7
|
+
<%%= javascript_include_tag :defaults %>
|
|
8
|
+
<%%= csrf_meta_tag %>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="container">
|
|
12
|
+
<div id="box">
|
|
13
|
+
<%%= yield %>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
!!! Strict
|
|
2
|
+
%html
|
|
3
|
+
%head
|
|
4
|
+
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
|
|
5
|
+
%title <%= options[:app_name] %>
|
|
6
|
+
= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style", :cache => true
|
|
7
|
+
= javascript_include_tag :defaults
|
|
8
|
+
= csrf_meta_tag
|
|
9
|
+
%body
|
|
10
|
+
#container
|
|
11
|
+
#box
|
|
12
|
+
= yield
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Override here any style definide by web-app-theme */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'generators/web_app_theme'
|
|
2
|
+
|
|
3
|
+
module WebAppTheme
|
|
4
|
+
module Generators
|
|
5
|
+
class MailerGenerator < Base
|
|
6
|
+
argument :actions, :type => :array, :default => [], :banner => "method method"
|
|
7
|
+
|
|
8
|
+
def create_view_folder
|
|
9
|
+
empty_directory File.join("app/views", file_path)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def create_view_files
|
|
13
|
+
actions.each do |action|
|
|
14
|
+
@action, @path = action, File.join(file_path, action)
|
|
15
|
+
template "view.text.haml", File.join("app/views", "#{@path}.text.haml")
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
require 'generators/web_app_theme'
|
|
2
|
+
require 'rails/generators/resource_helpers'
|
|
3
|
+
|
|
4
|
+
module WebAppTheme
|
|
5
|
+
module Generators
|
|
6
|
+
class ScaffoldGenerator < Base
|
|
7
|
+
include Rails::Generators::ResourceHelpers
|
|
8
|
+
|
|
9
|
+
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
|
|
10
|
+
|
|
11
|
+
class_option :style, :type => :string, :default => 'web_app_theme', :desc => "'web_app_theme'-views or the normal 'rails'-views"
|
|
12
|
+
class_option :singleton, :type => :boolean, :desc => "Supply to skip index view"
|
|
13
|
+
|
|
14
|
+
hook_for :layout, :as => 'web_app_theme', :type => :boolean, :desc => "Generates a web_app_theme:layout for the controller with the same name as the controller."
|
|
15
|
+
|
|
16
|
+
def create_root_folder
|
|
17
|
+
empty_directory File.join("app/views", controller_file_path)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def copy_index_file
|
|
21
|
+
return if options[:singleton]
|
|
22
|
+
copy_view :index, :tables
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def copy_edit_file
|
|
26
|
+
copy_view :edit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def copy_show_file
|
|
30
|
+
copy_view :show
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def copy_new_file
|
|
34
|
+
copy_view :new
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def copy_form_file
|
|
38
|
+
copy_view :_form, :form
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def copy_sidebar
|
|
42
|
+
return unless options[:style] == "web_app_theme"
|
|
43
|
+
copy_view :_sidebar, :sidebar
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
protected
|
|
47
|
+
|
|
48
|
+
def copy_view(view, inview = view)
|
|
49
|
+
infile = (options[:style] == "web_app_theme") ? "web_app_theme/view_#{inview}.html.#{extension}" : "rails/#{view}.html.#{extension}"
|
|
50
|
+
outfile = "#{view}.html.#{extension}"
|
|
51
|
+
|
|
52
|
+
template infile, File.join("app/views", controller_file_path, outfile)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<%%= form_for(@<%= singular_table_name %>) do |f| %>
|
|
2
|
+
<%% if @<%= singular_table_name %>.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
|
|
8
|
+
<li><%%= msg %></li>
|
|
9
|
+
<%% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<%% end %>
|
|
13
|
+
|
|
14
|
+
<% for attribute in attributes -%>
|
|
15
|
+
<div class="field">
|
|
16
|
+
<%%= f.label :<%= attribute.name %> %><br />
|
|
17
|
+
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
|
|
18
|
+
</div>
|
|
19
|
+
<% end -%>
|
|
20
|
+
<div class="actions">
|
|
21
|
+
<%%= f.submit %>
|
|
22
|
+
</div>
|
|
23
|
+
<%% end %>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<h1>Listing <%= plural_table_name %></h1>
|
|
2
|
+
|
|
3
|
+
<table>
|
|
4
|
+
<tr>
|
|
5
|
+
<% for attribute in attributes -%>
|
|
6
|
+
<th><%= attribute.human_name %></th>
|
|
7
|
+
<% end -%>
|
|
8
|
+
<th></th>
|
|
9
|
+
<th></th>
|
|
10
|
+
<th></th>
|
|
11
|
+
</tr>
|
|
12
|
+
|
|
13
|
+
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
|
14
|
+
<tr>
|
|
15
|
+
<% for attribute in attributes -%>
|
|
16
|
+
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
|
|
17
|
+
<% end -%>
|
|
18
|
+
<td><%%= link_to 'Show', <%= singular_table_name %> %></td>
|
|
19
|
+
<td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
|
|
20
|
+
<td><%%= link_to 'Destroy', <%= singular_table_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
|
|
21
|
+
</tr>
|
|
22
|
+
<%% end %>
|
|
23
|
+
</table>
|
|
24
|
+
|
|
25
|
+
<br />
|
|
26
|
+
|
|
27
|
+
<%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<p id="notice"><%%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<% for attribute in attributes -%>
|
|
4
|
+
<p>
|
|
5
|
+
<b><%= attribute.human_name %>:</b>
|
|
6
|
+
<%%= @<%= singular_table_name %>.<%= attribute.name %> %>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<% end -%>
|
|
10
|
+
|
|
11
|
+
<%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
|
|
12
|
+
<%%= link_to 'Back', <%= index_helper %>_path %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
|
5
|
+
<li><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
|
6
|
+
<li class="active"><%%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path %></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="content">
|
|
10
|
+
<h2 class="title"><%%= t("web-app-theme.edit", :default => "Edit") %> <%= model_name %></h2>
|
|
11
|
+
<div class="inner">
|
|
12
|
+
<%% form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => :form } do |f| -%>
|
|
13
|
+
<%%= render :partial => "form", :locals => {:f => f} %>
|
|
14
|
+
<%% end -%>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<%% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.block
|
|
2
|
+
.secondary-navigation
|
|
3
|
+
%ul.wat-cf
|
|
4
|
+
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
|
5
|
+
%li= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
|
6
|
+
%li.active= link_to t("web-app-theme.edit", :default => "Edit"), edit_<%= singular_controller_routing_path %>_path
|
|
7
|
+
.content
|
|
8
|
+
%h2.title #{ t("web-app-theme.edit", :default => "Edit") } <%= model_name %>
|
|
9
|
+
.inner
|
|
10
|
+
- form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => :form } do |f|
|
|
11
|
+
= render :partial => "form", :locals => {:f => f}
|
|
12
|
+
|
|
13
|
+
- content_for :sidebar, render(:partial => 'sidebar')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<% columns.each do |column| %>
|
|
2
|
+
<div class="group">
|
|
3
|
+
<%%= f.label :<%= column.name %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label %>
|
|
4
|
+
<%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
|
|
5
|
+
<span class="description">Ex: a simple text</span>
|
|
6
|
+
</div>
|
|
7
|
+
<%- end -%>
|
|
8
|
+
<div class="group navform wat-cf">
|
|
9
|
+
<button class="button" type="submit">
|
|
10
|
+
<%%= image_tag("web-app-theme/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%%= t("web-app-theme.save", :default => "Save") %>
|
|
11
|
+
</button>
|
|
12
|
+
<%%= link_to raw("#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.cancel", :default => "Cancel")}")} #{t("web-app-theme.cancel", :default => "Cancel")}"), <%= controller_routing_path %>_path, :class => "button" %>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<% columns.each do |column| %>
|
|
2
|
+
.group
|
|
3
|
+
= f.label :<%= column.name %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label
|
|
4
|
+
= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
|
|
5
|
+
<span class="description">Ex: a simple text</span>
|
|
6
|
+
<%- end -%>
|
|
7
|
+
.group.navform.wat-cf
|
|
8
|
+
%button.button{:type => 'submit'}
|
|
9
|
+
= image_tag("web-app-theme/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}")
|
|
10
|
+
= t("web-app-theme.save", :default => "Save")
|
|
11
|
+
= link_to raw("#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.cancel", :default => "Cancel")}")} #{t("web-app-theme.cancel", :default => "Cancel")}"), <%= controller_routing_path %>_path, :class => "button"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
|
5
|
+
<li class="active"><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
|
6
|
+
</ul>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="content">
|
|
9
|
+
<h2 class="title"><%%= t("web-app-theme.new", :default => "New")%> <%= model_name %></h2>
|
|
10
|
+
<div class="inner">
|
|
11
|
+
<%% form_for :<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f| -%>
|
|
12
|
+
<%%= render :partial => "form", :locals => {:f => f} %>
|
|
13
|
+
<%% end -%>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<%% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.block
|
|
2
|
+
.secondary-navigation
|
|
3
|
+
%ul.wat-cf
|
|
4
|
+
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
|
5
|
+
%li.active= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
|
6
|
+
.content
|
|
7
|
+
%h2.title #{ t("web-app-theme.new", :default => "New")} <%= model_name %>
|
|
8
|
+
.inner
|
|
9
|
+
- form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
|
|
10
|
+
= render :partial => "form", :locals => {:f => f}
|
|
11
|
+
|
|
12
|
+
- content_for :sidebar, render(:partial => 'sidebar')
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
|
|
5
|
+
<li><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
|
|
6
|
+
<li class="active"><%%= link_to "#{t("web-app-theme.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="content">
|
|
10
|
+
<div class="inner">
|
|
11
|
+
<% columns.each do |column| %>
|
|
12
|
+
<p>
|
|
13
|
+
<b><%%= t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= column.name %>", :default => t("activerecord.labels.<%= column.name %>", :default => "<%= column.name.humanize %>")) %>:</b>
|
|
14
|
+
<%%= @<%= resource_name %>.<%= column.name %> %>
|
|
15
|
+
</p>
|
|
16
|
+
<%- end -%>
|
|
17
|
+
<div class="wat-cf">
|
|
18
|
+
<%%= link_to raw("#{image_tag("web-app-theme/application_edit.png", :alt => "#{t("web-app-theme.edit", :default=> "Edit")}")} #{t("web-app-theme.edit", :default=> "Edit")}"), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => "button" %>
|
|
19
|
+
<%%= link_to raw("#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.delete", :default=> "Delete")}")} #{t("web-app-theme.delete", :default => "Delete")}"), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :class => "button", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<%% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.block
|
|
2
|
+
.secondary-navigation
|
|
3
|
+
%ul.wat-cf
|
|
4
|
+
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
|
5
|
+
%li= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
|
6
|
+
%li.active= link_to t("web-app-theme.show", :default => "Show"), <%= singular_controller_routing_path %>_path
|
|
7
|
+
.content
|
|
8
|
+
.inner
|
|
9
|
+
<% columns.each do |column| -%>
|
|
10
|
+
%p
|
|
11
|
+
<b>#{ t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= column.name %>", :default => t("activerecord.labels.<%= column.name %>", :default => "<%= column.name.humanize %>")) }:</b>
|
|
12
|
+
= @<%= resource_name %>.<%= column.name %>
|
|
13
|
+
<% end -%>
|
|
14
|
+
.wat-cf
|
|
15
|
+
#{ link_to raw("#{image_tag("web-app-theme/application_edit.png", :alt => t("web-app-theme.edit", :default=> "Edit"))} #{t("web-app-theme.edit", :default=> "Edit")}"), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => "button" }
|
|
16
|
+
#{ link_to raw("#{image_tag("web-app-theme/cross.png", :alt => t("web-app-theme.delete", :default=> "Delete"))} #{t("web-app-theme.delete", :default => "Delete")}"), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :class => "button", :confirm => t("web-app-theme.confirm", :default => "Are you sure?") }
|
|
17
|
+
|
|
18
|
+
- content_for :sidebar, render(:partial => 'sidebar')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<h3>Simple Block</h3>
|
|
3
|
+
<div class="content">
|
|
4
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="block">
|
|
8
|
+
<h3>Links</h3>
|
|
9
|
+
<ul class="navigation">
|
|
10
|
+
<li><a href="#">Link 1</a></li>
|
|
11
|
+
<li><a href="#">Link 2</a></li>
|
|
12
|
+
</ul>
|
|
13
|
+
</div>
|