itium-theme 0.0.2 → 0.0.3

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/.project CHANGED
@@ -5,6 +5,11 @@
5
5
  <projects>
6
6
  </projects>
7
7
  <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
8
13
  </buildSpec>
9
14
  <natures>
10
15
  <nature>org.radrails.rails.core.railsnature</nature>
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Itium::Theme
2
2
 
3
- TODO: Write a gem description
3
+ View generator for rails projects using simple_form and bootstrap
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,38 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ ### Themed Generator
22
+
23
+ Start creating your controllers manually or with a scaffold, and then use the `themed generator` to overwrite the previously generated views.
24
+
25
+ If you have a controller named like the plural of the used model you can specify just the first parameter:
26
+
27
+ rails g itium_theme:themed posts # you have a model named Post and a controller named PostsController
28
+
29
+ rails g itium_theme:themed admin/gallery_pictures # you have a model named GalleryPicture and a controller named Admin::GalleryPicturesController
30
+
31
+ If the controller has a name different to the model used, specify the controller path in the first parameter and the model name in the second one:
32
+
33
+ rails g itium_theme:themed items post
34
+
35
+ rails g itium_theme:themed admin/items post
36
+
37
+ If you use `will_paginate` for pagination use the `--will-paginate`:
38
+
39
+ rails g itium_theme:themed items post --will-paginate
40
+
41
+ If you want to have translated pages, simple create in your locale.yml the keys just like config/locales/en_us.yml example.
42
+
43
+ en_us:
44
+ itium-theme:
45
+ save: Save
46
+ cancel: Cancel
47
+ list: List
48
+ edit: Edit
49
+ new: New
50
+ show: Show
51
+ delete: Delete
52
+ confirm: Are you sure?
22
53
 
23
54
  ## Contributing
24
55
 
@@ -1,12 +1,8 @@
1
1
  <%%= simple_form_for(@<%=resource_name%>) do |f| %>
2
2
  <%%= f.error_notification %>
3
-
4
3
  <% columns.each do |column| %>
5
-
6
4
  <%%= f.input :<%= column.name %> %>
7
-
8
5
  <%- end -%>
9
-
10
6
  <div class="form-actions">
11
7
  <%%= f.button :submit, t("itium-theme.save", :default => "Save") %>
12
8
  </div>
@@ -1,7 +1,7 @@
1
1
  <h1><%%= t("itium-theme.list", :default => "List of") %> <%%= t("activerecord.models.<%= model_name %>", :default => "<%= plural_model_name%>") %></h1>
2
2
  <br>
3
3
 
4
- <%%= render :partial => "search", :locals => {:f => f} %>
4
+ <%%= render :partial => "search" %>
5
5
 
6
6
  <table class="table table-bordered table-striped">
7
7
  <tr>
@@ -24,7 +24,7 @@
24
24
  <td><%%= link_to raw("<i class='icon-pencil'></i>"), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => "btn btn-mini", :title => "#{t("itium-theme.edit", :default => "Show")}" %></td>
25
25
  <td><%%= link_to raw("<i class='icon-remove-sign'></i>"), <%= resource_name %>, :confirm => "#{t("itium-theme.confirm", :default => "Are you sure?")}", :method => :delete, :class => "btn btn-mini", :title => "#{t("itium-theme.delete", :default => "Delete")}" %></td>
26
26
  </tr>
27
- <% % end %>
27
+ <%% end %>
28
28
  </table>
29
29
 
30
30
  <br />
@@ -33,4 +33,7 @@
33
33
  <%%= will_paginate @<%= plural_resource_name %> %>
34
34
  <% end %>
35
35
 
36
- <%= link_to raw("<i class='icon-file'></i>Adicionar"), new_<%= singular_controller_routing_path %>_path, :class => "btn", :title => "#{t("itium-theme.new", :default => "Novo")}" %>
36
+ <%%= link_to raw("<i class='icon-file'></i>Adicionar"), new_<%= singular_controller_routing_path %>_path, :class => "btn", :title => "#{t("itium-theme.new", :default => "New")}" %>
37
+
38
+
39
+
@@ -16,7 +16,6 @@ module ItiumTheme
16
16
 
17
17
  def copy_views
18
18
  generate_views
19
-
20
19
  end
21
20
 
22
21
  protected
@@ -1,5 +1,5 @@
1
1
  module Itium
2
2
  module Theme
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itium-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-05 00:00:00.000000000Z
12
+ date: 2012-09-06 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: View generator for rails projects using simple_form and bootstrap
15
15
  email: