togo 0.4.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,51 +5,53 @@
5
5
  <input type="hidden" name="related_<%= property.name %>" class="related_ids" value="unset" />
6
6
  <label for="<%= property.name %>"><%= related_model.display_name %></label>
7
7
  <div class="search" id="search-<%= related_model.name %>">
8
- <input type="text" name="search-<%= property.name %>" value="Search..." />
9
8
  <div class="paging">
10
- Page <span class="page-number">1</span> of <span class="page-count"><%= (content_count/10).ceil %></span>
11
- <a href="#" rel="prev">&laquo; Previous</a> <a href="#" rel="next">Next &raquo;</a>
9
+ <input type="text" name="search-<%= property.name %>" value="Search..." />
10
+ Page <span class="page-number">1</span> of <span class="page-count"><%= (content_count/10).ceil %></span> /
11
+ <a href="#" rel="prev">Previous</a> <a href="#" rel="next">Next</a>
12
12
  </div>
13
13
  </div>
14
- <table>
15
- <thead>
16
- <tr>
17
- <th class="checkbox"></th>
18
- <% related_model.get_list_properties.each do |p| %>
19
- <th><%= p.name.to_s.humanize.titleize %></th>
20
- <% end %>
21
- </tr>
22
- </thead>
23
- <tfoot>
24
- <tr>
25
- <td class="checkbox"></td>
26
- <td>
27
- <span class="associated-count-display" style="<%= (content_count == 0 or content_count < 10) ? 'display: none;' : '' %>">
28
- ...and <span class="associated-count"><%= content_count-related_content.size %></span> more associated items
29
- </span>
30
- </td>
31
- <td colspan="<%= related_model.get_form_properties.size-1 %>">
32
- <button class="association-modify">Modify</button>
33
- </td>
34
- </tr>
35
- </tfoot>
36
- <tbody>
37
- <% if related_content.empty? %>
38
- <tr>
39
- <td colspan="<%= related_model.get_form_properties.size %>">No Content Associated.</td>
40
- </tr>
41
- <% else %>
42
- <% related_content.each do |c| %>
43
- <tr>
44
- <td class="checkbox"><input type="checkbox" name="selection[<%= c.id %>]" value="<%= c.id %>" id="selection_<%= related_model.name %>_<%= c.id %>" checked="checked" /></td>
45
- <% related_model.get_list_properties.each_with_index do |p,i| %>
46
- <td><% if i == 0 %><a href="/edit/<%= related_model.name %>/<%= c.id %>"><%= c.send(p.name.to_sym) || '-' %></a><% else %><%= c.send(p.name.to_sym) %><% end %></td>
47
- <% end %>
48
- </tr>
49
- <% end %>
50
- <% end %>
51
- </tbody>
52
- </table>
14
+ <div class="list-table-wrapper">
15
+ <table cellspacing="0">
16
+ <thead>
17
+ <tr>
18
+ <th class="checkbox">&nbsp;</th>
19
+ <% related_model.get_list_properties.each do |p| %>
20
+ <th><%= p.name.to_s.humanize.titleize %></th>
21
+ <% end %>
22
+ </tr>
23
+ </thead>
24
+ <tfoot>
25
+ <tr>
26
+ <td class="checkbox"></td>
27
+ <td>
28
+ <span class="associated-count-display" style="<%= (content_count == 0 or content_count < 10) ? 'display: none;' : '' %>">
29
+ ...and <span class="associated-count"><%= content_count-related_content.size %></span> more associated items
30
+ </span>
31
+ </td>
32
+ <td colspan="<%= related_model.get_list_properties.size-1 %>">
33
+ <button class="association-modify">Modify</button>
34
+ </td>
35
+ </tr>
36
+ </tfoot>
37
+ <tbody>
38
+ <% if related_content.empty? %>
39
+ <tr>
40
+ <td colspan="<%= related_model.get_list_properties.size %>">No Content Associated.</td>
41
+ </tr>
42
+ <% else %>
43
+ <% related_content.each do |c| %>
44
+ <tr>
45
+ <td class="checkbox"><input type="checkbox" name="selection[<%= c.id %>]" value="<%= c.id %>" id="selection_<%= related_model.name %>_<%= c.id %>" checked="checked" /></td>
46
+ <% related_model.get_list_properties.each_with_index do |p,i| %>
47
+ <td><% if i == 0 %><a href="/edit/<%= related_model.name %>/<%= c.id %>"><%= c.send(p.name.to_sym) || '-' %></a><% else %><%= c.send(p.name.to_sym) %><% end %></td>
48
+ <% end %>
49
+ </tr>
50
+ <% end %>
51
+ <% end %>
52
+ </tbody>
53
+ </table>
54
+ </div>
53
55
  <script type="text/javascript">
54
56
  new AssociationManager({
55
57
  relationship: 'has_n',
@@ -5,51 +5,53 @@
5
5
  <input type="hidden" name="related_<%= property.name %>" class="related_ids" value="unset" />
6
6
  <label for="<%= property.name %>"><%= related_model.display_name %></label>
7
7
  <div class="search" id="search-<%= related_model.name %>">
8
- <input type="text" name="search-<%= property.name %>" value="Search..." />
9
8
  <div class="paging">
10
- Page <span class="page-number">1</span> of <span class="page-count"><%= (content_count/10).ceil %></span>
11
- <a href="#" rel="prev">&laquo; Previous</a> <a href="#" rel="next">Next &raquo;</a>
9
+ <input type="text" name="search-<%= property.name %>" value="Search..." />
10
+ Page <span class="page-number">1</span> of <span class="page-count"><%= (content_count/10).ceil %></span> /
11
+ <a href="#" rel="prev">Previous</a> <a href="#" rel="next">Next</a>
12
12
  </div>
13
13
  </div>
14
- <table>
15
- <thead>
16
- <tr>
17
- <th class="checkbox"></th>
18
- <% related_model.get_list_properties.each do |p| %>
19
- <th><%= p.name.to_s.humanize.titleize %></th>
20
- <% end %>
21
- </tr>
22
- </thead>
23
- <tfoot>
24
- <tr>
25
- <td class="checkbox"></td>
26
- <td>
27
- <span class="associated-count-display" style="<%= (content_count == 0 or content_count < 10) ? 'display: none;' : '' %>">
28
- ...and <span class="associated-count"><%= content_count-related_content.size %></span> more associated items
29
- </span>
30
- </td>
31
- <td colspan="<%= related_model.get_form_properties.size-1 %>">
32
- <button class="association-modify">Modify</button>
33
- </td>
34
- </tr>
35
- </tfoot>
36
- <tbody>
37
- <% if related_content.empty? %>
38
- <tr>
39
- <td colspan="<%= related_model.get_form_properties.size %>">No Content Associated.</td>
40
- </tr>
41
- <% else %>
42
- <% related_content.each do |c| %>
43
- <tr>
44
- <td class="checkbox"><input type="checkbox" name="selection[<%= c.id %>]" value="<%= c.id %>" id="selection_<%= related_model.name %>_<%= c.id %>" checked="checked" /></td>
45
- <% related_model.get_list_properties.each_with_index do |p,i| %>
46
- <td><% if i == 0 %><a href="/edit/<%= related_model.name %>/<%= c.id %>"><%= c.send(p.name.to_sym) || '-' %></a><% else %><%= c.send(p.name.to_sym) %><% end %></td>
47
- <% end %>
48
- </tr>
49
- <% end %>
50
- <% end %>
51
- </tbody>
52
- </table>
14
+ <div class="list-table-wrapper">
15
+ <table cellspacing="0">
16
+ <thead>
17
+ <tr>
18
+ <th class="checkbox">&nbsp;</th>
19
+ <% related_model.get_list_properties.each do |p| %>
20
+ <th><%= p.name.to_s.humanize.titleize %></th>
21
+ <% end %>
22
+ </tr>
23
+ </thead>
24
+ <tfoot>
25
+ <tr>
26
+ <td class="checkbox"></td>
27
+ <td>
28
+ <span class="associated-count-display" style="<%= (content_count == 0 or content_count < 10) ? 'display: none;' : '' %>">
29
+ ...and <span class="associated-count"><%= content_count-related_content.size %></span> more associated items
30
+ </span>
31
+ </td>
32
+ <td colspan="<%= related_model.get_list_properties.size-1 %>">
33
+ <button class="association-modify">Modify</button>
34
+ </td>
35
+ </tr>
36
+ </tfoot>
37
+ <tbody>
38
+ <% if related_content.empty? %>
39
+ <tr>
40
+ <td colspan="<%= related_model.get_list_properties.size %>">No Content Associated.</td>
41
+ </tr>
42
+ <% else %>
43
+ <% related_content.each do |c| %>
44
+ <tr>
45
+ <td class="checkbox"><input type="checkbox" name="selection[<%= c.id %>]" value="<%= c.id %>" id="selection_<%= related_model.name %>_<%= c.id %>" checked="checked" /></td>
46
+ <% related_model.get_list_properties.each_with_index do |p,i| %>
47
+ <td><% if i == 0 %><a href="/edit/<%= related_model.name %>/<%= c.id %>"><%= c.send(p.name.to_sym) || '-' %></a><% else %><%= c.send(p.name.to_sym) %><% end %></td>
48
+ <% end %>
49
+ </tr>
50
+ <% end %>
51
+ <% end %>
52
+ </tbody>
53
+ </table>
54
+ </div>
53
55
  <script type="text/javascript">
54
56
  new AssociationManager({
55
57
  relationship: 'many_to_many',
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: togo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 1
10
- version: 0.4.1
8
+ - 6
9
+ - 0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt King
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-16 00:00:00 -07:00
18
+ date: 2010-11-15 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -51,7 +51,7 @@ dependencies:
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  description: With a few lines of code in your Ruby ORMs, you get a highly configurable and extensive content administration tool.
54
- email: matt@mattking.org
54
+ email: matt@mking.me
55
55
  executables:
56
56
  - togo-admin
57
57
  extensions: []
@@ -59,21 +59,28 @@ extensions: []
59
59
  extra_rdoc_files: []
60
60
 
61
61
  files:
62
- - README
62
+ - README.md
63
63
  - Changelog
64
64
  - LICENSE
65
65
  - lib/togo/admin/admin.rb
66
66
  - lib/togo/admin/helpers.rb
67
67
  - lib/togo/admin/public/css/screen.css
68
+ - lib/togo/admin/public/img/arrow-down.png
69
+ - lib/togo/admin/public/img/arrows.png
68
70
  - lib/togo/admin/public/img/bg-header.png
69
71
  - lib/togo/admin/public/img/bg-headline.png
70
72
  - lib/togo/admin/public/img/bg-nav.png
71
73
  - lib/togo/admin/public/img/bg-side.png
72
74
  - lib/togo/admin/public/img/btn-bg.gif
73
75
  - lib/togo/admin/public/img/btn-bg.png
76
+ - lib/togo/admin/public/img/button-bg-delete.png
77
+ - lib/togo/admin/public/img/button-bg-save.png
78
+ - lib/togo/admin/public/img/footer-bg.png
79
+ - lib/togo/admin/public/img/subhead-bg.png
74
80
  - lib/togo/admin/public/js/edit.js
75
81
  - lib/togo/admin/public/js/index.js
76
82
  - lib/togo/admin/public/js/togo.js
83
+ - lib/togo/admin/views/_paging.erb
77
84
  - lib/togo/admin/views/custom_title.erb
78
85
  - lib/togo/admin/views/edit.erb
79
86
  - lib/togo/admin/views/index.erb
@@ -83,6 +90,9 @@ files:
83
90
  - lib/togo/dispatch/dispatch.rb
84
91
  - lib/togo/dispatch.rb
85
92
  - lib/togo/model/model.rb
93
+ - lib/togo/model/relationship_manager/many_to_one.rb
94
+ - lib/togo/model/relationship_manager/one_to_many.rb
95
+ - lib/togo/model/relationship_manager/relationship_manager.rb
86
96
  - lib/togo/model/types/belongs_to.erb
87
97
  - lib/togo/model/types/boolean.erb
88
98
  - lib/togo/model/types/datetime.erb
data/README DELETED
@@ -1,29 +0,0 @@
1
- == Togo: Automatic Admin for Ruby ORMs
2
-
3
- With just a few lines of code in your ORM classes, you get a full-featured content administration tool.
4
-
5
- Quick example for DataMapper:
6
-
7
- require 'togo'
8
-
9
- class BlogEntry
10
-
11
- include DataMapper::Resource
12
- include Togo::DataMapper::Model
13
-
14
- property :id, Serial
15
- property :title, String
16
- property :body, Text
17
- property :published, Boolean
18
-
19
- list_properties :title, :published
20
-
21
- configure_property :published, :label => "Choose 'yes' to publish blog entry"
22
-
23
- end
24
-
25
- Go to your app with your models in a folder called "models", then run:
26
-
27
- togo-admin
28
-
29
- Current only works with DataMapper.