refinerycms-photo-gallery 0.0.1.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/Gemfile +26 -0
  2. data/LICENSE.md +8 -0
  3. data/README.md +224 -0
  4. data/app/assets/images/refinery/photo_gallery/admin/chosen-sprite.png +0 -0
  5. data/app/assets/images/refinery/photo_gallery/admin/icons/album.png +0 -0
  6. data/app/assets/images/refinery/photo_gallery/admin/icons/album_add.png +0 -0
  7. data/app/assets/images/refinery/photo_gallery/admin/icons/album_edit.png +0 -0
  8. data/app/assets/images/refinery/photo_gallery/admin/icons/cog.png +0 -0
  9. data/app/assets/images/refinery/photo_gallery/admin/icons/down.gif +0 -0
  10. data/app/assets/images/refinery/photo_gallery/admin/icons/folder.png +0 -0
  11. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_add.png +0 -0
  12. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_edit.png +0 -0
  13. data/app/assets/images/refinery/photo_gallery/admin/icons/loading.gif +0 -0
  14. data/app/assets/images/refinery/photo_gallery/admin/icons/page_copy.png +0 -0
  15. data/app/assets/images/refinery/photo_gallery/admin/icons/photo.png +0 -0
  16. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_add.png +0 -0
  17. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_edit.png +0 -0
  18. data/app/assets/images/refinery/photo_gallery/admin/icons/up.gif +0 -0
  19. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/backgrounds.gif +0 -0
  20. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons-disabled.png +0 -0
  21. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons.png +0 -0
  22. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/delete.gif +0 -0
  23. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/done.gif +0 -0
  24. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/error.gif +0 -0
  25. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/throbber.gif +0 -0
  26. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/transp50.png +0 -0
  27. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload-bw.png +0 -0
  28. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload.png +0 -0
  29. data/app/assets/images/refinery/photo_gallery/admin/rss-feed.png +0 -0
  30. data/app/assets/images/refinery/photo_gallery/fancybox/blank.gif +0 -0
  31. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_loading.gif +0 -0
  32. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_sprite.png +0 -0
  33. data/app/assets/images/refinery/photo_gallery/fancybox/helpers/fancybox_buttons.png +0 -0
  34. data/app/assets/javascripts/refinery/photo_gallery/admin/jquery.chosen.min.js +10 -0
  35. data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js +28 -0
  36. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/changelog.txt +218 -0
  37. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cs.js +14 -0
  38. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/da.js +12 -0
  39. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/de.js +24 -0
  40. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js +14 -0
  41. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js +25 -0
  42. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js +33 -0
  43. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js +37 -0
  44. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js +33 -0
  45. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js +35 -0
  46. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js +25 -0
  47. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hr.js +25 -0
  48. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hu.js +33 -0
  49. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/it.js +24 -0
  50. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ja.js +37 -0
  51. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ko.js +36 -0
  52. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lv.js +33 -0
  53. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/nl.js +21 -0
  54. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pl.js +24 -0
  55. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt-br.js +35 -0
  56. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ro.js +24 -0
  57. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ru.js +21 -0
  58. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sk.js +37 -0
  59. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sr.js +14 -0
  60. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sv.js +12 -0
  61. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js +195 -0
  62. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.js +383 -0
  63. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/license.txt +339 -0
  64. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.browserplus.js +1 -0
  65. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.js +226 -0
  66. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.swf +0 -0
  67. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js +2525 -0
  68. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js.default +2525 -0
  69. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.gears.js +1 -0
  70. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html4.js +1 -0
  71. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js +765 -0
  72. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js.default +765 -0
  73. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.js +618 -0
  74. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.js +1 -0
  75. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap +0 -0
  76. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/readme.md +46 -0
  77. data/app/assets/javascripts/refinery/photo_gallery/fancybox/CHANGELOG.md +68 -0
  78. data/app/assets/javascripts/refinery/photo_gallery/fancybox/README.md +212 -0
  79. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.js +115 -0
  80. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-media.js +85 -0
  81. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.js +157 -0
  82. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.js +1463 -0
  83. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.pack.js +35 -0
  84. data/app/assets/javascripts/refinery/photo_gallery/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +13 -0
  85. data/app/assets/stylesheets/refinery/photo_gallery/admin/chosen.css.scss +396 -0
  86. data/app/assets/stylesheets/refinery/photo_gallery/admin/photo_gallery.css.scss +109 -0
  87. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css.scss +177 -0
  88. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.css.scss +147 -0
  89. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.css.scss +85 -0
  90. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.css +54 -0
  91. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/jquery.fancybox.css.scss +234 -0
  92. data/app/controllers/refinery/photo_gallery/admin/albums_controller.rb +23 -0
  93. data/app/controllers/refinery/photo_gallery/admin/collections_controller.rb +10 -0
  94. data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +67 -0
  95. data/app/controllers/refinery/photo_gallery/albums_controller.rb +21 -0
  96. data/app/controllers/refinery/photo_gallery/collections_controller.rb +28 -0
  97. data/app/helpers/refinery/photo_gallery/admin/photos_helper.rb +10 -0
  98. data/app/helpers/refinery/photo_gallery/albums_helper.rb +11 -0
  99. data/app/helpers/refinery/photo_gallery/photo_gallery_helper.rb +58 -0
  100. data/app/middleware/refinery/photo_gallery/admin/flash_session_cookie_middleware.rb +27 -0
  101. data/app/models/refinery/photo_gallery/album.rb +60 -0
  102. data/app/models/refinery/photo_gallery/collection.rb +29 -0
  103. data/app/models/refinery/photo_gallery/collection_album.rb +8 -0
  104. data/app/models/refinery/photo_gallery/photo.rb +54 -0
  105. data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +121 -0
  106. data/app/views/refinery/photo_gallery/admin/_submenu.html.erb +44 -0
  107. data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +31 -0
  108. data/app/views/refinery/photo_gallery/admin/albums/_form.html.erb +78 -0
  109. data/app/views/refinery/photo_gallery/admin/albums/_sortable_list.html.erb +7 -0
  110. data/app/views/refinery/photo_gallery/admin/albums/edit.html.erb +2 -0
  111. data/app/views/refinery/photo_gallery/admin/albums/index.html.erb +28 -0
  112. data/app/views/refinery/photo_gallery/admin/albums/new.html.erb +2 -0
  113. data/app/views/refinery/photo_gallery/admin/collections/_collection.html.erb +23 -0
  114. data/app/views/refinery/photo_gallery/admin/collections/_form.html.erb +32 -0
  115. data/app/views/refinery/photo_gallery/admin/collections/_sortable_list.html.erb +7 -0
  116. data/app/views/refinery/photo_gallery/admin/collections/edit.html.erb +2 -0
  117. data/app/views/refinery/photo_gallery/admin/collections/index.html.erb +28 -0
  118. data/app/views/refinery/photo_gallery/admin/collections/new.html.erb +2 -0
  119. data/app/views/refinery/photo_gallery/admin/collections/test.html.erb +39 -0
  120. data/app/views/refinery/photo_gallery/admin/photos/_destroy.js.erb +15 -0
  121. data/app/views/refinery/photo_gallery/admin/photos/_form.html.erb +7 -0
  122. data/app/views/refinery/photo_gallery/admin/photos/_form_actions.html.erb +6 -0
  123. data/app/views/refinery/photo_gallery/admin/photos/_form_fields.html.erb +31 -0
  124. data/app/views/refinery/photo_gallery/admin/photos/_form_fields_actions.html.erb +15 -0
  125. data/app/views/refinery/photo_gallery/admin/photos/edit_multiple.html.erb +9 -0
  126. data/app/views/refinery/photo_gallery/admin/photos/upload.html.erb +87 -0
  127. data/app/views/refinery/photo_gallery/albums/show.html.erb +26 -0
  128. data/app/views/refinery/photo_gallery/collections/index.html.erb +9 -0
  129. data/app/views/refinery/photo_gallery/collections/show.html.erb +19 -0
  130. data/app/views/refinery/photo_gallery/shared/_layout.html.erb +22 -0
  131. data/app/views/refinery/photo_gallery/shared/_submenu.html.erb +4 -0
  132. data/config/initializers/carrierwave.rb +7 -0
  133. data/config/initializers/form_builder.rb +26 -0
  134. data/config/initializers/refinery/core.rb +10 -0
  135. data/config/initializers/s3.rb +13 -0
  136. data/config/initializers/session_store.rb +10 -0
  137. data/config/locales/en.yml +95 -0
  138. data/config/locales/sk.yml +94 -0
  139. data/config/routes.rb +37 -0
  140. data/db/migrate/20120804063842_create_albums.rb +18 -0
  141. data/db/migrate/20120805131321_create_collections.rb +14 -0
  142. data/db/migrate/20120805131547_create_collection_albums.rb +12 -0
  143. data/db/migrate/20120805165238_create_photos.rb +19 -0
  144. data/db/migrate/20120805222125_add_indexes.rb +24 -0
  145. data/db/seeds.rb +21 -0
  146. data/lib/generators/refinery/photo_gallery_generator.rb +25 -0
  147. data/lib/generators/refinery/templates/config/initializers/refinery/photo_gallery.rb.erb +40 -0
  148. data/lib/refinery/photo_gallery.rb +30 -0
  149. data/lib/refinery/photo_gallery/configuration.rb +33 -0
  150. data/lib/refinery/photo_gallery/engine.rb +33 -0
  151. data/lib/refinery/photo_gallery/version.rb +17 -0
  152. data/lib/refinerycms-photo-gallery.rb +1 -0
  153. data/refinerycms-balder-photo-gallery.gemspec +30 -0
  154. data/screenshots/01_collections#index.png +0 -0
  155. data/screenshots/02_albums#create.png +0 -0
  156. data/screenshots/03_photos#upload.png +0 -0
  157. data/screenshots/04_photos#upload- chooser.png +0 -0
  158. data/screenshots/05_photo#upoad-queue.png +0 -0
  159. data/screenshots/06_photos#upload-uploading.png +0 -0
  160. data/screenshots/07_photos#upload-uploading_2.png +0 -0
  161. data/screenshots/08_photos#edit_multiple.png +0 -0
  162. data/screenshots/09_albums#index.png +0 -0
  163. data/screenshots/10_albums_EXIF_reading.png +0 -0
  164. data/screenshots/11_frontend_show.png +0 -0
  165. data/screenshots/12_show_photo_using_fancybox.png +0 -0
  166. metadata +323 -0
@@ -0,0 +1,7 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'album', :collection => @albums %>
3
+ </ul>
4
+ <%= render :partial => "/refinery/admin/sortable_list",
5
+ :locals => {
6
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
7
+ } %>
@@ -0,0 +1,2 @@
1
+ <h2 ><%= t('.title') %></h2>
2
+ <%= render :partial=> "form" %>
@@ -0,0 +1,28 @@
1
+ <%= render :partial => '/refinery/photo_gallery/admin/submenu' %>
2
+
3
+ <div id='records'>
4
+ <% if searching? %>
5
+ <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
6
+ <% if @albums.any? %>
7
+ <ul>
8
+ <%= render :partial => "album", :album => @albums %>
9
+ </ul>
10
+ <% else %>
11
+ <p><%= t('no_results', :scope => 'refinery.admin.search') %></p>
12
+ <% end %>
13
+ <% else %>
14
+ <% if @albums.any? %>
15
+ <%= will_paginate @albums %>
16
+
17
+ <%= render :partial => "sortable_list" %>
18
+
19
+ <%= will_paginate @albums %>
20
+ <% else %>
21
+ <p>
22
+ <strong>
23
+ <%= t('.no_items_yet', :create => t('new', :scope => 'refinery.photo_gallery.admin.submenu.albums')) %>
24
+ </strong>
25
+ </p>
26
+ <% end %>
27
+ <% end %>
28
+ </div>
@@ -0,0 +1,2 @@
1
+ <h2 ><%= t('.title') %></h2>
2
+ <%= render :partial=> "form" %>
@@ -0,0 +1,23 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(collection) -%>">
2
+ <span class='title'>
3
+ <%= collection.title %>
4
+ <span class="preview">
5
+ <%= collection.created_at.try(:strftime, '%b %d, %Y') %>
6
+ </span>
7
+ </span>
8
+ <span class='actions'>
9
+ <%#= link_to refinery_icon_tag("application_go.png"), refinery.photo_gallery_collection_path(collection),
10
+ :title => t('.view_live_html'),
11
+ :target => "_blank" %>
12
+ <%= link_to (image_tag 'refinery/photo_gallery/admin/icons/folder_edit.png'),
13
+ refinery.edit_photo_gallery_admin_collection_path(collection),
14
+ :title => t('.edit') %>
15
+ <%= link_to refinery_icon_tag("delete.png"), refinery.photo_gallery_admin_collection_path(collection),
16
+ :class => "cancel confirm-delete",
17
+ :title => t('.delete'),
18
+ :method => :delete,
19
+ :data => {
20
+ :confirm => t('message', :scope => 'refinery.admin.delete', :title => collection.title)
21
+ } %>
22
+ </span>
23
+ </li>
@@ -0,0 +1,32 @@
1
+ <%= form_for [refinery, :photo_gallery_admin, @collection] do |f| -%>
2
+ <%= render :partial => "/refinery/admin/error_messages",
3
+ :locals => {
4
+ :object => f.object,
5
+ :include_object_name => true
6
+ } %>
7
+
8
+ <div class='field'>
9
+ <%= f.label :title -%>
10
+ <%= f.text_field :title, :class => 'larger widest' -%>
11
+ </div>
12
+
13
+ <div class='field'>
14
+ <%= f.label :description %><br />
15
+ <%= f.text_area :description, :cols=>'65', :rows=>'7' %><br />
16
+ </div>
17
+
18
+ <%= render :partial => "/refinery/admin/form_actions",
19
+ :locals => {
20
+ :f => f,
21
+ :continue_editing => false,
22
+ :delete_title => t('delete', :scope => 'refinery.photo_gallery.admin.collections.collection')
23
+ } %>
24
+ <% end %>
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
@@ -0,0 +1,7 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'collection', :collection => @collections %>
3
+ </ul>
4
+ <%= render :partial => "/refinery/admin/sortable_list",
5
+ :locals => {
6
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
7
+ } %>
@@ -0,0 +1,2 @@
1
+ <h2 ><%= t('.title') %></h2>
2
+ <%= render :partial=> "form" %>
@@ -0,0 +1,28 @@
1
+ <%= render :partial => '/refinery/photo_gallery/admin/submenu' %>
2
+
3
+ <div id='records'>
4
+ <% if searching? %>
5
+ <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
6
+ <% if @collections.any? %>
7
+ <ul>
8
+ <%= render :partial => "collection", :collection => @collections %>
9
+ </ul>
10
+ <% else %>
11
+ <p><%= t('no_results', :scope => 'refinery.admin.search') %></p>
12
+ <% end %>
13
+ <% else %>
14
+ <% if @collections.any? %>
15
+ <%= will_paginate @collections %>
16
+
17
+ <%= render :partial => "sortable_list" %>
18
+
19
+ <%= will_paginate @collections %>
20
+ <% else %>
21
+ <p>
22
+ <strong>
23
+ <%= t('.no_items_yet', :create => t('new', :scope => 'refinery.photo_gallery.admin.submenu.collections')) %>
24
+ </strong>
25
+ </p>
26
+ <% end %>
27
+ <% end %>
28
+ </div>
@@ -0,0 +1,2 @@
1
+ <h2 ><%= t('.title') %></h2>
2
+ <%= render :partial=> "form" %>
@@ -0,0 +1,39 @@
1
+ <%= form.label :title, :Title, {:class => 'big'} %><br />
2
+ <%= form.text_field :title, {:class => 'big'} %><br />
3
+
4
+ <%= form.label :description %><br />
5
+ <%= form.text_area :description %><br />
6
+
7
+
8
+ <% unless @collection.albums.empty? %>
9
+ <%= form.label :albums %><br />
10
+ <div id="collection_albums">
11
+ <% for album in @collection.albums %>
12
+ <%= form.fields_for :album_list do |album_fields| %>
13
+ <span>
14
+ <%= image_tag "delete-24x24.png", :class => "delete", :alt => "Delete" -%>
15
+
16
+ <% if album.photos.empty? %>
17
+ <%= album.title %>
18
+ <% else %>
19
+ <%= image_tag album.photos.first.file.album.url, :alt => album.title %>
20
+ <% end %>
21
+ <%= album_fields.hidden_field album.id %>
22
+ </span>
23
+ <% end %>
24
+ <% end %>
25
+ </div>
26
+
27
+ <p class="clear">
28
+ <%
29
+ grouped_options = [
30
+ ['Available albums',[['Choose album to add','']]],
31
+ ['Not used', Album.unused.map{|album|[album.title, album.id]} ],
32
+ ['In use', Album.used.map{|album|[album.title, album.id]} ]
33
+ ]
34
+ grouped_options_for_select(grouped_options)
35
+ %>
36
+ <%= select_tag 'available_albums', grouped_options_for_select(grouped_options) %>
37
+ </p>
38
+
39
+ <% end %>
@@ -0,0 +1,15 @@
1
+ $(function() {
2
+ if( $('#photo-<%= photo.id %>').remove().fadeOut('slow') ) {
3
+
4
+ var flash_msg = '<div id="flash_container">' +
5
+ '<div id="flash" class="flash flash_notice" style="visibility: visible; opacity: 1;">'+
6
+ '<%= t('deleted', :scope=> 'refinery.photo_gallery.admin.photos.photo', :title=> @photo.title) %>' +
7
+ '<a href="" id="flash_close">' +
8
+ '<%= t('close', :scope=> "refinery.message") %>' +
9
+ '</a>' +
10
+ '</div>' +
11
+ '</div>';
12
+
13
+ $('#flash_container').replaceWith(flash_msg);
14
+ }
15
+ });
@@ -0,0 +1,7 @@
1
+ <%= form_for :photos, :url => refinery.update_multiple_photo_gallery_admin_photos_path, :html => { :method => :put, :id=> "form_edit_photos" } do |f| %>
2
+ <% for photo in @photos %>
3
+ <%= render :partial=> 'form_fields', :locals => {:f => f, :photo => photo} %>
4
+ <% end%>
5
+
6
+ <%= render :partial=> 'form_actions', :locals => {:f => f} %>
7
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <div class="form-actions">
2
+ <div class="form-actions-left">
3
+ <%= f.submit t('refinery.admin.form_actions.save'), :class=> "wymupdate button" %>
4
+ <%= link_to t('refinery.admin.form_actions.cancel'), refinery.photo_gallery_admin_albums_path, :class=> "close_dialog button", :title=> t('refinery.admin.form_actions.cancel_lose_changes') %>
5
+ </div>
6
+ </div>
@@ -0,0 +1,31 @@
1
+ <div id="photo-<%= photo.id %>" class="form-photo-field">
2
+ <%= fields_for "photos[photo]", photo, :index => photo.id do |p|%>
3
+ <div class="form_photo_left">
4
+ <%= link_to (image_tag photo.file.collection.url), photo.file.single.url, {:target=> "_blank"} %>
5
+ </div>
6
+
7
+ <div class="form_photo_right">
8
+ <div class='field'>
9
+ <%= p.label :title %>
10
+ <%= p.text_field :title, :class => "larger" %>
11
+ </div>
12
+
13
+ <div class='field'>
14
+ <%= p.label :description %>
15
+ <%= p.text_area :description, :rows => "5", :cols=> "57" %>
16
+ </div>
17
+
18
+ <div class='field-group'>
19
+ <%= p.label :longitude, :tooltip=> t('.use_decimal_format') %>
20
+ <%= p.text_field :longitude, :size=> 13 %>
21
+
22
+ <%= p.label :latitude , :tooltip=> t('.use_decimal_format') %>
23
+ <%= p.text_field :latitude, :size=> 13 %>
24
+ </div>
25
+
26
+
27
+ <%= render :partial => "form_fields_actions", :locals => { :photo => photo } %>
28
+ </div>
29
+ <% end%>
30
+ <div class="form_photo_cleaner"></div>
31
+ </div>
@@ -0,0 +1,15 @@
1
+ <div class="form-actions">
2
+ <div class="form-actions-left">
3
+ <%#TODO <input type="checkbox"> Set as album preview image %>
4
+
5
+ </div>
6
+ <div class="form-actions-right">
7
+ <%= link_to( t('refinery.admin.form_actions.delete'), refinery.photo_gallery_admin_photo_path(photo.id),
8
+ :title=> t('refinery.photo_gallery.admin.photos.photo.delete'),
9
+ :method => :delete,
10
+ :data => {:confirm => t('refinery.admin.delete.message', :title=> photo.title) },
11
+ :class => "button confirm-delete")
12
+
13
+ %>
14
+ </div>
15
+ </div>
@@ -0,0 +1,9 @@
1
+ <% if @photos.length > 0 %>
2
+ <%= render :partial=> "form" %>
3
+ <% else %>
4
+ <%= raw t('.no_photos_yet',
5
+ :create => (link_to t('refinery.photo_gallery.admin.albums.album.upload_photos'), refinery.upload_photo_gallery_admin_album_photos_path( @album) )
6
+ )
7
+ %>
8
+
9
+ <% end %>
@@ -0,0 +1,87 @@
1
+ <%= content_for :javascripts do %>
2
+ <style type="text/css">@import url('/assets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css');</style>
3
+
4
+ <%= javascript_include_tag "/assets/refinery/photo_gallery/admin/plupload/plupload.full.js" -%>
5
+ <%= javascript_include_tag "/assets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js" -%>
6
+ <% if Refinery::PhotoGallery.plupload_locale.present? %>
7
+ <%= javascript_include_tag "/assets/refinery/photo_gallery/admin/plupload/i18n/" + Refinery::PhotoGallery.plupload_locale + ".js" -%>
8
+ <% end %>
9
+
10
+ <script type="text/javascript">
11
+ <% session_key = Rails.application.config.session_options[:key] %>
12
+ $(document).ready(function() {
13
+ $("#uploader").pluploadQueue({
14
+
15
+ // General settings
16
+ runtimes : '<%= Refinery::PhotoGallery.runtimes %>',
17
+ url : '<%= refinery.photo_gallery_admin_photos_path %>',
18
+ max_file_size : '<%= Refinery::PhotoGallery.max_file_size %>',
19
+ multipart: true,
20
+ multipart_params: {
21
+ '<%= session_key %>' : encodeURIComponent('<%= cookies[session_key] %>'),
22
+ 'authenticity_token' : '<%= form_authenticity_token %>',
23
+ 'photo[album_id]' : "<%= @album.id %>"
24
+ },
25
+
26
+
27
+ // Resize images on clientside if we can
28
+ <% if Refinery::PhotoGallery.client_side_resize %>
29
+ resize : {width : <%= Refinery::PhotoGallery.client_side_resize_params[:width] %>,
30
+ height : <%= Refinery::PhotoGallery.client_side_resize_params[:height] %>,
31
+ quality : <%= Refinery::PhotoGallery.client_side_resize_params[:quality] %>},
32
+ <% end %>
33
+
34
+ // Flash settings
35
+ flash_swf_url : '/assets/refinery/photo_gallery/admin/plupload/plupload.flash.swf',
36
+
37
+ // Silverlight settings
38
+ silverlight_xap_url : '/assets/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap',
39
+
40
+ // Post init events, bound after the internal events
41
+ init : {
42
+ FileUploaded: function(up, file, info) {
43
+ if (info.status == 500){
44
+ alert(info.reponse);
45
+ }
46
+ else {
47
+ $('form div#multiple_photo_edit').append(info.response).fadeIn('slow');
48
+ }
49
+ },
50
+ //TODO this hiding/showing is ugly. Rework this.
51
+ StateChanged: function(up) {
52
+ // Called when the state of the queue is changed
53
+ if (up.state == plupload.STARTED ){
54
+ $('form div#upload_progress').show();
55
+ }
56
+ else if (up.state == plupload.STOPPED){
57
+ $('form div#upload_progress').hide();
58
+ $('form div#form_actions').fadeIn('slow');
59
+ }
60
+ }
61
+ }
62
+ });
63
+ })
64
+ </script>
65
+ <% end %>
66
+
67
+ <form>
68
+ <div id="uploader">
69
+ <p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
70
+ </div>
71
+ <br>
72
+ </form>
73
+
74
+ <%= form_for :photos, :url => refinery.update_multiple_photo_gallery_admin_photos_path, :html => { :method => :put, :id=> "form_edit_photos"} do |f| %> <%#TODO DRY %>
75
+ <div id="multiple_photo_edit"></div>
76
+ <div id="upload_progress">
77
+ <%= image_tag 'refinery/photo_gallery/admin/icons/loading.gif' %>
78
+ </div>
79
+ <div id="form_actions" >
80
+ <%= render :partial=> 'form_actions', :locals => {:f => f} %>
81
+ </div>
82
+ <% end %>
83
+
84
+
85
+
86
+ <br><%#= link_to "Edit uploaded photos", untouched_album_photos_path( @album ) %>
87
+ <br><%#= link_to "Back to #{@album.title}", @album %>
@@ -0,0 +1,26 @@
1
+ <% content_for :body_content_right do %>
2
+ <%= message_photos_length_is_zero %>
3
+
4
+ <% @photos.each_with_index do |photo, index| %>
5
+ <div class="column portfolio-item">
6
+ <div class="portfolio-thumbnail-image">
7
+
8
+ <%= link_to (image_tag photo.file.album.url), photo.file.single.url, {
9
+ :target=> "_blank",
10
+ :class=>"fancybox",
11
+ :data =>{:title=> photo_description(photo,@photos, index)},
12
+ :rel=>"group",
13
+ :title=> photo.title } %>
14
+ </div>
15
+ </div>
16
+ <% end %>
17
+
18
+ <div style="clear:both;"></div>
19
+ <%= will_paginate @photos %>
20
+ <% end %>
21
+
22
+ <% content_for :body_content_left do %>
23
+ <%= render :partial=> "refinery/photo_gallery/shared/submenu" %>
24
+ <% end %>
25
+
26
+ <%= render :partial=> "refinery/photo_gallery/shared/layout" %>
@@ -0,0 +1,9 @@
1
+ <% content_for :body_content_right do %>
2
+ <%= message_collections_length_is_zero %>
3
+ <% end %>
4
+
5
+ <% content_for :body_content_left do %>
6
+ <%= render :partial=> "refinery/photo_gallery/shared/submenu" %>
7
+ <% end %>
8
+
9
+ <%= render :partial=> "refinery/photo_gallery/shared/layout" %>
@@ -0,0 +1,19 @@
1
+ <% content_for :body_content_right do %>
2
+ <%= message_albums_length_is_zero %>
3
+
4
+ <ul style="list-style-type: disc;">
5
+ <% @albums.each do |album| %>
6
+ <li><%= link_to album.title, refinery.photo_gallery_collection_album_path(:collection_id=> params[:id], :id => album.id) %></li>
7
+ <%#TODO image thumbnail + description? %>
8
+ <%#= link_to (image_tag photo.file.album.url), photo.file.single.url %>
9
+
10
+ <% end %>
11
+ </ul>
12
+
13
+ <% end %>
14
+
15
+ <% content_for :body_content_left do %>
16
+ <%= render :partial=> "refinery/photo_gallery/shared/submenu" %>
17
+ <% end %>
18
+
19
+ <%= render :partial=> "refinery/photo_gallery/shared/layout" %>
@@ -0,0 +1,22 @@
1
+ <div class="content-wrapper sidebar-included left-sidebar">
2
+ <div class="clear"></div>
3
+ <div class="gdl-page-float-left">
4
+ <div class="gdl-page-item">
5
+ <div class="sixteen columns mt0">
6
+ <%= yield(:body_content_right) %>
7
+ </div>
8
+ </div>
9
+
10
+ <div class="five columns mt0 gdl-left-sidebar">
11
+ <div class="left-sidebar-wrapper gdl-divider">
12
+ <%= yield(:body_content_left) %>
13
+ </div>
14
+ </div>
15
+
16
+ </div>
17
+ <div class="clear"></div>
18
+ </div>
19
+
20
+
21
+
22
+