untouched album listing.
This commit is contained in:
parent
56b2752ab1
commit
a279ba29f9
|
@ -19,7 +19,6 @@ class AlbumsController < ApplicationController
|
|||
|
||||
def untouched
|
||||
@albums = Album.untouched()
|
||||
@albums.ea
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @albums }
|
||||
|
|
|
@ -38,9 +38,9 @@ class PhotosController < ApplicationController
|
|||
def show
|
||||
@photo = Photo.find( params[:id] )
|
||||
previous_rs = Photo.previous( @photo.id, @photo.album )
|
||||
@previous = previous_rs.first if !previous_rs.empty?
|
||||
@previous = previous_rs.first unless previous_rs.empty?
|
||||
next_rs = Photo.next( @photo.id, @photo.album )
|
||||
@next = next_rs.first if !next_rs.empty?
|
||||
@next = next_rs.first unless next_rs.empty?
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @photo }
|
||||
|
|
|
@ -13,11 +13,14 @@
|
|||
</div>
|
||||
|
||||
<p><%= @album.description %></p>
|
||||
|
||||
<% unless @album.photo_tags.empty? %>
|
||||
<p>Tagged with:
|
||||
<% for tag in @album.photo_tags.map{|tag|tag.title}.sort %>
|
||||
<%= link_to tag, album_tag_photos_path(@album, tag )%>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if has_role?("admin") %>
|
||||
<p><%= @album.address %></p>
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
<h1>Albums</h1>
|
||||
<%= render :partial => @albums %>
|
||||
|
||||
<br /><%= link_to "All albums", albums_path %>
|
||||
<% for album in @albums %>
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<%= render :partial => "photos/thumb", :locals => {:photo => album.photos.first } unless album.photos.empty? %>
|
||||
<p><%= link_to album.title, album %></p>
|
||||
</div>
|
||||
<div class="image">
|
||||
<%= render :partial => "photos/thumb", :collection => album.photos.find(:all, :limit => 5, :offset => 1), :as => :photo %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -3,7 +3,7 @@
|
|||
<div id="fullimage">
|
||||
<div id="navigation">
|
||||
<p class="links">
|
||||
<% unless @previous.nil?%>
|
||||
<% unless @previous.nil? %>
|
||||
<%= link_to "Previous", [ @photo.album.collections.first, @photo.album, @previous] %>
|
||||
<% unless @next.nil? %>
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue