sbdevcore 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/app/assets/images/28DaysLater.ttf +0 -0
  2. data/app/assets/images/ajax-loader.gif +0 -0
  3. data/app/assets/javascripts/jquery.tools.min.js +16 -108
  4. data/app/assets/javascripts/rails.validations.custom.js +5 -0
  5. data/app/assets/javascripts/sbdev-ajax.js +14 -0
  6. data/app/assets/javascripts/sbdevcore-tools.js +24 -37
  7. data/app/assets/javascripts/sbdevcore.js +8 -3
  8. data/app/assets/javascripts/tiny_mce_config.js +2 -0
  9. data/app/assets/stylesheets/_bar_nav.scss +6 -4
  10. data/app/assets/stylesheets/_buttons.scss +16 -10
  11. data/app/assets/stylesheets/_forms.scss +51 -0
  12. data/app/assets/stylesheets/_mixins.scss +40 -15
  13. data/app/assets/stylesheets/_overlay.scss +4 -7
  14. data/app/assets/stylesheets/_sbdev_core.scss +55 -19
  15. data/app/assets/stylesheets/_yui_base.scss +142 -0
  16. data/app/controllers/contacts_controller.rb +2 -36
  17. data/app/controllers/downloadables_controller.rb +6 -46
  18. data/app/controllers/galleries_controller.rb +4 -49
  19. data/app/controllers/indices_controller.rb +2 -45
  20. data/app/controllers/photos_controller.rb +4 -48
  21. data/app/controllers/sbdev_core_controller.rb +40 -0
  22. data/app/controllers/texts_controller.rb +3 -46
  23. data/app/controllers/videos_controller.rb +4 -45
  24. data/app/models/contact.rb +5 -1
  25. data/app/models/downloadable.rb +3 -1
  26. data/app/models/index.rb +4 -1
  27. data/app/models/photo.rb +3 -1
  28. data/app/models/video.rb +2 -0
  29. data/app/views/admins/mailer/confirmation_instructions.html.haml +4 -0
  30. data/app/views/admins/mailer/reset_password_instructions.html.haml +6 -0
  31. data/app/views/admins/mailer/unlock_instructions.html.haml +5 -0
  32. data/app/views/admins/passwords/edit.html.haml +8 -0
  33. data/app/views/admins/passwords/new.html.haml +6 -0
  34. data/app/views/admins/sessions/new.html.haml +8 -0
  35. data/app/views/admins/shared/_links.haml +19 -0
  36. data/app/views/application/_header.html.haml +1 -0
  37. data/app/views/application/_secondary_nav.html.haml +3 -0
  38. data/app/views/contacts/_form.html.haml +5 -0
  39. data/app/views/contacts/edit.html.haml +6 -0
  40. data/app/views/contacts/index.html.haml +21 -0
  41. data/app/views/contacts/new.html.haml +2 -0
  42. data/app/views/contacts/show.html.haml +24 -0
  43. data/app/views/downloadables/_form.html.haml +6 -0
  44. data/app/views/downloadables/_show.html.haml +7 -0
  45. data/app/views/downloadables/edit.html.haml +3 -0
  46. data/app/views/downloadables/new.html.haml +4 -0
  47. data/app/views/galleries/_form.html.haml +22 -0
  48. data/app/views/galleries/edit.html.haml +10 -0
  49. data/app/views/galleries/index.html.haml +9 -0
  50. data/app/views/galleries/new.html.haml +3 -0
  51. data/app/views/galleries/show.html.haml +9 -0
  52. data/app/views/indices/_form.html.haml +43 -0
  53. data/app/views/indices/_show.html.haml +17 -0
  54. data/app/views/indices/edit.html.haml +3 -0
  55. data/app/views/indices/index.html.haml +17 -0
  56. data/app/views/layouts/application.html.haml +16 -1
  57. data/app/views/layouts/bar_nav.html.haml +7 -14
  58. data/app/views/layouts/sbdev_core.html.haml +39 -0
  59. data/app/views/layouts/tab_nav.html.haml +9 -14
  60. data/app/views/mailer/message.haml +4 -0
  61. data/app/views/photos/_form.html.haml +10 -0
  62. data/app/views/photos/_show.html.haml +7 -0
  63. data/app/views/photos/edit.html.haml +3 -0
  64. data/app/views/photos/index.html.haml +21 -0
  65. data/app/views/photos/new.html.haml +4 -0
  66. data/app/views/photos/show.html.haml +4 -0
  67. data/app/views/sbdev_core/index.html.haml +1 -0
  68. data/app/views/sbdev_core/show.html.haml +4 -0
  69. data/app/views/sbdev_core/show.js.haml +1 -0
  70. data/app/views/shared/_asset_show.html.haml +1 -0
  71. data/app/views/shared/_devise_links.haml +15 -0
  72. data/app/views/shared/_gallery.html.haml +14 -0
  73. data/app/views/shared/_prioritizable_fields.html.haml +5 -0
  74. data/app/views/texts/_form.html.haml +3 -0
  75. data/app/views/texts/_show.html.haml +6 -0
  76. data/app/views/texts/edit.html.haml +3 -0
  77. data/app/views/texts/new.html.haml +4 -0
  78. data/app/views/texts/show.html.haml +8 -0
  79. data/app/views/videos/_form.html.haml +7 -0
  80. data/app/views/videos/_show.html.haml +12 -0
  81. data/app/views/videos/edit.html.haml +3 -0
  82. data/app/views/videos/index.html.haml +11 -0
  83. data/app/views/videos/new.html.haml +4 -0
  84. data/app/views/videos/show.html.haml +9 -0
  85. data/app/views/videos/show.js.haml +4 -0
  86. data/config/initializers/client_side_validations.rb +14 -0
  87. data/config/initializers/custom_validators.rb +15 -0
  88. data/config/initializers/load_app_config.rb +2 -0
  89. data/config/initializers/simple_form.rb +93 -0
  90. data/config/locales/en.yml +4 -1
  91. data/db/migrate/20110811000613_create_indices.rb +3 -0
  92. data/db/seeds.rb +23 -57
  93. data/lib/generators/sbdevcore/install_generator.rb +0 -2
  94. data/lib/generators/sbdevcore/templates/application.scss +1 -0
  95. data/lib/generators/sbdevcore/templates/application/_404.html.haml +2 -0
  96. data/lib/generators/sbdevcore/templates/application/_footer.html.haml +2 -1
  97. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.haml +3 -0
  98. data/lib/generators/sbdevcore/templates/application/_nav.html.haml +1 -1
  99. data/lib/generators/sbdevcore/templates/config/initializers/mailer_setup.rb +2 -2
  100. data/lib/generators/sbdevcore/templates/config/initializers/simple_form.rb +93 -0
  101. data/lib/generators/sbdevcore/templates/new_contact.html.haml +4 -0
  102. data/lib/sbdevcore.rb +25 -2
  103. data/lib/sbdevcore/engine.rb +13 -34
  104. data/lib/sbdevcore/version.rb +1 -1
  105. data/lib/tasks/sbdevcore.rake +1 -1
  106. data/public/404.html +2 -2
  107. data/sbdevcore.gemspec +7 -2
  108. metadata +296 -156
  109. data/app/assets/stylesheets/_js_errors.scss +0 -26
  110. data/app/controllers/core_controller.rb +0 -5
  111. data/app/controllers/sbdevcore/application_controller_extensions.rb +0 -13
  112. data/app/controllers/statics_controller.rb +0 -6
  113. data/app/models/asset.rb +0 -27
  114. data/app/views/admins/confirmations/new.html.erb +0 -12
  115. data/app/views/admins/mailer/confirmation_instructions.html.erb +0 -5
  116. data/app/views/admins/mailer/reset_password_instructions.html.erb +0 -8
  117. data/app/views/admins/mailer/unlock_instructions.html.erb +0 -7
  118. data/app/views/admins/passwords/edit.html.erb +0 -16
  119. data/app/views/admins/passwords/new.html.erb +0 -12
  120. data/app/views/admins/registrations/edit.html.erb +0 -25
  121. data/app/views/admins/registrations/new.html.erb +0 -18
  122. data/app/views/admins/sessions/new.html.erb +0 -17
  123. data/app/views/admins/unlocks/new.html.erb +0 -12
  124. data/app/views/contacts/_form.html.erb +0 -18
  125. data/app/views/contacts/edit.html.erb +0 -8
  126. data/app/views/contacts/index.html.erb +0 -27
  127. data/app/views/contacts/new.html.erb +0 -4
  128. data/app/views/contacts/show.html.erb +0 -32
  129. data/app/views/downloadables/_form.html.erb +0 -17
  130. data/app/views/downloadables/_show.html.erb +0 -8
  131. data/app/views/downloadables/edit.html.erb +0 -4
  132. data/app/views/downloadables/new.html.erb +0 -6
  133. data/app/views/galleries/_form.html.erb +0 -33
  134. data/app/views/galleries/edit.html.erb +0 -13
  135. data/app/views/galleries/index.html.erb +0 -16
  136. data/app/views/galleries/new.html.erb +0 -8
  137. data/app/views/galleries/show.html.erb +0 -17
  138. data/app/views/indices/_form.html.erb +0 -60
  139. data/app/views/indices/_show.html.erb +0 -22
  140. data/app/views/indices/edit.html.erb +0 -12
  141. data/app/views/indices/index.html.erb +0 -23
  142. data/app/views/indices/new.html.erb +0 -8
  143. data/app/views/indices/show.html.erb +0 -4
  144. data/app/views/indices/show.js.erb +0 -1
  145. data/app/views/photos/_form.html.erb +0 -27
  146. data/app/views/photos/_show.html.erb +0 -14
  147. data/app/views/photos/edit.html.erb +0 -4
  148. data/app/views/photos/index.html.erb +0 -27
  149. data/app/views/photos/new.html.erb +0 -6
  150. data/app/views/photos/overlay.html.erb +0 -1
  151. data/app/views/photos/show.html.erb +0 -5
  152. data/app/views/shared/_asset_show.html.erb +0 -1
  153. data/app/views/shared/_gallery.html.erb +0 -21
  154. data/app/views/shared/_prioritizable_fields.html.erb +0 -10
  155. data/app/views/shared/course_type_index.html.erb +0 -16
  156. data/app/views/texts/_form.html.erb +0 -9
  157. data/app/views/texts/_new.html.erb +0 -6
  158. data/app/views/texts/_show.html.erb +0 -9
  159. data/app/views/texts/edit.html.erb +0 -4
  160. data/app/views/texts/new.html.erb +0 -6
  161. data/app/views/texts/show.html.erb +0 -9
  162. data/app/views/videos/_form.html.erb +0 -17
  163. data/app/views/videos/_show.html.erb +0 -16
  164. data/app/views/videos/edit.html.erb +0 -4
  165. data/app/views/videos/index.html.erb +0 -17
  166. data/app/views/videos/new.html.erb +0 -6
  167. data/app/views/videos/show.html.erb +0 -12
  168. data/lib/generators/sbdevcore/templates/application/_404.html.erb +0 -2
  169. data/lib/generators/sbdevcore/templates/application/_inline_nav.html.erb +0 -7
  170. data/lib/generators/sbdevcore/templates/config/tiny_mce.yml +0 -46
  171. data/lib/generators/sbdevcore/templates/new_contact.html.erb +0 -4
  172. data/vendor/assets/stylesheets/.gitkeep +0 -0
  173. data/vendor/plugins/.gitkeep +0 -0
@@ -1,26 +0,0 @@
1
- .error em {
2
- border:16px solid;
3
- border-color:yellow transparent transparent;
4
- bottom:-32px;
5
- display:block;
6
- height:0;
7
- left:130px;
8
- position:absolute;
9
- width:0;
10
- }
11
-
12
- /* error message */
13
- .error {
14
- height:15px;
15
- background-color:yellow;
16
- padding:5px 10px;
17
- display:none;
18
- font-size: 14px;
19
- z-index: 10001;
20
- @include corners-all($corner-radius);
21
- @include box-shadow(6px);
22
- }
23
-
24
- .error p {
25
- margin:0;
26
- }
@@ -1,5 +0,0 @@
1
- class CoreController < ActionController::Base
2
- protect_from_forgery
3
- # inherit_resources
4
- respond_to :html
5
- end
@@ -1,13 +0,0 @@
1
- module Sbdevcore
2
- module ApplicationControllerExtensions
3
- def self.included(base)
4
- base.send(:include, InstanceMethods)
5
- base.before_filter :get_index
6
- end
7
- module InstanceMethods
8
- def get_index
9
- @index = Index.find_by_name(controller_name)
10
- end
11
- end
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- class StaticsController < ApplicationController
2
- def show
3
- @index = Index.find_by_name(params[:page])
4
- render "indices/index"
5
- end
6
- end
data/app/models/asset.rb DELETED
@@ -1,27 +0,0 @@
1
- class Asset < ActiveRecord::Base
2
- attr_accessible :title, :asset, :asset_file_name, :asset_content_type, :asset_file_size, :owner_id, :owner_type, :klass, :author, :remote_id, :remote_type, :description
3
- belongs_to :owner, :polymorphic => true
4
-
5
- # include ActsAsPrioritizable
6
- # acts_as_prioritizable("owner","assets")
7
-
8
- def name
9
- title.nil? ? "" : title
10
- end
11
-
12
- def transliterate(str)
13
- s = Iconv.iconv('ascii//ignore//translit', 'utf-8', str).to_s
14
- s.downcase!
15
- s.gsub!(/'/, '')
16
- s.gsub!(/[^A-Za-z0-9]+/, ' ')
17
- s.strip!
18
- s.gsub!(/\ +/, '-')
19
- s
20
- end
21
-
22
- def transliterate_file_name
23
- extension = File.extname(asset_file_name).gsub(/^\.+/, '')
24
- filename = asset_file_name.gsub(/\.#{extension}$/, '')
25
- self.asset.instance_write(:file_name, "#{transliterate(filename)}.#{transliterate(extension)}")
26
- end
27
- end
@@ -1,12 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <p><%= f.label :email %><br />
7
- <%= f.email_field :email %></p>
8
-
9
- <p><%= f.submit "Resend confirmation instructions" %></p>
10
- <% end %>
11
-
12
- <%= render :partial => "devise/shared/links" %>
@@ -1,5 +0,0 @@
1
- <p>Welcome <%= @resource.email %>!</p>
2
-
3
- <p>You can confirm your account through the link below:</p>
4
-
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -1,16 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= devise_error_messages! %>
5
- <%= f.hidden_field :reset_password_token %>
6
-
7
- <p><%= f.label :password, "New password" %><br />
8
- <%= f.password_field :password %></p>
9
-
10
- <p><%= f.label :password_confirmation, "Confirm new password" %><br />
11
- <%= f.password_field :password_confirmation %></p>
12
-
13
- <p><%= f.submit "Change my password" %></p>
14
- <% end %>
15
-
16
- <%= render :partial => "devise/shared/links" %>
@@ -1,12 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <p><%= f.label :email %><br />
7
- <%= f.email_field :email %></p>
8
-
9
- <p><%= f.submit "Send me reset password instructions" %></p>
10
- <% end %>
11
-
12
- <%= render :partial => "devise/shared/links" %>
@@ -1,25 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <p><%= f.label :email %><br />
7
- <%= f.email_field :email %></p>
8
-
9
- <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
10
- <%= f.password_field :password %></p>
11
-
12
- <p><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></p>
14
-
15
- <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
16
- <%= f.password_field :current_password %></p>
17
-
18
- <p><%= f.submit "Update" %></p>
19
- <% end %>
20
-
21
- <h3>Cancel my account</h3>
22
-
23
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
24
-
25
- <%= link_to "Back", :back %>
@@ -1,18 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <p><%= f.label :email %><br />
7
- <%= f.email_field :email %></p>
8
-
9
- <p><%= f.label :password %><br />
10
- <%= f.password_field :password %></p>
11
-
12
- <p><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></p>
14
-
15
- <p><%= f.submit "Sign up" %></p>
16
- <% end %>
17
-
18
- <%= render :partial => "devise/shared/links" %>
@@ -1,17 +0,0 @@
1
- <h2>Sign in</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
- <p><%= f.label :username %><br />
5
- <%= f.text_field :username %></p>
6
-
7
- <p><%= f.label :password %><br />
8
- <%= f.password_field :password %></p>
9
-
10
- <% if devise_mapping.rememberable? -%>
11
- <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
12
- <% end -%>
13
-
14
- <p><%= f.submit "Sign in" %></p>
15
- <% end %>
16
-
17
- <%= render :partial => "devise/shared/links" %>
@@ -1,12 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <p><%= f.label :email %><br />
7
- <%= f.email_field :email %></p>
8
-
9
- <p><%= f.submit "Resend unlock instructions" %></p>
10
- <% end %>
11
-
12
- <%= render :partial => "devise/shared/links" %>
@@ -1,18 +0,0 @@
1
- <%= form_for @contact, :html => {:class => "validate", :novalidate => "novalidate"} do |f| %>
2
- <div id='contact_form'>
3
- <p>
4
- <%= f.label :name, "What's your name?" %><br />
5
- <%= f.text_field :name, :size => 35, :required => true %>
6
- </p>
7
- <p>
8
- <%= f.label :email, "and email address?" %><br />
9
- <%= tag(:input, {:name => "contact[email]", :type => :email, :required => true, :size => 35}) %>
10
- </p>
11
- <p>
12
- <%= f.label :message, "Your message." %>
13
- <br />
14
- <%= f.text_area :message, :rows => 10, :cols => 64, :required => true %>
15
- </p>
16
- <%= f.submit "Send Message" %>
17
- </div>
18
- <% end %>
@@ -1,8 +0,0 @@
1
- <% title "Edit Contact" %>
2
-
3
- <%= render :partial => 'form' %>
4
-
5
- <p>
6
- <%= link_to "Show", @contact %> |
7
- <%= link_to "View All", contacts_path %>
8
- </p>
@@ -1,27 +0,0 @@
1
- <% title "Contacts" %>
2
-
3
- <table>
4
- <tr>
5
- <th>Name</th>
6
- <th>From</th>
7
- <th>Arrival Date</th>
8
- <th>Departure Date</th>
9
- <th>Email</th>
10
- <th>Message</th>
11
- </tr>
12
- <% for contact in @contacts %>
13
- <tr>
14
- <td><%=h contact.name %></td>
15
- <td><%=h contact.from %></td>
16
- <td><%=h contact.arrival_date %></td>
17
- <td><%=h contact.departure_date %></td>
18
- <td><%=h contact.email %></td>
19
- <td><%=h contact.message %></td>
20
- <td><%= link_to "Show", contact %></td>
21
- <td><%= link_to "Edit", edit_contact_path(contact) %></td>
22
- <td><%= link_to "Destroy", contact, :confirm => 'Are you sure?', :method => :delete %></td>
23
- </tr>
24
- <% end %>
25
- </table>
26
-
27
- <p><%= link_to "New Contact", new_contact_path %></p>
@@ -1,4 +0,0 @@
1
- <h3>Adam Olsen</h3>
2
- <p><%= mail_to "aosalias@gmail.com", "aosalias@gmail.com" %></p>
3
- <p>Honduran Phone: (504) 9706 5781</p>
4
- <%= render :partial => 'form' %>
@@ -1,32 +0,0 @@
1
- <% title "Contact" %>
2
-
3
- <p>
4
- <strong>Name:</strong>
5
- <%=h @contact.name %>
6
- </p>
7
- <p>
8
- <strong>From:</strong>
9
- <%=h @contact.from %>
10
- </p>
11
- <p>
12
- <strong>Arrival Date:</strong>
13
- <%=h @contact.arrival_date %>
14
- </p>
15
- <p>
16
- <strong>Departure Date:</strong>
17
- <%=h @contact.departure_date %>
18
- </p>
19
- <p>
20
- <strong>Email:</strong>
21
- <%=h @contact.email %>
22
- </p>
23
- <p>
24
- <strong>Message:</strong>
25
- <%=h @contact.message %>
26
- </p>
27
-
28
- <p>
29
- <%= link_to "Edit", edit_contact_path(@contact) %> |
30
- <%= link_to "Destroy", @contact, :confirm => 'Are you sure?', :method => :delete %> |
31
- <%= link_to "View All", contacts_path %>
32
- </p>
@@ -1,17 +0,0 @@
1
- <% f ||= local_assigns[:locals][:f] %>
2
- <div id='<%= f.object.id.to_s %>'>
3
- <p>
4
- <%= f.label :name, "File Name" %><br />
5
- <%= f.text_field :name, :required => true %>
6
- </p>
7
- <p>
8
- <%= f.label "File" %><br />
9
- <%= f.file_field :asset, :required => true %>
10
- </p>
11
-
12
- <p>
13
- <%= f.label :description, "File Description" %><br />
14
- <%= f.text_area :description, :size => "70x3" %>
15
- </p>
16
- <%= render "shared/prioritizable_fields", :locals => {:f => f} %>
17
- </div>
@@ -1,8 +0,0 @@
1
- <%= link_to downloadable.name.titleize, downloadable %>
2
- <p><%= downloadable.description %></p>
3
- <% if admin_signed_in? %>
4
- <p class='asset-admin'>
5
- <%= link_to "Remove Downloadable", downloadable, :confirm => 'Are you sure?', :method => :delete %>
6
- <%= link_to "Edit Downloadable", edit_downloadable_path(downloadable), :rel=>"#overlay", :class => "overlayed" %>
7
- </p>
8
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= form_for @downloadable, :html => { :multipart => true, :class => "validate", :novalidate => "novalidate" } do |f| %>
2
- <%= render :partial => 'form', :locals => {:f => f} %>
3
- <%= f.submit%>
4
- <% end %>
@@ -1,6 +0,0 @@
1
- <%= form_for @index, :html => { :multipart => true, :class => "validate", :novalidate => "novalidate" } do |f| %>
2
- <%= f.fields_for :downloadables, @downloadable do |downloadable_form| %>
3
- <%= render "downloadables/form", :locals => {:f => downloadable_form} %>
4
- <% end %>
5
- <p><%= f.submit %></p>
6
- <% end %>
@@ -1,33 +0,0 @@
1
- <% f ||= local_assigns[:locals][:f] %>
2
- <div class='nested_fields'>
3
- <div class='nested_fields'>
4
- <p>
5
- <%= f.label "Gallery Title" %><br />
6
- <%= f.text_field :title %>
7
- </p>
8
- </div>
9
-
10
- <div class='nested_fields'>
11
- <h4>Gallery Photos</h4>
12
- <div id="photos">
13
- <%= f.fields_for :photos do |photo_form| %>
14
- <%= render "photos/form", :locals => {:f => photo_form} %>
15
- <% end %>
16
- <p><%= link_to_add_nested('Add Photo', f, :photos, 'photos') %></p>
17
- </div>
18
- </div>
19
-
20
- <div class='nested_fields'>
21
- <h4>Gallery Videos</h4>
22
- <div id="videos">
23
- <%= f.fields_for :videos do |video_form| %>
24
- <%= render "videos/form", :locals => {:f => video_form} %>
25
- <% end %>
26
- <p><%= link_to_add_nested('Add Video', f, :videos, 'videos') %></p>
27
- </div>
28
- </div>
29
- <% unless f.object.new_record? %>
30
- <%= f.hidden_field :_destroy %>
31
- <% end %>
32
- <p><%= link_to_function "Remove Gallery", "remove_fields(this)", :class => "remove" %></p>
33
- </div>
@@ -1,13 +0,0 @@
1
- <% title "Edit Gallery" %>
2
-
3
- <%= form_for @gallery, :html => { :multipart => true } do |f| %>
4
- <%= f.error_messages %>
5
- <p><%= f.submit %></p>
6
- <%= render :partial => 'form' %>
7
- <p><%= f.submit %></p>
8
- <% end %>
9
-
10
- <p>
11
- <%= link_to "Show", @gallery %> |
12
- <%= link_to "View All", galleries_path %>
13
- </p>
@@ -1,16 +0,0 @@
1
- <% render_seo @index %>
2
-
3
- <%= render :partial => 'indices/index' %>
4
-
5
- <% if admin_signed_in? %>
6
- <p><%= link_to "New Gallery", new_gallery_path %></p>
7
- <% end %>
8
-
9
- <% content_for :post_content do %>
10
- <% for gallery in @galleries %>
11
- <div class='clearfix content corner-all box-shadow'>
12
- <%= link_to image_tag(gallery.assets.first.thumb, :class => 'left'), gallery %>
13
- <h2><%= link_to gallery.title, gallery %></h2>
14
- </div>
15
- <% end %>
16
- <% end %>