dust-generators 0.1.9 → 0.2.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.
Files changed (36) hide show
  1. data/lib/dust/version.rb +2 -2
  2. data/rails_generators/dust_albums/dust_albums_generator.rb +98 -32
  3. data/rails_generators/dust_albums/templates/app/controllers/albums_controller.rb +20 -20
  4. data/rails_generators/dust_albums/templates/app/controllers/photos_controller.rb +32 -32
  5. data/rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb +6 -6
  6. data/rails_generators/dust_albums/templates/app/helpers/albums_helper.rb +1 -1
  7. data/rails_generators/dust_albums/templates/app/helpers/photos_helper.rb +1 -1
  8. data/rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb +1 -1
  9. data/rails_generators/dust_albums/templates/app/models/album.rb +4 -4
  10. data/rails_generators/dust_albums/templates/app/models/photo.rb +4 -4
  11. data/rails_generators/dust_albums/templates/app/views/albums/_form.html.erb +17 -17
  12. data/rails_generators/dust_albums/templates/app/views/albums/_search.html.erb +4 -4
  13. data/rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb +11 -11
  14. data/rails_generators/dust_albums/templates/app/views/albums/edit.html.erb +3 -3
  15. data/rails_generators/dust_albums/templates/app/views/albums/index.html.erb +23 -23
  16. data/rails_generators/dust_albums/templates/app/views/albums/manage.html.erb +16 -16
  17. data/rails_generators/dust_albums/templates/app/views/albums/new.html.erb +3 -3
  18. data/rails_generators/dust_albums/templates/app/views/albums/show.html.erb +21 -21
  19. data/rails_generators/dust_albums/templates/app/views/albums/show.js.erb +1 -1
  20. data/rails_generators/dust_albums/templates/app/views/photos/_form.html.erb +9 -9
  21. data/rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb +8 -8
  22. data/rails_generators/dust_albums/templates/app/views/photos/_search.html.erb +4 -4
  23. data/rails_generators/dust_albums/templates/app/views/photos/array.js.erb +1 -1
  24. data/rails_generators/dust_albums/templates/app/views/photos/edit.html.erb +6 -6
  25. data/rails_generators/dust_albums/templates/app/views/photos/index.html.erb +24 -24
  26. data/rails_generators/dust_albums/templates/app/views/photos/new.html.erb +4 -4
  27. data/rails_generators/dust_albums/templates/app/views/photos/show.html.erb +9 -9
  28. data/rails_generators/dust_albums/templates/app/views/photos/show.js.erb +2 -2
  29. data/rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb +16 -16
  30. data/rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb +19 -19
  31. data/rails_generators/dust_albums/templates/javascript/dust_album.js +3 -3
  32. data/rails_generators/dust_albums/templates/migration/albums_migration.rb +9 -8
  33. data/rails_generators/dust_albums/templates/stylesheets/dust_album.css +6 -6
  34. data/rails_generators/dust_albums/templates/stylesheets/dust_album_app.css +4 -4
  35. data/rails_generators/dust_albums/templates/stylesheets/uploadify.css +1 -1
  36. metadata +5 -5
@@ -1,52 +1,52 @@
1
- <%= stylesheet( 'dust_album','uploadify') %>
1
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
2
2
 
3
- <% form_for @album, :validations => true do |f| %>
4
- <%= f.error_messages %>
3
+ <%% form_for @<%=parent_singular_name%>, :validations => true do |f| %>
4
+ <%%= f.error_messages %>
5
5
 
6
6
  <div class="item">
7
7
  <p>
8
- <%= f.label :active %>
9
- <%= f.check_box :active %>
8
+ <%%= f.label :active %>
9
+ <%%= f.check_box :active %>
10
10
  </p>
11
11
  </div>
12
12
 
13
13
  <div class="item">
14
14
  <p>
15
- <%= f.label :nav, "Navigation Link" %><br />
16
- <%= f.text_field :nav, :class => 'field' %>
15
+ <%%= f.label :nav, "Navigation Link" %><br />
16
+ <%%= f.text_field :nav, :class => 'field' %>
17
17
  </p>
18
18
  </div>
19
19
 
20
20
  <div class="item">
21
21
  <p>
22
- <%= f.label :title %><br />
23
- <%= f.text_field :title, :class => 'field' %>
22
+ <%%= f.label :title %><br />
23
+ <%%= f.text_field :title, :class => 'field' %>
24
24
  </p>
25
25
  </div>
26
26
 
27
27
  <div class="item">
28
28
  <p>
29
- <%= f.label :heading %><br />
30
- <%= f.text_field :heading, :class => 'field' %>
29
+ <%%= f.label :heading %><br />
30
+ <%%= f.text_field :heading, :class => 'field' %>
31
31
  </p>
32
32
  </div>
33
33
 
34
34
  <div class="item">
35
35
  <p>
36
- <%= f.label :filename %><br />
37
- <%= f.text_field :filename, :class => 'field' %>
36
+ <%%= f.label :filename %><br />
37
+ <%%= f.text_field :filename, :class => 'field' %>
38
38
  </p>
39
39
  </div>
40
40
 
41
41
  <div class="item">
42
42
  <p>
43
- <%= f.label :desc %><br />
44
- <%= f.text_area :desc, :class => 'field' %>
43
+ <%%= f.label :desc %><br />
44
+ <%%= f.text_area :desc, :class => 'field' %>
45
45
  </p>
46
46
  </div>
47
47
 
48
48
  <div class="item">
49
- <p><%= f.submit %></p>
49
+ <p><%%= f.submit %></p>
50
50
  </div>
51
51
 
52
- <% end %>
52
+ <%% end %>
@@ -1,6 +1,6 @@
1
1
  <div id="searchbox">
2
- <% form_tag albums_path, :method => 'get' do %>
3
- <%= text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search Albums' %>
4
- <%= image_submit_tag "admin/blank.png", :class => "image-submit"%>
5
- <% end %>
2
+ <%% form_tag <%=parent_plural_name%>_path, :method => 'get' do %>
3
+ <%%= text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search <%=parent_plural_class_name%>' %>
4
+ <%%= image_submit_tag "admin/blank.png", :class => "image-submit"%>
5
+ <%% end %>
6
6
  </div>
@@ -1,15 +1,15 @@
1
- <%- session_key_name = ActionController::Base.session_options[:key] -%>
2
- <%= javascript_include_tag "uploadify/swfobject", "uploadify/jquery.uploadify.v2.1.0" %>
1
+ <%%- session_key_name = ActionController::Base.session_options[:key] -%>
2
+ <%%= javascript_include_tag "uploadify/swfobject", "uploadify/jquery.uploadify.v2.1.0" %>
3
3
 
4
4
  <script type="text/javascript" charset="utf-8">
5
5
  $(document).ready(function() {
6
- $('#photo_file').click(function(event) {
6
+ $('#<%=child_singular_name%>_file').click(function(event) {
7
7
  event.preventDefault();
8
8
  });
9
9
 
10
- $('#photo_file').uploadify({
10
+ $('#<%=child_singular_name%>_file').uploadify({
11
11
  'uploader' : '/javascripts/uploadify/uploadify.swf',
12
- 'script' : '/photos/create',
12
+ 'script' : '/<%=child_plural_name%>/create',
13
13
  'multi' : true,
14
14
  'auto' : false,
15
15
  'buttonText' : 'Find',
@@ -19,19 +19,19 @@
19
19
  height : 26, // The height of the flash button
20
20
  width : 101, // The width of the flash button
21
21
  onComplete : function(event, queueID, fileObj, response, data) { var dat = eval('(' +
22
- response + ')');$.getScript(dat.photo);},
22
+ response + ')');$.getScript(dat.<%=child_singular_name%>);},
23
23
  'scriptData': {
24
- '<%= session_key_name %>' : encodeURIComponent('<%= u cookies[session_key_name] %>'),
25
- 'authenticity_token' : encodeURIComponent('<%= u form_authenticity_token if protect_against_forgery? %>'),
26
- 'album_id' : '<%= @album.id %>',
24
+ '<%%= session_key_name %>' : encodeURIComponent('<%%= u cookies[session_key_name] %>'),
25
+ 'authenticity_token' : encodeURIComponent('<%%= u form_authenticity_token if protect_against_forgery? %>'),
26
+ '<%=parent_singular_name%>_id' : '<%%= @<%=parent_singular_name%>.id %>',
27
27
  'title' : 'change me!',
28
28
  'format' : 'json'
29
29
  }
30
30
  });
31
31
 
32
- $('#photo_submit').click(function(event){
32
+ $('#<%=child_singular_name%>_submit').click(function(event){
33
33
  event.preventDefault();
34
- $('#photo_file').uploadifyUpload();
34
+ $('#<%=child_singular_name%>_file').uploadifyUpload();
35
35
  });
36
36
  });
37
37
  </script>
@@ -1,5 +1,5 @@
1
- <% title "Edit Album" %>
1
+ <%% title "Edit <%=parent_class_name%>" %>
2
2
 
3
- <%= stylesheet( 'dust_album','uploadify') %>
3
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
4
4
 
5
- <%= render :partial => 'form' %>
5
+ <%%= render :partial => 'form' %>
@@ -1,53 +1,53 @@
1
- <% title "Albums" %>
2
- <% heading "Albums" %>
1
+ <%% title "<%=parent_plural_class_name%>" %>
2
+ <%% heading "<%=parent_plural_class_name%>" %>
3
3
 
4
- <%= stylesheet( 'dust_album','uploadify') %>
4
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
5
5
 
6
6
  <div class="button_bar">
7
- <%= render :partial => 'search' %>
8
- <%=link_to('new allbum', new_album_path, :class => 'newfile tip', :title => "New Album")%>
7
+ <%%= render :partial => 'search' %>
8
+ <%%=link_to('new allbum', new_<%=parent_singular_name%>_path, :class => 'newfile tip', :title => "New <%=parent_class_name%>")%>
9
9
  </div>
10
10
 
11
- <div class='photolist'>
11
+ <div class='<%=child_singular_name%>list'>
12
12
 
13
- <%= will_paginate @albums %>
13
+ <%%= will_paginate @<%=parent_plural_name%> %>
14
14
 
15
- <table class="photos">
15
+ <table class="<%=child_plural_name%>">
16
16
  <tr style='color:#222;'>
17
17
  <th></th>
18
18
  <th>
19
- Album Title
19
+ <%=parent_class_name%> Title
20
20
  </th>
21
21
  <th>
22
22
  Created At
23
23
  </th>
24
24
  <th></th>
25
25
  </tr>
26
- <% @albums.each do |album| %>
27
- <tr class='<%= cycle('odd', 'even')%>'>
26
+ <%% @<%=parent_plural_name%>.each do |<%=parent_singular_name%>| %>
27
+ <tr class='<%%= cycle('odd', 'even')%>'>
28
28
 
29
29
  <td>
30
- <% if album.photos.empty? %>
31
- <%= link_to "add photos to #{album.title}", album %>
32
- <% else %>
33
- <% @photo = album.photos.find(:first) %>
34
- <%= link_to image_tag(@photo.file.url(:thumb)), album %>
35
- <% end -%>
30
+ <%% if <%=parent_singular_name%>.<%=child_plural_name%>.empty? %>
31
+ <%%= link_to "add <%=child_plural_name%> to #{<%=parent_singular_name%>.title}", <%=parent_singular_name%> %>
32
+ <%% else %>
33
+ <%% @<%=child_singular_name%> = <%=parent_singular_name%>.<%=child_plural_name%>.find(:first) %>
34
+ <%%= link_to image_tag(@<%=child_singular_name%>.file.url(:thumb)), <%=parent_singular_name%> %>
35
+ <%% end -%>
36
36
  </td>
37
37
  <td>
38
- <%= album.title%>
38
+ <%%= <%=parent_singular_name%>.title%>
39
39
  </td>
40
40
  <td>
41
- <%= album.created_at.to_s(:m_d_y) %>
41
+ <%%= <%=parent_singular_name%>.created_at.to_s(:m_d_y) %>
42
42
  </td>
43
43
  <td>
44
44
  <div style='float:right'>
45
- <%=link_to('', edit_album_path(album), :class => 'edit')%>
46
- <%=link_to "", album, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy' %>
45
+ <%%=link_to('', edit_<%=parent_singular_name%>_path(<%=parent_singular_name%>), :class => 'edit')%>
46
+ <%%=link_to "", <%=parent_singular_name%>, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy' %>
47
47
  </div>
48
48
  </td>
49
49
  </tr>
50
- <% end %>
50
+ <%% end %>
51
51
 
52
52
  </table>
53
53
 
@@ -56,6 +56,6 @@
56
56
 
57
57
  <div class="clear"></div>
58
58
 
59
- <%= will_paginate @albums %>
59
+ <%%= will_paginate @<%=parent_plural_name%> %>
60
60
 
61
61
 
@@ -1,4 +1,4 @@
1
- <%= stylesheet( 'dust_album','uploadify') %>
1
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
2
2
 
3
3
  <script type="text/javascript" charset="utf-8">
4
4
  $(document).ready(function() {
@@ -10,12 +10,12 @@
10
10
  });
11
11
  </script>
12
12
 
13
- <div class='photolist'>
14
- <h1><%= link_to @album.title, album_path(@album) %></h1>
13
+ <div class='<%=child_singular_name%>list'>
14
+ <h1><%%= link_to @<%=parent_singular_name%>.title, <%=parent_singular_name%>_path(@<%=parent_singular_name%>) %></h1>
15
15
 
16
- <% form_tag '/photos/destroy' do %>
16
+ <%% form_tag '/<%=child_plural_name%>/destroy' do %>
17
17
 
18
- <table class='photos'>
18
+ <table class='<%=child_plural_name%>'>
19
19
  <tr style='color:#222;'>
20
20
  <th>
21
21
 
@@ -31,35 +31,35 @@
31
31
  Created At
32
32
  </th>
33
33
  </tr>
34
- <% @album.photos.each do |photo| %>
35
- <tr class='<%= cycle('odd', 'even')%>'>
34
+ <%% @<%=parent_singular_name%>.<%=child_plural_name%>.each do |<%=child_singular_name%>| %>
35
+ <tr class='<%%= cycle('odd', 'even')%>'>
36
36
  <td>
37
- <%= check_box_tag "photo_ids[]", photo.id %>
37
+ <%%= check_box_tag "<%=child_singular_name%>_ids[]", <%=child_singular_name%>.id %>
38
38
  </td>
39
39
  <td>
40
- <%= image_tag(photo.file.url(:thumb), :height => "60") %>
40
+ <%%= image_tag(<%=child_singular_name%>.file.url(:thumb), :height => "60") %>
41
41
 
42
- <div style="display:none"><div id="<%=photo.id%>"><%= image_tag(photo.file.url(:original)) %></div></div>
42
+ <div style="display:none"><div id="<%%=<%=child_singular_name%>.id%>"><%%= image_tag(<%=child_singular_name%>.file.url(:original)) %></div></div>
43
43
  </td>
44
44
  <td>
45
- <%= photo.file_file_name %>
45
+ <%%= <%=child_singular_name%>.file_file_name %>
46
46
  </td>
47
47
  <td>
48
- <%= number_to_human_size(photo.file_file_size) %>
48
+ <%%= number_to_human_size(<%=child_singular_name%>.file_file_size) %>
49
49
  </td>
50
50
  <td>
51
- <%= photo.created_at.to_s(:m_d_y) %>
51
+ <%%= <%=child_singular_name%>.created_at.to_s(:m_d_y) %>
52
52
  </td>
53
53
  </tr>
54
- <% end %>
54
+ <%% end %>
55
55
  <tr class='odd'>
56
56
  <td colspan='5'>
57
57
  <input type="checkbox" class="checkall"> Check all
58
- <%= submit_tag "Delete checked" %>
58
+ <%%= submit_tag "Delete checked" %>
59
59
  </td>
60
60
  </tr>
61
61
  </table>
62
62
 
63
- <% end -%>
63
+ <%% end -%>
64
64
 
65
65
  </div>
@@ -1,6 +1,6 @@
1
- <% title "New Album" %>
1
+ <%% title "New <%=parent_class_name%>" %>
2
2
 
3
- <%= stylesheet( 'dust_album','uploadify') %>
3
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
4
4
 
5
- <%= render :partial => 'form' %>
5
+ <%%= render :partial => 'form' %>
6
6
 
@@ -1,56 +1,56 @@
1
- <% title h(@album.title) %>
1
+ <%% title h(@<%=parent_singular_name%>.title) %>
2
2
 
3
- <%= stylesheet( 'dust_album','uploadify') %>
3
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
4
4
 
5
5
 
6
- <% content_for :head do %>
7
- <%= javascript_include_tag 'dragsort', 'dust_album' %>
8
- <% end -%>
6
+ <%% content_for :head do %>
7
+ <%%= javascript_include_tag 'dragsort', 'dust_<%=parent_singular_name%>' %>
8
+ <%% end -%>
9
9
 
10
- <%= render :partial => "upload_script" %>
10
+ <%%= render :partial => "upload_script" %>
11
11
 
12
12
  <div class="item">
13
13
 
14
14
  <div class='manage'>
15
- <%= link_to "", edit_album_path(@album), :class => 'edit' %>
16
- <%= link_to "", @album, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy' %>
15
+ <%%= link_to "", edit_<%=parent_singular_name%>_path(@<%=parent_singular_name%>), :class => 'edit' %>
16
+ <%%= link_to "", @<%=parent_singular_name%>, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy' %>
17
17
  </div>
18
18
 
19
19
  <h1>
20
- <%= link_to @album.title, view_album_path(@album.filename) %>
20
+ <%%= link_to @<%=parent_singular_name%>.title, view_<%=parent_singular_name%>_path(@<%=parent_singular_name%>.filename) %>
21
21
  </h1>
22
- <%= simple_format(h(@album.desc)) %>
22
+ <%%= simple_format(h(@<%=parent_singular_name%>.desc)) %>
23
23
 
24
24
  </div>
25
25
 
26
26
  <div class="item">
27
27
  <div class="manage">
28
28
  <br />
29
- <%= link_to image_tag('save_position.png'), photos_path, :id => 'order_photos' %>
29
+ <%%= link_to image_tag('save_position.png'), <%=child_plural_name%>_path, :id => 'order_<%=child_plural_name%>' %>
30
30
  </div>
31
31
 
32
- <h3 id="photos_count"><%= pluralize(@album.photos.size, "Photo")%> <% unless @album.photos.empty? %> | <%= link_to "Select Photos For Deletion", manage_photos_path(@album), :class => 'settings' %> <% end %> </h3>
33
- <p>Drag photos to reorder them. Don't forget to hit the save order button when your done.</p>
32
+ <h3 id="<%=child_plural_name%>_count"><%%= pluralize(@<%=parent_singular_name%>.<%=child_plural_name%>.size, "<%=child_class_name%>")%> <%% unless @<%=parent_singular_name%>.<%=child_plural_name%>.empty? %> | <%%= link_to "Select <%=child_plural_class_name%> For Deletion", manage_<%=child_plural_name%>_path(@<%=parent_singular_name%>), :class => 'settings' %> <%% end %> </h3>
33
+ <p>Drag <%=child_plural_name%> to reorder them. Don't forget to hit the save order button when your done.</p>
34
34
  <ul id="uploads">
35
- <%= render :partial => @album.photos.roots, :photo => @photo %>
35
+ <%%= render :partial => @<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%> %>
36
36
  </ul>
37
37
 
38
38
  <div class="clear"></div>
39
39
  </div>
40
40
 
41
- <% content_for :left do -%>
41
+ <%% content_for :left do -%>
42
42
 
43
43
  <div id="uploadify">
44
- <h3>Add Photos to <%= @album.title.titleize %></h3>
45
- <% form_for @new_photo, :html => {:multipart => true} do |f| %>
44
+ <h3>Add <%=child_plural_class_name%> to <%%= @<%=parent_singular_name%>.title.titleize %></h3>
45
+ <%% form_for @new_<%=child_singular_name%>, :html => {:multipart => true} do |f| %>
46
46
 
47
- <%= f.hidden_field :album_id, "value" => @album.id %>
47
+ <%%= f.hidden_field :<%=parent_singular_name%>_id, "value" => @<%=parent_singular_name%>.id %>
48
48
  <div class="uploadifyButtons">
49
- <%= image_submit_tag "Upload.png", :id => "photo_submit", :name => 'commit' %> <%= f.file_field :file %>
49
+ <%%= image_submit_tag "Upload.png", :id => "<%=child_singular_name%>_submit", :name => 'commit' %> <%%= f.file_field :file %>
50
50
  <div class='clear'></div>
51
51
  </div>
52
- <% end %>
52
+ <%% end %>
53
53
  </div>
54
54
 
55
- <% end -%>
55
+ <%% end -%>
56
56
 
@@ -1 +1 @@
1
- $('#uploads').html("<%= escape_javascript(render(@album.photos.roots, :photo => @photo)) %>");
1
+ $('#uploads').html("<%%= escape_javascript(render(@<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%>)) %>");
@@ -1,23 +1,23 @@
1
- <%= stylesheet( 'dust_album','uploadify') %>
1
+ <%%= stylesheet( 'dust_<%=parent_singular_name%>','uploadify') %>
2
2
 
3
- <% form_for @photo, :validations => true do |f| %>
4
- <%= f.error_messages %>
3
+ <%% form_for @<%=child_singular_name%>, :validations => true do |f| %>
4
+ <%%= f.error_messages %>
5
5
  <div class="item">
6
6
  <p>
7
- <%= f.label :title %><br />
8
- <%= f.text_field :title, :class => 'field' %>
7
+ <%%= f.label :title %><br />
8
+ <%%= f.text_field :title, :class => 'field' %>
9
9
  </p>
10
10
  </div>
11
11
 
12
12
  <div class="item">
13
13
  <p>
14
- <%= f.label :desc %><br />
15
- <%= f.text_area :desc, :class => 'field' %>
14
+ <%%= f.label :desc %><br />
15
+ <%%= f.text_area :desc, :class => 'field' %>
16
16
  </p>
17
17
  </div>
18
18
 
19
19
  <div class="item">
20
- <p><%= f.submit %></p>
20
+ <p><%%= f.submit %></p>
21
21
  </div>
22
22
 
23
- <% end %>
23
+ <%% end %>
@@ -1,5 +1,5 @@
1
- <li id="<%= "photo_#{photo.id}" %>">
2
- <div class="photo <%= "photo_#{photo.id}" %>">
1
+ <li id="<%%= "<%=child_singular_name%>_#{<%=child_singular_name%>.id}" %>">
2
+ <div class="<%=child_singular_name%> <%%= "<%=child_singular_name%>_#{<%=child_singular_name%>.id}" %>">
3
3
  <script type="text/javascript" charset="utf-8">
4
4
  $("a.settings").fancybox({
5
5
  'showCloseButton' : false,
@@ -13,13 +13,13 @@
13
13
  'opacity' : 'true'
14
14
  });
15
15
  </script>
16
- <%= image_tag photo.file.url(:thumb), :height => '50' %>
16
+ <%%= image_tag <%=child_singular_name%>.file.url(:thumb), :height => '50' %>
17
17
  <p>
18
- <%= truncate photo.title, :length => 23 %> <br />
19
- <% unless photo.date_shot.blank? %>
20
- (<%= photo.date_shot %>)
21
- <% end -%>
22
- <%= link_to "Edit Photo", edit_photo_path(photo.id)+'?edit=photo', :class => "settings", :title => "Photo Settings" %>
18
+ <%%= truncate <%=child_singular_name%>.title, :length => 23 %> <br />
19
+ <%% unless <%=child_singular_name%>.date_shot.blank? %>
20
+ (<%%= <%=child_singular_name%>.date_shot %>)
21
+ <%% end -%>
22
+ <%%= link_to "Edit <%=child_class_name%>", edit_<%=child_singular_name%>_path(<%=child_singular_name%>.id)+'?edit=<%=child_singular_name%>', :class => "settings", :title => "<%=child_class_name%> Settings" %>
23
23
  </p>
24
24
  </div>
25
25
  </li>