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

Revision 4, 1.4 kB (checked in by falcon, 17 years ago)

75% complete. ajax support for engineering and galleries. galleries add/edit. artwork and engineering layouts.

RevLine 
[4]1<div id="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>"name="<%= @gallery.sTitle.to_s + "_" + @gallery.id.to_s %>" class="EngineeringGallery">
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 style="float: left; width: 380px; margin-left: 5px;"><%= @gallery.sTitle %></h2>
14                <p style="float: left; margin-left: 5px; width: 380px;"><%= @gallery.tDescription %></p>
15        </span>
16        <div class="divclear"></div>
17               
18        <div id="Gallery_Media_<%= @gallery.id %>" style="display: none; background-color: #435758"></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.