root/app/views/engineering/_show_engineering.html.erb~ @ 8

Revision 8, 1.2 kB (checked in by falcon, 17 years ago)

Tweaks and upgrades, routes/paginate/etc

Line 
1<div id="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>"name="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>" class="Gallery">
2        <% @medias = GalleryMedia.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %>
3       
4        <span class="EngineeringGallery">
5                <% if @medias != nil %>
6                <% @media = @medias.first %>
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 } } )%>
11                <% end %>
12                               
13                <h2><%= @gallery.sTitle %></h2>
14                <p><%= @gallery.tDescription %></p>
15        </span>
16        <div class="divclear"></div>
17               
18        <div id="Gallery_Media_<%= @gallery.id %>" style="display: none;"></div>
19       
20        <div style="margin-left: 160px;">
21        <h3 style="color: #ef7d41;"><b>Files</b></h3>
22                        <p>
23                        <% @files = GalleryFiles.find(:all, :conditions => ["gallery_id = ?", @gallery.id]) %>
24                        <ul>
25                        <% for @file in @files %>
26                                <% fnames = @file.filename.split("/") %>
27                                <li><a href="<%= url_for_file_column("file", "filename") %>">
28                                        <%= fnames[fnames.size - 1] %>
29                                </a></li>
30                        <% end %>
31                </ul>
32        </p>
33        </div>
34
35
36</div>
37<% if logged_in? %>     
38        <%= link_to 'Edit', edit_gallery_path(@gallery) %>
39<% end %>
40
Note: See TracBrowser for help on using the browser.