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
@@ -0,0 +1,6 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ %div{:id => f.object.id.to_s}
3
+ = f.input :name
4
+ = f.input :asset, :label => "File"
5
+ = f.input :description, :input_html => { :size => "70x3" }
6
+ = render "shared/prioritizable_fields", :locals => {:f => f}
@@ -0,0 +1,7 @@
1
+ .asset{:id => "downloadable#{downloadable.id}"}
2
+ = link_to downloadable.name.titleize, downloadable
3
+ %p= downloadable.description
4
+ - if admin_signed_in?
5
+ %p.asset-admin
6
+ = link_to "Remove Downloadable", downloadable, :confirm => 'Are you sure?', :method => :delete
7
+ = link_to "Edit Downloadable", edit_downloadable_path(downloadable), :rel=>"#overlay", :class => "overlayed"
@@ -0,0 +1,3 @@
1
+ = simple_form_for @downloadable, :validate => true, :html => { :multipart => true} do |f|
2
+ = render :partial => 'form', :locals => {:f => f}
3
+ = f.submit
@@ -0,0 +1,4 @@
1
+ = simple_form_for @index, :validate => true, :html => { :multipart => true} do |f|
2
+ = f.simple_fields_for :downloadables, @downloadable do |downloadable_form|
3
+ = render "downloadables/form", :locals => {:f => downloadable_form}
4
+ = f.button :submit
@@ -0,0 +1,22 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ .nested_fields
3
+ .nested_fields
4
+ %p
5
+ = f.label "Gallery Title"
6
+ %br/
7
+ = f.text_field :title
8
+ .nested_fields
9
+ %h4 Gallery Photos
10
+ #photos
11
+ = f.fields_for :photos do |photo_form|
12
+ = render "photos/form", :locals => {:f => photo_form}
13
+ %p= link_to_add_nested('Add Photo', f, :photos, 'photos')
14
+ .nested_fields
15
+ %h4 Gallery Videos
16
+ #videos
17
+ = f.fields_for :videos do |video_form|
18
+ = render "videos/form", :locals => {:f => video_form}
19
+ %p= link_to_add_nested('Add Video', f, :videos, 'videos')
20
+ - unless f.object.new_record?
21
+ = f.hidden_field :_destroy
22
+ %p= link_to_function "Remove Gallery", "remove_fields(this)", :class => "remove"
@@ -0,0 +1,10 @@
1
+ - title "Edit Gallery"
2
+ = simple_form_for @gallery, :validate => true, :html => { :multipart => true } do |f|
3
+ = f.error_messages
4
+ = f.button :submit
5
+ = render :partial => 'form'
6
+ = f.button :submit
7
+ %p
8
+ = link_to "Show", @gallery
9
+ |
10
+ \#{link_to "View All", galleries_path}
@@ -0,0 +1,9 @@
1
+ - render_seo @index
2
+ = render :partial => 'indices/index'
3
+ - if admin_signed_in?
4
+ %p= link_to "New Gallery", new_gallery_path
5
+ - content_for :post_content do
6
+ - for gallery in @galleries
7
+ .clearfix.content.corner-all.box-shadow
8
+ = link_to image_tag(gallery.assets.first.thumb, :class => 'left'), gallery
9
+ %h2= link_to gallery.title, gallery
@@ -0,0 +1,3 @@
1
+ = simple_form_for @gallery, :validate => true, :html => { :multipart => true } do |f|
2
+ = render :partial => 'form'
3
+ = f.button :submit
@@ -0,0 +1,9 @@
1
+ - render_seo @index
2
+ %h2= h @gallery.title
3
+ = render :partial => 'indices/index'
4
+ - if admin_signed_in?
5
+ %p
6
+ = link_to "Edit Gallery", edit_gallery_path(@gallery)
7
+ - content_for :post_content do
8
+ .content.corner-all.box-shadow
9
+ = render :partial => "shared/gallery", :locals => {:objs => @gallery.assets}
@@ -0,0 +1,43 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ - index ||= f.object
3
+ - seo ||= (local_assigns[:locals][:seo] rescue true)
4
+ - side ||= (local_assigns[:locals][:side] rescue true)
5
+ - gallery ||= (local_assigns[:locals][:gallery] rescue true)
6
+ %p
7
+ = index.name
8
+ %h4 Content Sections
9
+ .pane.clearfix
10
+ = f.fields_for :content_sections, index.content_sections do |section_form|
11
+ = render "sections/form", :locals => {:f => section_form, :alignment => true}
12
+ %p= link_to_add_nested('Add Section', f, :content_sections, 'sections')
13
+ - if seo
14
+ %h4 Search Engine Info
15
+ .pane.clearfix
16
+ %p
17
+ = f.label :page_title
18
+ %br/
19
+ = f.text_field :page_title
20
+ %p
21
+ = f.label :keywords
22
+ %br/
23
+ = f.text_area :keywords, :rows => 5
24
+ %p
25
+ = f.label :page_description
26
+ %br/
27
+ = f.text_area :page_description, :rows => 10
28
+ - if side
29
+ %h4 Side Bar Section
30
+ - if index.side_section.nil?
31
+ %p= link_to_add_nested('Add Side Section', f, :side_section, 'sections', false, true)
32
+ - else
33
+ .pane.clearfix
34
+ = f.fields_for :side_section, index.side_section do |section_form|
35
+ = render "sections/form", :locals => {:f => section_form}
36
+ - if side
37
+ %h4 Gallery
38
+ - if index.gallery.nil?
39
+ %p= link_to_add_nested('Add Gallery', f, :gallery, 'galleries', false, true)
40
+ - else
41
+ .pane.clearfix
42
+ = f.fields_for :gallery, index.gallery do |section_form|
43
+ = render "galleries/form", :locals => {:f => section_form}
@@ -0,0 +1,17 @@
1
+ -logger.info local_assigns
2
+ - index ||= local_assigns[:index]
3
+ - render_seo index
4
+ %div{:id => "index#{index.id}"}
5
+ %h2.title=index.title.titleize
6
+ .clearfix= render :partial => 'shared/asset_show', :collection => index.assets, :as => :asset
7
+ - if admin_signed_in?
8
+ .asset
9
+ %p.asset-admin
10
+ = link_to "Add Text", new_index_text_path(index.id), :rel=>"#overlay", :class => "overlayed"
11
+ = link_to "Add Photo", new_index_photo_path(index.id), :rel=>"#overlay", :class => "overlayed"
12
+ = link_to "Add Video", new_index_video_path(index.id), :rel=>"#overlay", :class => "overlayed"
13
+ = link_to "Add Downloadable File", new_index_downloadable_path(index.id), :rel=>"#overlay", :class => "overlayed"
14
+ - unless index.gallery.nil?
15
+ - content_for :post_content do
16
+ .content.corner-all.box-shadow
17
+ = render :partial => "shared/gallery", :locals => {:objs => index.gallery.assets}
@@ -0,0 +1,3 @@
1
+ = simple_form_for @index, :validate => true, :html => { :multipart => true } do |f|
2
+ = render :partial => 'form', :locals => {:f => f, :index => @index}
3
+ = f.button :submit
@@ -0,0 +1,17 @@
1
+ - title "Indices"
2
+ %table
3
+ %tr
4
+ %th Name
5
+ %th Page Title
6
+ %th Keywords
7
+ %th Page Description
8
+ - for index in @indices
9
+ %tr
10
+ %td= h index.name
11
+ %td= h index.page_title
12
+ %td= h index.keywords
13
+ %td= h index.page_description
14
+ %td= link_to "Show", index
15
+ %td= link_to "Edit", edit_index_path(index)
16
+ %td= link_to "Destroy", index, :confirm => 'Are you sure?', :method => :delete
17
+ %p= link_to "New Index", new_index_path
@@ -8,4 +8,19 @@
8
8
  = csrf_meta_tag
9
9
  = yield(:head)
10
10
  %body
11
- =render :template => "layouts/#{APP_CONFIG[:nav_style] rescue 'bar'}_nav.html.haml"
11
+ #header
12
+ .inner
13
+ =render 'application/header'
14
+ #container
15
+ #main_container
16
+ = render 'application/nav'
17
+ .content.clearfix
18
+ #main
19
+ - flash.each do |name, msg|
20
+ = content_tag :div, msg, :id => "flash_#{name}"
21
+ = yield
22
+ #sidebar
23
+ = yield(:sidebar)
24
+ = render 'application/footer'
25
+ #overlay.overlay
26
+ .contentWrap
@@ -1,15 +1,8 @@
1
- #container
2
- #main_container
3
- #header
4
- =render 'application/header'
5
- = render 'application/nav'
6
- = yield(:pre_content)
7
- .content.clearfix
8
- - flash.each do |name, msg|
9
- = content_tag :div, msg, :id => "flash_#{name}"
10
- = yield
11
- = yield(:post_content)
12
- = render 'application/footer'
13
- #overlay.overlay
14
- .contentWrap
1
+ #main_container
2
+ = render 'application/nav'
3
+ .content.clearfix
4
+ - flash.each do |name, msg|
5
+ = content_tag :div, msg, :id => "flash_#{name}"
6
+ = yield
7
+ = render 'application/footer'
15
8
 
@@ -0,0 +1,39 @@
1
+ %html
2
+ %head
3
+ %title=yield(:title) || APP_CONFIG[:app_name]
4
+ %meta{:name => 'description', :content => "#{(yield(:description) || APP_CONFIG[:app_name])}"}
5
+ %meta{:name => 'keywords', :content => "#{(yield(:keywords) || APP_CONFIG[:app_name])}"}
6
+ = stylesheet_link_tag 'application'
7
+ = javascript_include_tag 'application'
8
+ = csrf_meta_tag
9
+ = yield(:head)
10
+ %body
11
+ #container
12
+ #header
13
+ =render 'application/header'
14
+ #user-navigation
15
+ %ul.wat-cf
16
+ %li= link_to "Profile", "#"
17
+ %li= link_to "Settings", "#"
18
+ #main-navigation
19
+ %ul.wat-cf
20
+ = render 'application/nav'
21
+ #wrapper.wat-cf
22
+ .flash
23
+ - if flash[:alert]
24
+ .message.error
25
+ %p= flash[:alert]
26
+ - if flash[:notice]
27
+ .message.notice
28
+ %p= flash[:notice]
29
+
30
+
31
+ #main
32
+ = yield
33
+ #footer
34
+ = render 'application/footer'
35
+ #sidebar
36
+ = yield :sidebar
37
+ #overlay.overlay
38
+ .contentWrap
39
+
@@ -1,14 +1,9 @@
1
- #container
2
- #header
3
- =render 'application/header'
4
- .clearfix
5
- = render 'application/nav'
6
- #main_content.content
7
- = yield(:pre_content)
8
- - flash.each do |name, msg|
9
- = content_tag :div, msg, :id => "flash_#{name}"
10
- = yield
11
- = yield(:post_content)
12
- #overlay.overlay
13
- .contentWrap
14
- = render 'application/footer'
1
+ #header
2
+ =render 'application/header'
3
+ .clearfix
4
+ = render 'application/nav'
5
+ #main_content.content
6
+ - flash.each do |name, msg|
7
+ = content_tag :div, msg, :id => "flash_#{name}"
8
+ = yield
9
+ =render 'application/footer'
@@ -0,0 +1,4 @@
1
+ = @message.name
2
+ Email Address: #{@message.email}
3
+
4
+ \#{@message.message}
@@ -0,0 +1,10 @@
1
+ - alignment ||= local_assigns[:locals][:alignment]
2
+ - f ||= local_assigns[:locals][:f]
3
+ %div{:id => f.object.id.to_s}
4
+ - if f.object.asset_file_name
5
+ = image_tag f.object.asset.url(:thumb), :width => "100"
6
+ = f.input :name
7
+ = f.input :asset, :required => (f.object.asset_file_name.blank? ? true : false), :as => :file, :label => "Photo"
8
+ = f.input :description, :input_html => { :cols => 70, :rows => 3 }
9
+ = f.input :klass, :as => :radio, :collection => ["left", "right", "center"], :label => "Alignment"
10
+ = render "shared/prioritizable_fields", :locals => {:f => f}
@@ -0,0 +1,7 @@
1
+ %div{:class => "#{photo.klass} asset", :id => "photo#{photo.id}"}
2
+ = link_to photo, :rel=>"#overlay", :class => "overlayed", :"data-type" => "html" do
3
+ = image_tag(photo.asset.url(photo.which?), :alt => photo.name, :class => "tooltipped button")
4
+ - if admin_signed_in?
5
+ %p.asset-admin
6
+ = link_to "Remove Photo", photo, :confirm => 'Are you sure?', :method => :delete
7
+ = link_to "Edit Photo", edit_photo_path(photo), :rel=>"#overlay", :class => "overlayed"
@@ -0,0 +1,3 @@
1
+ = simple_form_for @photo, :validate => true, :html => { :multipart => true} do |f|
2
+ = render :partial => 'form', :locals => {:f => f, :alignment => true}
3
+ = f.submit
@@ -0,0 +1,21 @@
1
+ - title "Photos"
2
+ %table
3
+ %tr
4
+ %th Title
5
+ %th Photo File Name
6
+ %th Photo Content Type
7
+ %th Photo File Size
8
+ %th Owner
9
+ %th Owner Type
10
+ - for photo in @photos
11
+ %tr
12
+ %td= h photo.title
13
+ %td= h photo.photo_file_name
14
+ %td= h photo.photo_content_type
15
+ %td= h photo.photo_file_size
16
+ %td= h photo.owner_id
17
+ %td= h photo.owner_type
18
+ %td= link_to "Show", photo
19
+ %td= link_to "Edit", edit_photo_path(photo)
20
+ %td= link_to "Destroy", photo, :confirm => 'Are you sure?', :method => :delete
21
+ %p= link_to "New Photo", new_photo_path
@@ -0,0 +1,4 @@
1
+ = simple_form_for @index, :validate => true, :html => { :multipart => true} do |f|
2
+ = f.simple_fields_for :photos, @photo do |photo_form|
3
+ = render "photos/form", :locals => {:f => photo_form}
4
+ = f.button :submit
@@ -0,0 +1,4 @@
1
+ .center
2
+ = image_tag(@photo.asset.url, :alt => @photo.name)
3
+ %h3= @photo.name.titleize
4
+ %p= @photo.description
@@ -0,0 +1 @@
1
+ = render :partial => 'indices/show', :object => @index, :as => :index
@@ -0,0 +1,4 @@
1
+ =content_for(:sidebar) do
2
+ =render :partial => "application/secondary_nav", :object => resource, :as => :obj
3
+
4
+ =(render :partial => 'show', :object => resource, :as => resource_class.to_s.downcase.to_sym)
@@ -0,0 +1 @@
1
+ =escape_javascript(render :partial => 'show', :object => resource, :as => resource_class.to_s.downcase.to_sym)
@@ -0,0 +1 @@
1
+ = render :partial => "#{asset.class.to_s.downcase.pluralize}/show", :locals => {asset.class.to_s.downcase.to_sym => asset}
@@ -0,0 +1,15 @@
1
+ - if controller_name != 'sessions'
2
+ = link_to t('devise.sessions.link'), new_session_path(resource_name)
3
+ %br/
4
+ - if devise_mapping.registerable? && controller_name != 'registrations'
5
+ = link_to t('devise.registrations.link'), new_registration_path(resource_name)
6
+ %br/
7
+ - if devise_mapping.recoverable? && controller_name != 'passwords'
8
+ = link_to t('devise.passwords.link'), new_password_path(resource_name)
9
+ %br/
10
+ - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
+ = link_to t('devise.confirmations.link'), new_confirmation_path(resource_name)
12
+ %br/
13
+ - if devise_mapping.lockable? && controller_name != 'unlocks'
14
+ = link_to t('devise.unlocks.link'), new_unlock_path(resource_name)
15
+ %br/
@@ -0,0 +1,14 @@
1
+ #gallery.clearfix.corner-all.box_shadow
2
+ #gallery_wrap.clearfix
3
+ %a{:class => "#{'no_back ' unless (objs.size > 1)}backward browse left"}
4
+ #gallery_wrap_inner.left
5
+ %a{:class => "#{'no_back ' unless (objs.size > 1)}forward browse right"}
6
+ .scroll_nav
7
+ %a{:class => "#{'no_back ' unless (objs.size > 4)}prev browse left"}
8
+ .scrollable.corner-all.nav
9
+ .items.ajax-nav
10
+ - objs.each_with_index do |obj, index|
11
+ = '<div>' if index%4 == 0
12
+ = link_to image_tag(obj.thumb, :alt => obj.name), obj, :id => obj.id, :class => "button#{' current' if obj.id == objs.first.id}"
13
+ = '</div>' if (index%4 == 3 || index == objs.size-1)
14
+ %a{:class => "#{'no_back ' unless (objs.size > 4)}next browse right"}
@@ -0,0 +1,5 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ - if(f.object.prioritizables.empty? rescue true)
3
+ = f.hidden_field :priority
4
+ - else
5
+ = f.input :priority, :as => :select, :collection => (f.object.prioritizables.each_with_index.map{|p,i| [(i+1).ordinalize, p.priority]} + [['Last',f.object.lowest_priority+1]]), :include_blank => false
@@ -0,0 +1,3 @@
1
+ - f ||= local_assigns[:locals][:f]
2
+ = f.input :content, :input_html => {:class => "mceEditor", :id => 'mceEditor', :size => '110x5'}
3
+ = render "shared/prioritizable_fields", :locals => {:f => f}
@@ -0,0 +1,6 @@
1
+ .asset{:id => "text#{text.id}"}
2
+ = raw text.content
3
+ - if admin_signed_in?
4
+ %p.asset-admin
5
+ = link_to "Edit Text", edit_text_path(text), :rel=>"#overlay", :class => "overlayed"
6
+ = link_to "Remove Text", text, :confirm => 'Are you sure?', :method => :delete
@@ -0,0 +1,3 @@
1
+ = simple_form_for @text, :html => { :multipart => true} do |f|
2
+ = render "texts/form", :locals => {:f => f}
3
+ = f.button :submit
@@ -0,0 +1,4 @@
1
+ = simple_form_for @index, :html => { :multipart => true} do |f|
2
+ = f.simple_fields_for :texts, @text do |text_form|
3
+ = render "texts/form", :locals => {:f => text_form}
4
+ = f.button :submit
@@ -0,0 +1,8 @@
1
+ %p
2
+ %strong Content:
3
+ = h @text.content
4
+ %p
5
+ = link_to "Edit", edit_text_path(@text)
6
+ |
7
+ \#{link_to "Destroy", @text, :confirm => 'Are you sure?', :method => :delete} |
8
+ \#{link_to "View All", texts_path}