conte_rails_template 0.0.15 → 0.0.16

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.
@@ -1,3 +1,3 @@
1
1
  module ConteRailsTemplate
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -11,6 +11,16 @@ module ConteRailsTemplate #:nodoc:
11
11
  copy_file 'simple_navigation.rb', 'config/navigation.rb'
12
12
  copy_file 'wice_grid_config.rb', 'config/initializers/wice_grid_config.rb'
13
13
  copy_file 'wice_grid_local.yml', 'config/locales/wice_grid.yml'
14
+
15
+ copy_file 'shared/_breadcrumbs_default.html.erb', 'app/views/shared/_breadcrumbs_default.html.erb'
16
+ copy_file 'shared/_notification.html.erb', 'app/views/shared/_notification.html.erb'
17
+ copy_file 'shared/_page_toolbar.html.erb', 'app/views/shared/_page_toolbar.html.erb'
18
+
19
+ copy_file 'erb/scaffold/_form.html.erb', 'lib/templates/erb/scaffold/_form.html.erb'
20
+ copy_file 'erb/scaffold/edit.html.erb', 'lib/templates/erb/scaffold/edit.html.erb'
21
+ copy_file 'erb/scaffold/index.html.erb', 'lib/templates/erb/scaffold/index.html.erb'
22
+ copy_file 'erb/scaffold/new.html.erb', 'lib/templates/erb/scaffold/new.html.erb'
23
+ copy_file 'erb/scaffold/show.html.erb', 'lib/templates/erb/scaffold/show.html.erb'
14
24
  end
15
25
 
16
26
  end
@@ -0,0 +1,18 @@
1
+ <%% content_for :page_toolbar do %>
2
+ <%%= render partial: 'shared/page_toolbar', locals: {content: link_to(render_icon_and_text_content('icon-circle-arrow-left', "#{t('labels.back_to')}#{t('model.list', :model => <%= class_name.split('::').last %>.model_name.human)}"), <%= plural_table_name %>_path, class: 'btn btn-inverse')} %>
3
+ <%% end %>
4
+
5
+ <%%= simple_form_for(@<%= singular_table_name %>, :html => {:class => 'form-horizontal' }) do |f| %>
6
+ <%%= f.error_notification %>
7
+
8
+ <div class="form-inputs">
9
+ <%- attributes.each do |attribute| -%>
10
+ <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
11
+ <%- end -%>
12
+ </div>
13
+
14
+ <div class="form-actions">
15
+ <%%= f.button :submit, class: 'btn btn-inverse' %>
16
+ </div>
17
+ <%% end %>
18
+
@@ -0,0 +1,8 @@
1
+ <%% content_for :breadcrumbs do %>
2
+ <%%= render :partial => 'shared/breadcrumbs_default' %>
3
+ <%%= content_tag :li, link_to(render_icon_and_text_content('icon-file-alt', t('model.list', model: <%= class_name.split('::').last %>.model_name.human)), <%= plural_table_name %>_path) %>
4
+ <%%= content_tag :li, render_icon_and_text_content('icon-plus-sign', t('model.edit', model: <%= class_name.split('::').last %>.model_name.human)) %>
5
+ <%% end %>
6
+
7
+ <%%= render 'form' %>
8
+
@@ -0,0 +1,25 @@
1
+ <%% content_for :breadcrumbs do %>
2
+ <%%= render :partial => 'shared/breadcrumbs_default' %>
3
+ <%%= content_tag :li, render_icon_and_text_content('icon-file-alt', t('model.list', model: <%= class_name.split('::').last %>.model_name.human)) %>
4
+ <%% end %>
5
+
6
+ <%% content_for :page_toolbar do %>
7
+ <%%= render :partial => 'shared/page_toolbar', :locals => {:content => link_to(render_icon_and_text_content('icon-plus-sign', t('model.create', :model => <%= class_name.split('::').last %>.model_name.human)), new_<%= class_name.split('::').last.underscore.downcase %>_path, :class => 'btn btn-inverse')} %>
8
+ <%% end %>
9
+
10
+ <%%= render :partial => 'shared/notification' %>
11
+
12
+ <%%= grid(@<%= class_name.split('::').last.underscore.downcase.pluralize %>_grid, :show_filters => :always) do |g|
13
+ <% attributes.each do |attribute| -%>
14
+ g.column :name => t('activerecord.attributes.<%= class_name.split('::').last.underscore.downcase %>.<%= attribute.name %>'), :html => {:class => "grid-cell"} do |<%= class_name.split('::').last.underscore.downcase %>|
15
+ <%= class_name.split('::').last.underscore.downcase %>.<%= attribute.name %>
16
+ end
17
+ <% end -%>
18
+
19
+ g.column :html => {:style => "width:50px;"} do |<%= class_name.split('::').last.underscore.downcase %>|
20
+ content = []
21
+ content << link_to(render_icon_content('icon-edit'), edit_<%= singular_table_name %>_path(<%= class_name.split('::').last.underscore.downcase %>), :class => 'btn btn-link', :rel => 'tooltip', :title => t('buttons.edit'))
22
+ content << link_to(render_icon_content('icon-trash'), <%= singular_table_name %>_path(<%= class_name.split('::').last.underscore.downcase %>), :method => :delete, :confirm => t("confirms.delete"), :class => 'btn btn-link', :rel => 'tooltip', :title => t('buttons.delete'))
23
+ content_tag :div, content.join('').html_safe, class: 'btn-group'
24
+ end
25
+ end -%>
@@ -0,0 +1,7 @@
1
+ <%% content_for :breadcrumbs do %>
2
+ <%%= render :partial => 'shared/breadcrumbs_default' %>
3
+ <%%= content_tag :li, render_icon_and_text_content('icon-plus-sign', t('model.create', model: <%= class_name.split('::').last %>.model_name.human)) %>
4
+ <%% end %>
5
+
6
+ <%%= render 'form' %>
7
+
@@ -0,0 +1,24 @@
1
+ <div class="page-header">
2
+ <div class="row">
3
+ <div class="span8">
4
+ <h2><%%= t("model.show", :model => <%= class_name.split('::').last %>.model_name.human) %></h2>
5
+ </div>
6
+
7
+ <div class="btn-group pull-right">
8
+
9
+ </div>
10
+
11
+ </div>
12
+ </div>
13
+
14
+ <p id="notice"><%%= notice %></p>
15
+
16
+ <% attributes.each do |attribute| -%>
17
+ <p>
18
+ <strong><%= attribute.human_name %>:</strong>
19
+ <%%= @<%= class_name.split('::').last.underscore.downcase %>.<%= attribute.name %> %>
20
+ </p>
21
+
22
+ <% end -%>
23
+
24
+ <%%= link_to "#{t('labels.back_to')}#{t('model.list', :model => <%= class_name.split('::').last %>)}", <%= index_helper %>_path %>
@@ -0,0 +1,2 @@
1
+ <%= render :partial => 'shared/breadcrumbs_home' %>
2
+ <%= render :partial => 'shared/breadcrumbs_navigation' %>
@@ -0,0 +1,12 @@
1
+ <%- if alert %>
2
+ <div class="alert alert-error">
3
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
4
+ <strong>Error!</strong><%= alert %>
5
+ </div>
6
+ <% end -%>
7
+ <%- if notice %>
8
+ <div class="alert alert-success">
9
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
10
+ <%= notice %>
11
+ </div>
12
+ <% end -%>
@@ -0,0 +1,9 @@
1
+ <div id="page-toolbar" class="container-fluid">
2
+ <div class="row-fluid">
3
+ <div class="span6 offset6">
4
+ <div class="btn-toolbar pull-right">
5
+ <%= content %>
6
+ </div>
7
+ </div>
8
+ </div>
9
+ </div>
@@ -18,7 +18,7 @@ a:hover {
18
18
  }
19
19
 
20
20
  body {
21
- background: #E3E4E5;
21
+ background: #3B3D43;
22
22
  height: 100%;
23
23
  width: 100%;
24
24
  position: absolute;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conte_rails_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -102,9 +102,17 @@ files:
102
102
  - lib/conte_rails_template/version.rb
103
103
  - lib/conte_rails_template.rb
104
104
  - lib/generators/conte_rails_template/install_generator.rb
105
+ - lib/generators/conte_rails_template/templates/erb/scaffold/_form.html.erb
106
+ - lib/generators/conte_rails_template/templates/erb/scaffold/edit.html.erb
107
+ - lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
108
+ - lib/generators/conte_rails_template/templates/erb/scaffold/new.html.erb
109
+ - lib/generators/conte_rails_template/templates/erb/scaffold/show.html.erb
105
110
  - lib/generators/conte_rails_template/templates/layout.html.erb
106
111
  - lib/generators/conte_rails_template/templates/navigation_renderers.rb
107
112
  - lib/generators/conte_rails_template/templates/session.html.erb
113
+ - lib/generators/conte_rails_template/templates/shared/_breadcrumbs_default.html.erb
114
+ - lib/generators/conte_rails_template/templates/shared/_notification.html.erb
115
+ - lib/generators/conte_rails_template/templates/shared/_page_toolbar.html.erb
108
116
  - lib/generators/conte_rails_template/templates/simple_navigation.rb
109
117
  - lib/generators/conte_rails_template/templates/wice_grid_config.rb
110
118
  - lib/generators/conte_rails_template/templates/wice_grid_local.yml