root/app/views/artwork/_show_artwork.html.erb~ @ 6

Revision 4, 0.9 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_" + @gallery.id.to_s %>" name="<%= "Gallery_" + @gallery.id.to_s %>" class="Gallery">
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.to_s + "<br/><br/>" + @media.tDescription.to_s if (@media.sTitle != nil  && @media.tDescription != 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</div>
23<% if logged_in? %>     
24        <%= link_to 'Edit', edit_gallery_path(@gallery) %>
25<% end %>
26
27
Note: See TracBrowser for help on using the browser.