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