jrhicks-static-generators 0.3.6 → 0.4.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/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('static-generators', '0.3.6') do |p|
5
+ Echoe.new('static-generators', '0.4.0') do |p|
6
6
  p.project = "staticgenerators"
7
7
  p.description = "Generate attractive interfaces that are easy to edit."
8
8
  p.url = "http://github.com/jrhicks/static-scaffolds"
@@ -99,6 +99,35 @@
99
99
 
100
100
  }
101
101
 
102
+ .pagination {
103
+ }
104
+
105
+ .pagination a {
106
+ text-decoration: none;
107
+ color: #fff;
108
+ padding-left: .25em;
109
+ padding-right: .25em;
110
+ border: 1px solid #899AB7;
111
+ }
112
+ .pagination a:hover, .pagination a:active {
113
+ color: black;
114
+ border: 1px solid #FFDE6B;
115
+ background-color: #FFDE6B;
116
+ padding-left: .25em;
117
+ padding-right: .25em;
118
+ }
119
+ .pagination span.current {
120
+ color: #fff;
121
+ border: 1px solid #6982a7;
122
+ background-color: #6982a7;
123
+ padding-left: .25em;
124
+ padding-right: .25em;
125
+ }
126
+ .pagination span.disabled {
127
+ color: #899AB7;
128
+ border: 1px solid #899AB7;
129
+ }
130
+
102
131
 
103
132
  .fieldWithErrors {
104
133
  padding: 2px;
@@ -6,7 +6,7 @@ class <%= controller_class_name %>Controller < ApplicationController
6
6
  @<%=gen_spec.ascendant[:name]%> = <%=gen_spec.ascendant[:model]%>.find(params["<%=gen_spec.ascendant[:name]%>"])
7
7
  @<%=gen_spec.plural_name %> = @<%=gen_spec.ascendant[:name]%>.<%= gen_spec.plural_name %>
8
8
  <%else -%>
9
- @<%=gen_spec.plural_name %> = <%= gen_spec.model_name %>.all
9
+ @<%=gen_spec.plural_name %> = <%= gen_spec.model_name %>.search(params[:page])
10
10
  <%end -%>
11
11
 
12
12
 
@@ -40,9 +40,15 @@
40
40
  <div class='span-19 last'>
41
41
  <table><tr style="margin: 0; padding:0;"><td style="margin: 0; padding:0;">
42
42
  <div class="work_area">
43
+
43
44
  <div class="work_area_header ui-corner-tr">
44
- Application Work Area Title Bar
45
- </div>
45
+ <div style="float: right; padding-right: 1em; font-size: .8em;">
46
+ <%%= will_paginate @posts, :inner_window=>1, :outer_window=>0, :previous_label=>'&laquo;', :next_label=>'&raquo;' %>
47
+
48
+ </div>
49
+ Application Work Area Title Bar
50
+ </div> <!-- end work_area header -->
51
+
46
52
  <div class="presentation_selector">
47
53
  <div class="presentation_selection">
48
54
  <%%=link_to "Table"%>
@@ -35,7 +35,13 @@ class <%= class_name %> < ActiveRecord::Base
35
35
  def self.table_name()
36
36
  "<%=gen_spec.table_name%>"
37
37
  end
38
-
38
+
39
+ def self.search(page)
40
+ page=1 if not page
41
+ Client.paginate :per_page => 12, :page => page, :order => order_preference
42
+ # :conditions => ['name like ?', "%#{search}%"], :order => 'company'
43
+ end
44
+
39
45
  def icon
40
46
  "<%=gen_spec.singular_name%>.gif"
41
47
  end
@@ -49,7 +55,7 @@ class <%= class_name %> < ActiveRecord::Base
49
55
  end
50
56
  end
51
57
 
52
- def order_preference
58
+ def self.order_preference
53
59
  "<%=gen_spec.order_preference_columns.join(", ")%> <%=gen_spec.order_preference%>"
54
60
  end
55
61
 
@@ -1,5 +1,4 @@
1
1
  <%% title "Listing <%= gen_spec.plural_title %>" %>
2
- <h1>Listing <%= gen_spec.plural_title %></h1>
3
2
 
4
3
  <%%=data_table_start <%="#{gen_spec.plural_name}_#{next_count}".inspect%>%>
5
4
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{static-generators}
5
- s.version = "0.3.6"
5
+ s.version = "0.4.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jeffrey Hicks"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jrhicks-static-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Hicks