dust-generators 0.2.8 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dust/version.rb +2 -2
- data/lib/generators/dust/albums/templates/app/views/albums/show.html.haml +1 -1
- data/lib/generators/dust/scaffold/scaffold_generator.rb +24 -24
- data/lib/generators/dust/scaffold/templates/actions/create.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/destroy.rb +2 -2
- data/lib/generators/dust/scaffold/templates/actions/edit.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/index.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/new.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/show.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/update.rb +2 -2
- data/lib/generators/dust/scaffold/templates/controller.rb +3 -2
- data/lib/generators/dust/scaffold/templates/migration.rb +2 -2
- data/lib/generators/dust/scaffold/templates/model.rb +13 -11
- data/lib/generators/dust/scaffold/templates/view_controller.rb +8 -6
- data/lib/generators/dust/scaffold/templates/views/front_end/haml/index.html.haml +6 -5
- data/lib/generators/dust/scaffold/templates/views/front_end/haml/show.html.haml +11 -11
- data/lib/generators/dust/scaffold/templates/views/haml/_form.html.haml +1 -1
- data/lib/generators/dust/scaffold/templates/views/haml/_search.html.haml +1 -1
- data/lib/generators/dust/scaffold/templates/views/haml/index.html.haml +2 -2
- data/lib/generators/dust/scaffold/templates/views/haml/show.html.haml +1 -1
- metadata +49 -174
- data/rails_generators/dust_albums/USAGE +0 -6
- data/rails_generators/dust_albums/dust_albums_generator.rb +0 -196
- data/rails_generators/dust_albums/templates/README +0 -5
- data/rails_generators/dust_albums/templates/app/controllers/albums_controller.rb +0 -56
- data/rails_generators/dust_albums/templates/app/controllers/photos_controller.rb +0 -89
- data/rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb +0 -17
- data/rails_generators/dust_albums/templates/app/helpers/albums_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/helpers/photos_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/models/album.rb +0 -42
- data/rails_generators/dust_albums/templates/app/models/photo.rb +0 -18
- data/rails_generators/dust_albums/templates/app/views/albums/_form.html.erb +0 -52
- data/rails_generators/dust_albums/templates/app/views/albums/_search.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb +0 -37
- data/rails_generators/dust_albums/templates/app/views/albums/edit.html.erb +0 -5
- data/rails_generators/dust_albums/templates/app/views/albums/index.html.erb +0 -61
- data/rails_generators/dust_albums/templates/app/views/albums/manage.html.erb +0 -65
- data/rails_generators/dust_albums/templates/app/views/albums/new.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/albums/show.html.erb +0 -56
- data/rails_generators/dust_albums/templates/app/views/albums/show.js.erb +0 -1
- data/rails_generators/dust_albums/templates/app/views/photos/_form.html.erb +0 -23
- data/rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb +0 -25
- data/rails_generators/dust_albums/templates/app/views/photos/_search.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/photos/array.js.erb +0 -3
- data/rails_generators/dust_albums/templates/app/views/photos/edit.html.erb +0 -28
- data/rails_generators/dust_albums/templates/app/views/photos/index.html.erb +0 -85
- data/rails_generators/dust_albums/templates/app/views/photos/new.html.erb +0 -7
- data/rails_generators/dust_albums/templates/app/views/photos/show.html.erb +0 -26
- data/rails_generators/dust_albums/templates/app/views/photos/show.js.erb +0 -9
- data/rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb +0 -31
- data/rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb +0 -31
- data/rails_generators/dust_albums/templates/images/browse.png +0 -0
- data/rails_generators/dust_albums/templates/images/cancel.png +0 -0
- data/rails_generators/dust_albums/templates/images/save_position.png +0 -0
- data/rails_generators/dust_albums/templates/images/upload.png +0 -0
- data/rails_generators/dust_albums/templates/initializers/flash_session_cookie_middleware.rb +0 -17
- data/rails_generators/dust_albums/templates/initializers/session_store_middleware.rb +0 -1
- data/rails_generators/dust_albums/templates/javascript/dragsort.js +0 -288
- data/rails_generators/dust_albums/templates/javascript/dust_album.js +0 -28
- data/rails_generators/dust_albums/templates/javascript/uploadify/jquery.uploadify.v2.1.0.js +0 -258
- data/rails_generators/dust_albums/templates/javascript/uploadify/swfobject.js +0 -4
- data/rails_generators/dust_albums/templates/javascript/uploadify/uploadify.swf +0 -0
- data/rails_generators/dust_albums/templates/migration/albums_migration.rb +0 -39
- data/rails_generators/dust_albums/templates/stylesheets/dust_album.css +0 -16
- data/rails_generators/dust_albums/templates/stylesheets/dust_album_app.css +0 -15
- data/rails_generators/dust_albums/templates/stylesheets/uploadify.css +0 -84
- data/rails_generators/dust_config/USAGE +0 -23
- data/rails_generators/dust_config/dust_config_generator.rb +0 -32
- data/rails_generators/dust_config/templates/config.yml +0 -8
- data/rails_generators/dust_config/templates/load_config.rb +0 -2
- data/rails_generators/dust_scaffold/USAGE +0 -51
- data/rails_generators/dust_scaffold/dust_scaffold_generator.rb +0 -291
- data/rails_generators/dust_scaffold/templates/actions/create.rb +0 -9
- data/rails_generators/dust_scaffold/templates/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/actions/edit.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/index.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/new.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/show.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/update.rb +0 -9
- data/rails_generators/dust_scaffold/templates/controller.rb +0 -9
- data/rails_generators/dust_scaffold/templates/fixtures.yml +0 -9
- data/rails_generators/dust_scaffold/templates/helper.rb +0 -2
- data/rails_generators/dust_scaffold/templates/migration.rb +0 -20
- data/rails_generators/dust_scaffold/templates/model.rb +0 -37
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/create.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/edit.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/index.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/new.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/show.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/update.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/rspec/controller.rb +0 -8
- data/rails_generators/dust_scaffold/templates/tests/rspec/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/create.rb +0 -13
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb +0 -8
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/edit.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/index.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/new.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/show.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/update.rb +0 -13
- data/rails_generators/dust_scaffold/templates/tests/shoulda/controller.rb +0 -5
- data/rails_generators/dust_scaffold/templates/tests/shoulda/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/edit.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/index.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/new.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/show.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/testunit/controller.rb +0 -5
- data/rails_generators/dust_scaffold/templates/tests/testunit/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/view_controller.rb +0 -17
- data/rails_generators/dust_scaffold/templates/views/erb/_form.html.erb +0 -16
- data/rails_generators/dust_scaffold/templates/views/erb/_search.html.erb +0 -6
- data/rails_generators/dust_scaffold/templates/views/erb/edit.html.erb +0 -4
- data/rails_generators/dust_scaffold/templates/views/erb/index.html.erb +0 -24
- data/rails_generators/dust_scaffold/templates/views/erb/new.html.erb +0 -5
- data/rails_generators/dust_scaffold/templates/views/erb/show.html.erb +0 -23
- data/rails_generators/dust_scaffold/templates/views/front_end/index.html.erb +0 -14
- data/rails_generators/dust_scaffold/templates/views/front_end/show.html.erb +0 -17
@@ -1,56 +0,0 @@
|
|
1
|
-
<%% title h(@<%=parent_singular_name%>.title) %>
|
2
|
-
|
3
|
-
<%%= stylesheet( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify') %>
|
4
|
-
|
5
|
-
|
6
|
-
<%% content_for :head do %>
|
7
|
-
<%%= javascript_include_tag 'dragsort', 'dust_<%=parent_singular_name%>' %>
|
8
|
-
<%% end -%>
|
9
|
-
|
10
|
-
<%%= render :partial => "upload_script" %>
|
11
|
-
|
12
|
-
<div class="item">
|
13
|
-
|
14
|
-
<div class='manage'>
|
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
|
-
</div>
|
18
|
-
|
19
|
-
<h1>
|
20
|
-
<%%= link_to @<%=parent_singular_name%>.title, view_<%=parent_singular_name%>_path(@<%=parent_singular_name%>.filename) %>
|
21
|
-
</h1>
|
22
|
-
<%%= simple_format(h(@<%=parent_singular_name%>.desc)) %>
|
23
|
-
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div class="item">
|
27
|
-
<div class="manage">
|
28
|
-
<br />
|
29
|
-
<%%= link_to image_tag('save_position.png'), <%=child_plural_name%>_path, :id => 'order_<%=child_plural_name%>' %>
|
30
|
-
</div>
|
31
|
-
|
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
|
-
<ul id="uploads">
|
35
|
-
<%%= render :partial => @<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%> %>
|
36
|
-
</ul>
|
37
|
-
|
38
|
-
<div class="clear"></div>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<%% content_for :left do -%>
|
42
|
-
|
43
|
-
<div id="uploadify">
|
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
|
-
|
47
|
-
<%%= f.hidden_field :<%=parent_singular_name%>_id, "value" => @<%=parent_singular_name%>.id %>
|
48
|
-
<div class="uploadifyButtons">
|
49
|
-
<%%= image_submit_tag "upload.png", :id => "<%=child_singular_name%>_submit", :name => 'commit' %> <%%= f.file_field :file %>
|
50
|
-
<div class='clear'></div>
|
51
|
-
</div>
|
52
|
-
<%% end %>
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<%% end -%>
|
56
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
$('#uploads').html("<%%= escape_javascript(render(@<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%>)) %>");
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<%%= stylesheet( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify') %>
|
2
|
-
|
3
|
-
<%% form_for @<%=child_singular_name%>, :validations => true do |f| %>
|
4
|
-
<%%= f.error_messages %>
|
5
|
-
<div class="item">
|
6
|
-
<p>
|
7
|
-
<%%= f.label :title %><br />
|
8
|
-
<%%= f.text_field :title, :class => 'field' %>
|
9
|
-
</p>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<div class="item">
|
13
|
-
<p>
|
14
|
-
<%%= f.label :desc %><br />
|
15
|
-
<%%= f.text_area :desc, :class => 'field' %>
|
16
|
-
</p>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="item">
|
20
|
-
<p><%%= f.submit %></p>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<%% end %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<li id="<%%= "<%=child_singular_name%>_#{<%=child_singular_name%>.id}" %>">
|
2
|
-
<div class="<%=child_singular_name%> <%%= "<%=child_singular_name%>_#{<%=child_singular_name%>.id}" %>">
|
3
|
-
<script type="text/javascript" charset="utf-8">
|
4
|
-
$("a.settings").fancybox({
|
5
|
-
'showCloseButton' : false,
|
6
|
-
'transitionIn' : 'elastic',
|
7
|
-
'transitionOut' : 'elastic',
|
8
|
-
'speedIn' : 400,
|
9
|
-
'speedOut' : 200,
|
10
|
-
'hideOnContentClick': false,
|
11
|
-
'overlayOpacity' : 0.6,
|
12
|
-
'overlayColor' : '#000',
|
13
|
-
'opacity' : 'true'
|
14
|
-
});
|
15
|
-
</script>
|
16
|
-
<%%= image_tag <%=child_singular_name%>.file.url(:thumb), :height => '50' %>
|
17
|
-
<p>
|
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
|
-
</p>
|
24
|
-
</div>
|
25
|
-
</li>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<div id="searchbox">
|
2
|
-
<%% form_tag <%=child_plural_name%>_path, :method => 'get' do %>
|
3
|
-
<%%= text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search <%=child_plural_class_name%>' %>
|
4
|
-
<%%= image_submit_tag "admin/blank.png", :class => "image-submit"%>
|
5
|
-
<%% end %>
|
6
|
-
</div>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<%% title "Edit <%=child_class_name%>" %>
|
2
|
-
|
3
|
-
<%% if params[:edit] == '<%=child_singular_name%>' %>
|
4
|
-
<script type="text/javascript" charset="utf-8">
|
5
|
-
|
6
|
-
var options = {
|
7
|
-
success: showFlash,
|
8
|
-
data: {format: 'js'},
|
9
|
-
clearForm: true
|
10
|
-
};
|
11
|
-
|
12
|
-
$('.edit_<%=child_singular_name%>').ajaxForm(options);
|
13
|
-
|
14
|
-
$("#<%=child_singular_name%>_submit").click(function () {
|
15
|
-
$("#fancybox-inner").fadeTo("slow", 0.1);
|
16
|
-
$.fancybox.showActivity();
|
17
|
-
});
|
18
|
-
|
19
|
-
function showFlash() {
|
20
|
-
$("#status").html("Success, Your settings have been saved");
|
21
|
-
$('#status').fadeIn().delay(2000).slideUp('slow');
|
22
|
-
$.fancybox.close();
|
23
|
-
$("#fancybox-inner").fadeTo("slow", 1);
|
24
|
-
}
|
25
|
-
</script>
|
26
|
-
<%% end -%>
|
27
|
-
|
28
|
-
<%%= render :partial => 'form' %>
|
@@ -1,85 +0,0 @@
|
|
1
|
-
<%% title "<%=child_plural_class_name%>" %>
|
2
|
-
|
3
|
-
<%%= stylesheet( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify') %>
|
4
|
-
<%%= javascript( 'uploadify/jquery.uploadify.v2.1.0' ) %>
|
5
|
-
|
6
|
-
<script type="text/javascript" charset="utf-8">
|
7
|
-
$(document).ready(function() {
|
8
|
-
$(function () { // this line makes sure this code runs on page load
|
9
|
-
$('.checkall').click(function () {
|
10
|
-
$(this).parents('form:eq(0)').find(':checkbox').attr('checked', this.checked);
|
11
|
-
});
|
12
|
-
});
|
13
|
-
});
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<div class="button_bar">
|
17
|
-
<%%= render :partial => 'search' %>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
|
21
|
-
<%%= will_paginate @<%=child_plural_name%> %>
|
22
|
-
|
23
|
-
<%% @<%=child_singular_name%>_<%=parent_plural_name%>.sort.each do |title, <%=child_plural_name%>| %>
|
24
|
-
<div class='<%=child_singular_name%>list'>
|
25
|
-
<h1><%%= link_to title, <%=parent_singular_name%>_path(<%=child_plural_name%>.first.<%=parent_singular_name%>) %></h1>
|
26
|
-
|
27
|
-
<%% form_for :<%=child_singular_name%>, :url => {:action => 'destroy'} do %>
|
28
|
-
|
29
|
-
<table class='<%=child_plural_name%>'>
|
30
|
-
<tr style='color:#222;'>
|
31
|
-
<th>
|
32
|
-
|
33
|
-
</th>
|
34
|
-
<th></th>
|
35
|
-
<th>
|
36
|
-
File Name
|
37
|
-
</th>
|
38
|
-
<th>
|
39
|
-
File Size
|
40
|
-
</th>
|
41
|
-
<th>
|
42
|
-
Created At
|
43
|
-
</th>
|
44
|
-
</tr>
|
45
|
-
<%% for <%=child_singular_name%> in <%=child_plural_name%> %>
|
46
|
-
<%%= hidden_field_tag :<%=parent_singular_name%>_id, <%=child_singular_name%>.<%=parent_singular_name%>.id %>
|
47
|
-
<tr class='<%%= cycle('odd', 'even')%>'>
|
48
|
-
<td>
|
49
|
-
<%%= check_box_tag "<%=child_singular_name%>_ids[]", <%=child_singular_name%>.id %>
|
50
|
-
</td>
|
51
|
-
<td>
|
52
|
-
<%%= link_to image_tag(<%=child_singular_name%>.file.url(:thumb), :height => "30"), <%=child_singular_name%>.file.url(:original), :rel => title, :id => 'single_image' %>
|
53
|
-
|
54
|
-
<div style="display:none"><div id="<%%=<%=child_singular_name%>.id%>"><%%= image_tag(<%=child_singular_name%>.file.url(:original)) %></div></div>
|
55
|
-
</td>
|
56
|
-
<td>
|
57
|
-
<%%= <%=child_singular_name%>.file_file_name %>
|
58
|
-
</td>
|
59
|
-
<td>
|
60
|
-
<%%= number_to_human_size(<%=child_singular_name%>.file_file_size) %>
|
61
|
-
</td>
|
62
|
-
<td>
|
63
|
-
<%%= <%=child_singular_name%>.created_at.to_s(:m_d_y) %>
|
64
|
-
</td>
|
65
|
-
</tr>
|
66
|
-
<%% end %>
|
67
|
-
<tr class='odd'>
|
68
|
-
<td colspan='5'>
|
69
|
-
<input type="checkbox" class="checkall"> Check all
|
70
|
-
<%%= submit_tag "Delete checked" %>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
|
75
|
-
|
76
|
-
<%% end -%>
|
77
|
-
|
78
|
-
</div>
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
<%% end %>
|
83
|
-
|
84
|
-
<%%= will_paginate @<%=child_plural_name%> %>
|
85
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<%% title "<%=child_class_name%>" %>
|
2
|
-
|
3
|
-
<%%= stylesheet( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify') %>
|
4
|
-
|
5
|
-
<p>
|
6
|
-
<strong>Title:</strong>
|
7
|
-
<%%=h @<%=child_singular_name%>.title %>
|
8
|
-
</p>
|
9
|
-
<p>
|
10
|
-
<strong>Desc:</strong>
|
11
|
-
<%%=h @<%=child_singular_name%>.desc %>
|
12
|
-
</p>
|
13
|
-
<p>
|
14
|
-
<strong>Date Shot:</strong>
|
15
|
-
<%%=h @<%=child_singular_name%>.date_shot %>
|
16
|
-
</p>
|
17
|
-
<p>
|
18
|
-
<strong>Location:</strong>
|
19
|
-
<%%=h @<%=child_singular_name%>.location %>
|
20
|
-
</p>
|
21
|
-
|
22
|
-
<p>
|
23
|
-
<%%= link_to "Edit", edit_<%=child_singular_name%>_path(@<%=child_singular_name%>) %> |
|
24
|
-
<%%= link_to "Destroy", @<%=child_singular_name%>, :confirm => 'Are you sure?', :method => :delete %> |
|
25
|
-
<%%= link_to "View All", <%=child_plural_name%>_path %>
|
26
|
-
</p>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
$('#<%=child_plural_name%>_count').html('<%%= pluralize(@<%=parent_singular_name%>.<%=child_plural_name%>.size, "<%=child_class_name%>")%> | <%%= link_to "Select <%=child_plural_class_name%> For Deletion", manage_<%=child_plural_name%>_path(@<%=parent_singular_name%>), :class => 'settings' %> ');
|
2
|
-
$('#uploads').append("<%%= escape_javascript(render(:partial => "<%=child_plural_name%>/<%=child_singular_name%>", :locals => {:<%=child_singular_name%> => @<%=child_singular_name%>})) %>");
|
3
|
-
$("a#inline").fancybox({
|
4
|
-
'transitionIn' : 'elastic',
|
5
|
-
'transitionOut' : 'elastic',
|
6
|
-
'speedIn' : 200,
|
7
|
-
'speedOut' : 200,
|
8
|
-
'hideOnContentClick': false
|
9
|
-
});
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<%% title "All <%=parent_plural_class_name%>" %>
|
2
|
-
<%% heading "All <%=parent_plural_class_name%>" %>
|
3
|
-
|
4
|
-
<%% content_for :head do %>
|
5
|
-
<%%= stylesheet_link_tag 'dust_<%=parent_singular_name%>_app' %>
|
6
|
-
<%% end -%>
|
7
|
-
|
8
|
-
<%%= will_paginate @<%=parent_plural_name%> %>
|
9
|
-
|
10
|
-
<%% @<%=parent_plural_name%>.each do |<%=parent_singular_name%>| %>
|
11
|
-
<div class="<%=parent_singular_name%>_thumb">
|
12
|
-
<%% unless <%=parent_singular_name%>.<%=child_plural_name%>.empty? %>
|
13
|
-
|
14
|
-
<%% @<%=child_singular_name%> = <%=parent_singular_name%>.<%=child_plural_name%>.find(:first) %>
|
15
|
-
|
16
|
-
<%% link_to view_<%=parent_singular_name%>_path(<%=parent_singular_name%>.filename), :style => 'float:left; ' do %>
|
17
|
-
<%%= image_tag @<%=child_singular_name%>.file.url(:thumb), :alt => <%=parent_singular_name%>.heading %>
|
18
|
-
<%% end %>
|
19
|
-
|
20
|
-
<p>
|
21
|
-
<%%= link_to <%=parent_singular_name%>.title, view_<%=parent_singular_name%>_path(<%=parent_singular_name%>.filename) %><br />
|
22
|
-
<%%= truncate(<%=parent_singular_name%>.desc, :length => 100) %>
|
23
|
-
<%%= link_to "Read More", view_<%=parent_singular_name%>_path(<%=parent_singular_name%>.filename) unless <%=parent_singular_name%>.desc.blank? %>
|
24
|
-
</p>
|
25
|
-
|
26
|
-
<%% end -%>
|
27
|
-
</div>
|
28
|
-
<%% end -%>
|
29
|
-
<div class="clear"></div>
|
30
|
-
|
31
|
-
<%%= will_paginate @<%=parent_plural_name%> %>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<%% title @<%=parent_singular_name%>.title %>
|
2
|
-
<%% heading @<%=parent_singular_name%>.heading %>
|
3
|
-
|
4
|
-
<%% content_for :head do %>
|
5
|
-
<%%= stylesheet_link_tag 'dust_<%=parent_singular_name%>_app' %>
|
6
|
-
<%% end -%>
|
7
|
-
|
8
|
-
<%%= @<%=parent_singular_name%>.desc %>
|
9
|
-
|
10
|
-
<%%= will_paginate @<%=child_plural_name%> %>
|
11
|
-
|
12
|
-
<div id="uploads">
|
13
|
-
<%% @<%=child_plural_name%>.each do |<%=child_singular_name%>| %>
|
14
|
-
<div class="<%=child_singular_name%>">
|
15
|
-
<%%= link_to image_tag(<%=child_singular_name%>.file.url(:thumb), :alt => <%=child_singular_name%>.desc), <%=child_singular_name%>.file.url(:large), :class => 'group', :rel => "#{@<%=parent_singular_name%>.title}" %><br />
|
16
|
-
<%%= truncate <%=child_singular_name%>.title, :length => 23 %>
|
17
|
-
</div>
|
18
|
-
<%% end -%>
|
19
|
-
</div>
|
20
|
-
<div class="clear"></div>
|
21
|
-
|
22
|
-
<%%= will_paginate @<%=child_plural_name%> %>
|
23
|
-
|
24
|
-
<%% if permitted_to? :manage, :<%=parent_plural_name%> %>
|
25
|
-
<p>
|
26
|
-
<%%= link_to "Manage <%=child_plural_class_name%>", @<%=parent_singular_name%> %> |
|
27
|
-
<%%= link_to "Edit", edit_<%=parent_singular_name%>_path(@<%=parent_singular_name%>) %> |
|
28
|
-
<%%= link_to "Destroy", @<%=parent_singular_name%>, :confirm => 'Are you sure?', :method => :delete %> |
|
29
|
-
<%%= link_to "View All", <%=parent_plural_name%>_path %>
|
30
|
-
</p>
|
31
|
-
<%% end %>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'rack/utils'
|
2
|
-
|
3
|
-
class FlashSessionCookieMiddleware
|
4
|
-
def initialize(app, session_key = '_session_id')
|
5
|
-
@app = app
|
6
|
-
@session_key = session_key
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/
|
11
|
-
req = Rack::Request.new(env)
|
12
|
-
env['HTTP_COOKIE'] = "#{@session_key}=#{req.params[@session_key]}".freeze unless req.params[@session_key].nil?
|
13
|
-
end
|
14
|
-
|
15
|
-
@app.call(env)
|
16
|
-
end
|
17
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
ActionController::Dispatcher.middleware.insert_before(ActionController::Session::CookieStore, FlashSessionCookieMiddleware, ActionController::Base.session_options[:key])
|