[8] | 1 | <div id="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>"name="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>" class="Gallery"> |
---|
[4] | 2 | <% @medias = GalleryMedia.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %> |
---|
| 3 | <span class="EngineeringGallery"> |
---|
[10] | 4 | |
---|
| 5 | <% @media = @medias.first %> |
---|
| 6 | <% if @media != nil %> |
---|
[4] | 7 | <%= link_to_remote( |
---|
| 8 | image_tag( url_for_file_column("media", "medianame", "thumb" ), :style => "float: left"), |
---|
| 9 | :class => "noHighlight", |
---|
| 10 | :url => { :action => "show_media", :params => { :id => @gallery.id } } )%> |
---|
[10] | 11 | <h2><%= @gallery.sTitle %></h2> |
---|
| 12 | <p><%= @gallery.tDescription %></p> |
---|
| 13 | <% else %> |
---|
| 14 | <h2 style="margin-left: 0px; width: 560px;"><%= @gallery.sTitle %></h2> |
---|
| 15 | <p style="margin-left: 130px; float: none;"><%= @gallery.tDescription %></p> |
---|
[4] | 16 | <% end %> |
---|
| 17 | </span> |
---|
| 18 | <div class="divclear"></div> |
---|
| 19 | |
---|
[8] | 20 | <div id="Gallery_Media_<%= @gallery.id %>" style="display: none;"></div> |
---|
[10] | 21 | |
---|
| 22 | <% @files = GalleryFiles.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %> |
---|
[4] | 23 | |
---|
[10] | 24 | <div style="margin-left: 135px;"> |
---|
| 25 | <%= '<h3 style="color: #ef7d41; font-family: Georgia; font-weight: 600;"><b>Files</b></h3>' if @files.size > 0 %> |
---|
| 26 | <p> |
---|
| 27 | <ul style="color: white;"> |
---|
[4] | 28 | <% for @file in @files %> |
---|
| 29 | <% fnames = @file.filename.split("/") %> |
---|
| 30 | <li><a href="<%= url_for_file_column("file", "filename") %>"> |
---|
| 31 | <%= fnames[fnames.size - 1] %> |
---|
| 32 | </a></li> |
---|
| 33 | <% end %> |
---|
| 34 | </ul> |
---|
| 35 | </p> |
---|
| 36 | </div> |
---|
| 37 | </div> |
---|
| 38 | <% if logged_in? %> |
---|
| 39 | <%= link_to 'Edit', edit_gallery_path(@gallery) %> |
---|
| 40 | <% end %> |
---|
| 41 | |
---|