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