Revision 8, 1.1 kB
(checked in by falcon, 17 years ago)
|
Tweaks and upgrades, routes/paginate/etc
|
Rev | Line | |
---|
[4] | 1 | <div id="Gallery" name="<%= "Gallery_" + @gallery.id.to_s %>" > |
---|
| 2 | <h1><%= @gallery.sTitle %></h1> |
---|
[1] | 3 | |
---|
[4] | 4 | <p><%= @gallery.tDescription %></p> |
---|
[3] | 5 | |
---|
[4] | 6 | <h2>Media:</h2> |
---|
| 7 | <p> |
---|
| 8 | <span> |
---|
| 9 | <% @medias = GalleryMedia.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %> |
---|
| 10 | <% for @media in @medias %> |
---|
| 11 | <a href="<%= url_for_file_column("media", "medianame", "maximum") %>" class="noHighlight" |
---|
| 12 | rel="lightbox[GalleryMedia]" |
---|
| 13 | title="<%= @media.sTitle.to_s + "<br/><br/>" + @media.tDescription.to_s if (@media.sTitle != nil && @media.tDescription != nil)%>"> |
---|
| 14 | <img src="<%= url_for_file_column("media", "medianame", "thumb") %>" /> |
---|
| 15 | </a> |
---|
| 16 | <% end %> |
---|
| 17 | </span> |
---|
[3] | 18 | </p> |
---|
| 19 | |
---|
[4] | 20 | <h2>Files</h2> |
---|
| 21 | <p> |
---|
| 22 | <% @files = GalleryFiles.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %> |
---|
| 23 | <ul> |
---|
| 24 | <% for @file in @files %> |
---|
| 25 | <% fnames = @file.filename.split("/") %> |
---|
| 26 | <li><a href="<%= url_for_file_column("file", "filename") %>"> |
---|
| 27 | <%= fnames[fnames.size - 1] %> |
---|
| 28 | </a></li> |
---|
| 29 | <% end %> |
---|
| 30 | </ul> |
---|
[3] | 31 | </p> |
---|
[4] | 32 | </div> |
---|
| 33 | <% if logged_in? %> |
---|
| 34 | <%= link_to 'Edit', edit_gallery_path(@gallery) %> | |
---|
| 35 | <%= link_to 'Back', galleries_path %> |
---|
| 36 | <% end %> |
---|
[3] | 37 | |
---|
[4] | 38 | |
---|