bowtie 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bowtie.gemspec +2 -2
- data/lib/bowtie/admin.rb +2 -1
- data/lib/bowtie/helpers.rb +5 -1
- data/lib/bowtie/public/css/bowtie.css +22 -1
- data/lib/bowtie/views/row.erb +1 -1
- metadata +18 -5
data/bowtie.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = %q{bowtie}
|
4
|
-
s.version = "0.3.
|
4
|
+
s.version = "0.3.2"
|
5
5
|
|
6
6
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
7
7
|
s.authors = ["Tomás Pollak"]
|
8
8
|
s.date = %q{2010-06-06}
|
9
9
|
s.description = %q{Admin scaffold for DataMapper models, on Sinatra.}
|
10
|
-
s.email = %q{tomas@
|
10
|
+
s.email = %q{tomas@forkhq.com}
|
11
11
|
s.extra_rdoc_files = ["lib/bowtie.rb", "lib/bowtie/admin.rb", "lib/bowtie/core_extensions.rb", "lib/bowtie/helpers.rb"]
|
12
12
|
s.files = ["README.rdoc", "bowtie.gemspec", "lib/bowtie.rb", "lib/bowtie/admin.rb", "lib/bowtie/core_extensions.rb", "lib/bowtie/helpers.rb", "lib/bowtie/views/errors.erb", "lib/bowtie/views/field.erb", "lib/bowtie/views/flash.erb", "lib/bowtie/views/form.erb", "lib/bowtie/views/index.erb", "lib/bowtie/views/layout.erb", "lib/bowtie/views/new.erb", "lib/bowtie/views/search.erb", "lib/bowtie/views/search.erb", "lib/bowtie/views/show.erb", "lib/bowtie/views/subtypes.erb", "lib/bowtie/views/table.erb", "lib/bowtie/views/row.erb", "lib/bowtie/public/css/bowtie.css", "lib/bowtie/public/js/bowtie.js", "lib/bowtie/public/js/jquery.tablesorter.pack.js", "lib/bowtie/public/js/jquery.jeditable.pack.js"]
|
13
13
|
s.homepage = %q{http://github.com/tomas/bowtie}
|
data/lib/bowtie/admin.rb
CHANGED
data/lib/bowtie/helpers.rb
CHANGED
@@ -48,7 +48,7 @@ module Bowtie
|
|
48
48
|
# views, paths
|
49
49
|
|
50
50
|
def partial(name, *args)
|
51
|
-
erb(name, :layout => false, *args)
|
51
|
+
erb(name, {:layout => false}, *args)
|
52
52
|
end
|
53
53
|
|
54
54
|
def model_path(m = current_model)
|
@@ -60,6 +60,10 @@ module Bowtie
|
|
60
60
|
model_path(object.class) + '/' + object.id.to_s
|
61
61
|
end
|
62
62
|
|
63
|
+
def truncate(str, length)
|
64
|
+
str.to_s.length > length ? str.to_s[0..length] + '…' : str.to_s
|
65
|
+
end
|
66
|
+
|
63
67
|
end
|
64
68
|
|
65
69
|
end
|
@@ -183,22 +183,43 @@ table .check-column{
|
|
183
183
|
text-align: center;
|
184
184
|
}
|
185
185
|
|
186
|
+
/* good states
|
187
|
+
---------------------------*/
|
188
|
+
|
189
|
+
table tr.ok,
|
186
190
|
table tr.active,
|
187
191
|
table tr.enabled{
|
188
192
|
border-left: 5px solid #528e00;
|
189
193
|
}
|
190
194
|
|
195
|
+
table tr.ok td,
|
191
196
|
table tr.active td,
|
192
197
|
table tr.enabled td{
|
193
|
-
background: #
|
198
|
+
background: #EFFFF0;
|
199
|
+
}
|
200
|
+
|
201
|
+
/* "middle" states
|
202
|
+
---------------------------*/
|
203
|
+
|
204
|
+
table tr.pending{
|
205
|
+
/* border-left: 5px solid #ffcc00;*/
|
194
206
|
}
|
195
207
|
|
208
|
+
table tr.pending td{
|
209
|
+
/* background: #ebf9eb;*/
|
210
|
+
}
|
211
|
+
|
212
|
+
/* bad states
|
213
|
+
---------------------------*/
|
214
|
+
|
215
|
+
table tr.deleted,
|
196
216
|
table tr.cancelled,
|
197
217
|
table tr.disabled,
|
198
218
|
table tr.suspended{
|
199
219
|
border-left: 5px solid #a00;
|
200
220
|
}
|
201
221
|
|
222
|
+
table tr.deleted td,
|
202
223
|
table tr.cancelled td,
|
203
224
|
table tr.disabled td,
|
204
225
|
table tr.suspended td{
|
data/lib/bowtie/views/row.erb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<td class="<%= @model.key.first.name.to_s %>-col"><a href="<%= url_for(@r) %>"><%= @r.key.first.to_s %></a></td>
|
3
3
|
<% @r.attributes.each do |a| %>
|
4
4
|
<% next if a[0] == @model.key.first.name %>
|
5
|
-
<td class="<%= a[0] %>-col editable"><%= a[1] || 'nil' %></td>
|
5
|
+
<td class="<%= a[0] %>-col editable"><%= truncate(a[1], 64) || 'nil' %></td>
|
6
6
|
<% end %>
|
7
7
|
<% unless params[:association] %>
|
8
8
|
<% @model.relationships.each do |rel| %>
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowtie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- "Tom\xC3\xA1s Pollak"
|
@@ -21,9 +22,11 @@ dependencies:
|
|
21
22
|
name: sinatra
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 51
|
27
30
|
segments:
|
28
31
|
- 0
|
29
32
|
- 9
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: dm-core
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ">="
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 51
|
41
46
|
segments:
|
42
47
|
- 0
|
43
48
|
- 10
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: dm-aggregates
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 51
|
55
62
|
segments:
|
56
63
|
- 0
|
57
64
|
- 10
|
@@ -63,9 +70,11 @@ dependencies:
|
|
63
70
|
name: dm-pager
|
64
71
|
prerelease: false
|
65
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
66
74
|
requirements:
|
67
75
|
- - ">="
|
68
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 21
|
69
78
|
segments:
|
70
79
|
- 1
|
71
80
|
- 0
|
@@ -74,7 +83,7 @@ dependencies:
|
|
74
83
|
type: :runtime
|
75
84
|
version_requirements: *id004
|
76
85
|
description: Admin scaffold for DataMapper models, on Sinatra.
|
77
|
-
email: tomas@
|
86
|
+
email: tomas@forkhq.com
|
78
87
|
executables: []
|
79
88
|
|
80
89
|
extensions: []
|
@@ -122,16 +131,20 @@ rdoc_options:
|
|
122
131
|
require_paths:
|
123
132
|
- lib
|
124
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
125
135
|
requirements:
|
126
136
|
- - ">="
|
127
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 3
|
128
139
|
segments:
|
129
140
|
- 0
|
130
141
|
version: "0"
|
131
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
132
144
|
requirements:
|
133
145
|
- - ">="
|
134
146
|
- !ruby/object:Gem::Version
|
147
|
+
hash: 11
|
135
148
|
segments:
|
136
149
|
- 1
|
137
150
|
- 2
|
@@ -139,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
152
|
requirements: []
|
140
153
|
|
141
154
|
rubyforge_project: bowtie
|
142
|
-
rubygems_version: 1.
|
155
|
+
rubygems_version: 1.5.2
|
143
156
|
signing_key:
|
144
157
|
specification_version: 3
|
145
158
|
summary: Bowtie Admin
|