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

Revision 4, 0.8 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        <p>
7                <% x = 0 %>
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                <% x = x + 1 %>
17                <%= "</span><span>" if x % 4 == 0 %>
18                <% end %>
19                </span>
20        </p>
21</div>
22<% if logged_in? %>     
23        <%= link_to 'Edit', edit_gallery_path(@gallery) %>
24<% end %>
25
26
Note: See TracBrowser for help on using the browser.