myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2734] branches/elico: Modularized layout and imp


From: noreply
Subject: [myexperiment-hackers] [2734] branches/elico: Modularized layout and improved layout picking code
Date: Mon, 24 Oct 2011 08:20:52 -0400 (EDT)

Revision
2734
Author
"finn"
Date
2011-10-24 08:20:51 -0400 (Mon, 24 Oct 2011)

Log Message

Modularized layout and improved layout picking code

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/elico/app/controllers/application.rb (2733 => 2734)


--- branches/elico/app/controllers/application.rb	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/controllers/application.rb	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1169,7 +1169,7 @@
     else
       network = Network.find(network_id.to_i)
       if network && find_permission_for_contributor(object.contribution.policy.permissions, "Network", network_id.to_i)
-        object.contribution.layout = network.layout
+        object.contribution.layout = network.layout_name
         object.contribution.save
       else
         object.errors.add_to_base("You may only choose layouts for groups that this #{object.class.name.downcase} is shared with.")

Modified: branches/elico/app/helpers/application_helper.rb (2733 => 2734)


--- branches/elico/app/helpers/application_helper.rb	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/helpers/application_helper.rb	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1607,16 +1607,17 @@
   end
 
   #Selects layout for contributables/groups or uses site's default
-  def page_layout
+  def configure_layout
     contributable = (@workflow || @pack || @blog_post || @blob)
     layout = nil
 
     if contributable && contributable.contribution
-      layout = contributable.contribution.layout
+      layout = Conf.layouts[contributable.contribution.layout]
     elsif @network
       layout = @network.layout
     end
 
-    return layout || Conf.page_template
+    @layout = layout || {"page_template" => Conf.page_template, "stylesheets" => [Conf.stylesheet]}
   end
+
 end

Modified: branches/elico/app/models/network.rb (2733 => 2734)


--- branches/elico/app/models/network.rb	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/models/network.rb	2011-10-24 12:20:51 UTC (rev 2734)
@@ -184,13 +184,17 @@
   end
 
   #Returns the page_template defined for this network in settings.yml > layouts:
-  def layout
+  def layout_name
     Conf.layouts.each do |k,v|
       if v["network_id"] == id
-        return v["page_template"]
+        return k
       end
     end
 
     return nil
   end
+
+  def layout
+    Conf.layouts[layout_name]
+  end
 end

Deleted: branches/elico/app/views/blog_posts/_subnav.rhtml (2733 => 2734)


--- branches/elico/app/views/blog_posts/_subnav.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/blog_posts/_subnav.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,13 +0,0 @@
-<% case controller.action_name.to_s; when "show" %>
-
-  <% if logged_in? && Authorization.is_authorized?("edit", nil, @blog_post.blog, current_user) %>
-    <ul class="sectionIcons">
-      <li><%= link_to 'Edit Blog Post', edit_blog_post_path(@blog_post.blog, @blog_post) %></li>
-    </ul>       
-  <% end %>
-
-<% else %>
-
-  <!-- no subnav options -->
-
-<% end %>

Modified: branches/elico/app/views/blog_posts/show.rhtml (2733 => 2734)


--- branches/elico/app/views/blog_posts/show.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/blog_posts/show.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,3 +1,9 @@
+<% if logged_in? && Authorization.is_authorized?("edit", nil, @blog_post.blog, current_user) %>
+  <ul class="sectionIcons">
+    <li><%= link_to 'Edit Blog Post', edit_blog_post_path(@blog_post.blog, @blog_post) %></li>
+  </ul>
+<% end %>
+
 <p>
   <b>Blog:</b>
   <%=h @blog_post.blog_id %>

Modified: branches/elico/app/views/contributions/_sharing_form.rhtml (2733 => 2734)


--- branches/elico/app/views/contributions/_sharing_form.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/contributions/_sharing_form.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -159,9 +159,9 @@
                   <option value="1" <%= 'selected="selected"' if !edit or !perm or (perm and perm.level == 1) %>>View and Download only</option>
                   <option value="2" <%= 'selected="selected"' if perm and perm.level == 2 %>>View, Download and Update</option>
                 </select>
-                <% if n.layout %>
+                <% if n.layout_name %>
                     <input id="layout_selection_<%= n.id %>" title="Use <%= h(n.title) -%>'s layout" class="layout_selection" type="checkbox" name="layout" value="<%= n.id -%>"
-                           <%= 'checked="checked"' if edit && contributable.contribution.layout == n.layout %>
+                           <%= 'checked="checked"' if edit && contributable.contribution.layout == n.layout_name %>
                             (box) { if(box.id != 'layout_selection_<%= n.id %>') box.checked = false;})"
                            <%= 'disabled="disabled"' unless perm -%>/>
                     Use <%= h(n.title) -%>'s layout

Added: branches/elico/app/views/layouts/_alerts.rhtml (0 => 2734)


--- branches/elico/app/views/layouts/_alerts.rhtml	                        (rev 0)
+++ branches/elico/app/views/layouts/_alerts.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -0,0 +1,14 @@
+<% if flash[:error] %>
+  <div id="error_flash" class="box_standout">
+    <%= link_to_function image_tag("close.gif", :style => "float: right;"),
+                         visual_effect(:toggle_slide, "error_flash", :duration => 0.3) %>
+    <%= white_list flash[:error] %>
+  </div>
+<% end %>
+<% if flash[:notice] %>
+  <div id="notice_flash" class="box_standout">
+    <%= link_to_function image_tag("close.gif", :style => "float: right;"),
+                         visual_effect(:toggle_slide, "notice_flash", :duration => 0.3) %>
+    <%= white_list flash[:notice] %>
+  </div>
+<% end %>
\ No newline at end of file

Modified: branches/elico/app/views/layouts/_elico.rhtml (2733 => 2734)


--- branches/elico/app/views/layouts/_elico.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/layouts/_elico.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,126 +1,47 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%# Defines a new header, then calls main myExperiment layout %>
 
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-	<head>
-		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-		<%= t :site => "#{Conf.sitename} &#45; #{controller_visible_name(controller.controller_name.humanize)}", :separator => "&#45;" %>
-		<link rel="shortcut icon" href="" type="image/x-icon"/>
-		<%= stylesheet_link_tag 'reset-fonts-grids' %>
-		<%= stylesheet_link_tag 'base-min' %>
-		<%= stylesheet_link_tag 'acts_as_taggable_stylesheet' %>
-		<%= stylesheet_link_tag 'star_rating' %>
-		<%= stylesheet_link_tag 'styles','elico' %>
-		<%= stylesheet_link_tag 'gadgets' %>
-
-		<% if ["workflows", "users"].include?(controller.controller_name.downcase) and ["comments_timeline", "timeline"].include?(controller.action_name.downcase) -%>
-			<script src="" type="text/_javascript_"></script>
-		<% end -%>
-
-		<%= _javascript__include_tag :defaults %>
-		<%= _javascript__include_tag "boxover.js" %>
-
-		<%= render :partial => "layouts/feed_link_tags" %>
-	</head>
-	<body>
-
-    <div id="header" align="center" style="color: white; line-height: 80px">
-      <div id="page_content">
-        <div style="float: left; height: 80px">
-          <img src="" style="vertical-align: middle; width: 60px; height: 60px"></img>
-          <span style="font-size: 220%; font-weight: bold">Data Mining Portal</span>
+<% content_for :header do %>
+</div>
+  <div id="elico_header">
+    <div class="logo">
+      <div style="float: left; margin-bottom: 0.5em">
+        <img src="" style="float: left; vertical-align: middle; width: 60px; height: 60px"/>
+        <div style="float: left; margin-top: 1em; margin-left: 1em">
+          <div style="font-size: 220%; font-weight: bold; vertical-align: middle">Data Mining Portal</div>
+          <div style="margin: 0.5em 0 0 1em">
+            on <%= link_to image_tag("/images/logo_tiny.png", :style=>"-moz-border-radius: 2px; border-radius: 2px; vertical-align: middle;border: 1px solid white"), "/" -%>
+          </div>
         </div>
-        <div style="float: right">
-          <span style="font-size: 120%">e-Laboratory for Interdisciplinary Collaborative Data Mining</span>
-        </div>
       </div>
+      <div style="float: right; font-size: 120%; margin-top: 1.5em">
+        e-Laboratory for Interdisciplinary Collaborative Data Mining
+      </div>
     </div>
-    <div id="header_menu" align="center">
-      <div id="page_content">
-        <div style="text-align: left; float: left;">
-          <span><%= link_to "About", "http://www.e-lico.eu/?q=node/4", :target => '_blank' %></span>
-          <span><%= link_to "Mailing List", "http://lists.e-lico.eu/mailman/listinfo/dm-myexperiment", :target => '_blank' %></span>
-          <span><%= link_to "Publications", "http://www.e-lico.eu/?q=publications", :target => '_blank' %></span>
+    <br class="clearer"/>
+    <div id="elico_links_bar">
+      <div id="inner">
+        <div style="float: left;" class="links">
+          <%= link_to "About", "http://www.e-lico.eu/?q=node/4", :target => '_blank' %> |
+          <%= link_to "Mailing List", "http://lists.e-lico.eu/mailman/listinfo/dm-myexperiment", :target => '_blank' %> |
+          <%= link_to "Publications", "http://www.e-lico.eu/?q=publications", :target => '_blank' %>
         </div>
-        <div style="text-align: right; float: right;">
-          <% if logged_in? -%>
-            <span><%= link_to("Logout", session_path, { :method => :delete }) -%></span>
-          <% else -%>
-            <span><%= link_to("Log in", new_session_path) -%></span>
-            <span><%= link_to("Register", new_user_path) -%></span>
-          <% end %>
-            <span><%= link_to("Give feedback", "/feedback") -%></span>
-            <span><%= link_to("Invite", invite_users_path) -%></span>
+        <div style="float: right;" class="links">
+          <%= render :partial => 'layouts/user_links' %>
         </div>
+        <br class="clearer"/>
       </div>
     </div>
-    <div id="main_part" align="center">
-      <br />
-		<div id="doc2" class="yui-t4">
-			<div id="hd">
-	  			
-				<div>
-					<ul class="tabnav">
-                                          <% Conf.main_tabs.each do |tab| %>
-                                            <li <%= (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'id="selected_tabnav"' : '' %>>
-                                              <%= link_to(tab['label'], tab['link']) -%>
-                                            </li>
-                                          <% end %>
-					</ul>
-				</div>
-	  			<div id="myexp_searchbar"><%= render :partial => "layouts/search" %></div>
-			</div>
-			<div id="bd">
-				<div id="yui-main"> 
-	  				<div class="yui-b">
-					    <div id="myexp_breadcrumbs_bar">
-								<%= render :partial => "layouts/breadcrumbs_bar" %>
-							</div>
-	    				<div id="myexp_content">
-								<% if flash[:error] %>
-									<div id="error_flash" class="box_standout" style="color: red; font-weight: bold; margin-bottom: 1.5em; line-height: 1.4;">
-										<%= link_to_function image_tag("close.gif", :style => "float: right;"), 
-																				 visual_effect(:toggle_slide, "error_flash", :duration => 0.3) %>
-										<%= white_list flash[:error] %>
-									</div>
-								<% end %>
-		    				<% if flash[:notice] %>
-									<div id="notice_flash" class="box_standout" style="color: green; font-weight: bold; margin-bottom: 1.5em; line-height: 1.4;">
-										<%= link_to_function image_tag("close.gif", :style => "float: right;"), 
-																				 visual_effect(:toggle_slide, "notice_flash", :duration => 0.3) %>
-										<%= white_list flash[:notice] %>
-									</div>
-								<% end %>
-								
-		    				<%= render :partial => "subnav" %>
-		    				
-								<%= yield :layout %>
-						</div>
-					</div>
-				</div>
-				<div id="myexp_sidebar" class="yui-b">
-					<%= render :partial => "layouts/sidebar" %>
-				</div>
-			</div>
-		</div>
+  </div>
+
+<div id="doc2" class="yui-t4">
+  <div id="hd">
+    <div id="myexp_tabs">
+      <%= render :partial => 'layouts/tab_bar' %>
     </div>
-    <div id="post_main_part" align="center"></div>
-    <div id="footer_part" align="center">
-    
-      <div id="page_content">
-			<% cache(:controller => 'global_cache', :action ="" 'footer') do -%>
-				<div id="ft">
-					<%= render :partial => "layouts/footer" %>
-				</div>
-			<% end -%>
-			
-			<%= render :partial => "layouts/debug" if Conf.show_debug %> 
-      </div>
+    <div id="myexp_searchbar">
+      <%= render :partial => "layouts/search" %>
     </div>
+  </div>
+<% end %>
 
-		<%= _javascript__include_tag "tabs.js" %>
-		<%= _javascript__include_tag "folds.js" %>
-		
-		<%= render :partial => "layouts/web_analytics" if Conf.google_web_analytics["enable"] %>
-	</body>
-</html>
+<%= render :partial => "layouts/myexperiment" %>

Modified: branches/elico/app/views/layouts/_footer.rhtml (2733 => 2734)


--- branches/elico/app/views/layouts/_footer.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/layouts/_footer.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -47,4 +47,3 @@
 		</tr>
 	</table>
 </div>
-

Modified: branches/elico/app/views/layouts/_myexperiment.rhtml (2733 => 2734)


--- branches/elico/app/views/layouts/_myexperiment.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/layouts/_myexperiment.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,121 +1,99 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-  <head>
-    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-    <%= t :site => "#{Conf.sitename} &#45; #{controller_visible_name(controller.controller_name.humanize)}", :separator => "&#45;" %>
-<% if @lod_rdf %>    <link rel="alternate" href="" @lod_rdf -%>" type="application/rdf+xml" title="RDF+XML" /><% end %>
-<% if @lod_xml %>    <link rel="alternate" href="" @lod_xml -%>" type="application/xml" title="REST XML" /><% end %>
-    <link rel="shortcut icon" href="" type="image/x-icon"/>
-    <%= stylesheet_link_tag 'reset-fonts-grids' %>
-    <%= stylesheet_link_tag 'base-min' %>
-    <%= stylesheet_link_tag 'acts_as_taggable_stylesheet' %>
-    <%= stylesheet_link_tag 'star_rating' %>
-    <%= stylesheet_link_tag Conf.stylesheet %>
-    <%= stylesheet_link_tag 'gadgets' %>
-    
-    <% if controller.action_name.downcase == "timeline" %>
-      <script src="" type="text/_javascript_"></script>
-    <% end -%>
-    
-    <%= _javascript__include_tag :defaults %>
-    <%= _javascript__include_tag "boxover.js" %>
-    
-    <%= render :partial => "layouts/feed_link_tags" %>
+<head>
+  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  <%= t :site => "#{Conf.sitename} &#45; #{controller_visible_name(controller.controller_name.humanize)}", :separator => "&#45;" %>
+  <% if @lod_rdf %><link rel="alternate" href="" @lod_rdf -%>" type="application/rdf+xml" title="RDF+XML" /><% end %>
+  <% if @lod_xml %><link rel="alternate" href="" @lod_xml -%>" type="application/xml" title="REST XML" /><% end %>
+  <link rel="shortcut icon" href="" type="image/x-icon"/>
+  <%= stylesheet_link_tag 'reset-fonts-grids', 'base-min', 'acts_as_taggable_stylesheet', 'star_rating', 'gadgets', address@hidden"stylesheets"] %>
+  <%= _javascript__include_tag :defaults, "boxover.js" %>
 
-    <% if @extra_head_content %>
-      <%= @extra_head_content -%>
-    <% end %>
+  <% if controller.action_name.downcase == "timeline" %>
+    <script src="" type="text/_javascript_"></script>
+  <% end -%>
 
-  </head>
-  <body>
-    <div id="doc2" class="yui-t4">
-      <div id="hd">
-          <div id="myexp_header">
-            <div class="logo">
-            <%= link_to image_tag(Conf.site_logo), "/" %>
+  <%= render :partial => "layouts/feed_link_tags" %>
+
+  <%= yield :head_options -%>
+</head>
+<body>
+
+<div id="doc2" class="yui-t4">
+
+  <% if @content_for_header %>
+    <%= yield :header %>
+  <% else %>
+    <div id="hd">
+      <div id="myexp_header">
+        <div class="logo">
+          <%= link_to image_tag(Conf.site_logo), "/" %>
+          <div id="site_info_links" class="links">
+            <%= link_to "About", "http://wiki.myexperiment.org/", :target => '_blank' %> |
+            <%= link_to "Mailing List", "http://lists.nongnu.org/mailman/listinfo/myexperiment-discuss", :target => '_blank' %> |
+            <%= link_to "Publications", "http://wiki.myexperiment.org/index.php/Papers", :target => '_blank' %>
           </div>
-          <div class="links">
-            <div style="text-align: left; float: left; width: 34%; padding-top: 6px;">
-              <span><b><%= link_to "About", "http://wiki.myexperiment.org/", :target => '_blank' %></b></span>
-              <span>&nbsp;|&nbsp;</span>
-              <span><b><%= link_to "Mailing List", "http://lists.nongnu.org/mailman/listinfo/myexperiment-discuss", :target => '_blank' %></b></span>
-              <span>&nbsp;|&nbsp;</span>
-              <span><b><%= link_to "Publications", "http://wiki.myexperiment.org/index.php/Papers", :target => '_blank' %></b></span>
-            </div>
-            <div style="text-align: right; float: right; width: 64%;">
-              <% if logged_in? -%>
-                <span><b><%= signout_link -%></b></span>
-              <% else -%>
-                <span><b><%= icon "login", new_session_url, nil, nil, "Log in" -%></b></span>
-                <span>&nbsp;|&nbsp;</span>
-                <span><b><%= icon "user", new_user_url, nil, nil, "Register" -%></b></span>
-              <% end %>
-              <span>&nbsp;|&nbsp;</span>
-              <span><b><%= icon "feedback", "/feedback", nil, nil, "Give us Feedback" -%></b></span>
-              <span>&nbsp;|&nbsp;</span>
-              <span><b><%= icon "user-invite", invite_users_path, nil, nil, "Invite" -%></b></span>
-            </div>
-            <div class="clearer">&nbsp;</div>
-          </div>
-          <div class="clearer">&nbsp;</div>
         </div>
-        <div>
-          <ul class="tabnav">
-                                          <% Conf.main_tabs.each do |tab| %>
-                                            <li <%= (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'id="selected_tabnav"' : '' %>>
-                                              <%= link_to(tab['label'], tab['link']) -%>
-                                            </li>
-                                          <% end %>
-          </ul>
+        <div id="user_links" class="links">
+          <%= render :partial => 'layouts/user_links' %>
         </div>
-          <div id="myexp_searchbar"><%= render :partial => "layouts/search" %></div>
+        <br class="clearer"/>
       </div>
-      <div id="bd">
-        <div id="yui-main"> 
-            <div class="yui-b">
-              <div id="myexp_breadcrumbs_bar">
-                <%= render :partial => "layouts/breadcrumbs_bar" %>
-              </div>
-              <div id="myexp_content">
-                <% if flash[:error] %>
-                  <div id="error_flash" class="box_standout" style="color: red; font-weight: bold; margin-bottom: 1.5em; line-height: 1.4;">
-                    <%= link_to_function image_tag("close.gif", :style => "float: right;"), 
-                                         visual_effect(:toggle_slide, "error_flash", :duration => 0.3) %>
-                    <%= white_list flash[:error] %>
-                  </div>
-                <% end %>
-                <% if flash[:notice] %>
-                  <div id="notice_flash" class="box_standout" style="color: green; font-weight: bold; margin-bottom: 1.5em; line-height: 1.4;">
-                    <%= link_to_function image_tag("close.gif", :style => "float: right;"), 
-                                         visual_effect(:toggle_slide, "notice_flash", :duration => 0.3) %>
-                    <%= white_list flash[:notice] %>
-                  </div>
-                <% end %>
-                
-                <%= render :partial => "subnav" %>
-                
-                <%= yield :layout %>
-            </div>
+      <div id="myexp_tabs">
+        <%= render :partial => 'layouts/tab_bar' %>
+      </div>
+      <div id="myexp_searchbar">
+        <%= render :partial => "layouts/search" %>
+      </div>
+    </div>
+  <% end %>
+
+
+  <% if @content_for_body %>
+    <%= yield :body %>
+  <% else %>
+    <div id="bd">
+      <div id="yui-main">
+        <div class="yui-b">
+          <div id="myexp_breadcrumbs_bar">
+            <%= render :partial => "layouts/breadcrumbs_bar" %>
           </div>
+          <div id="myexp_content">
+            <%= render :partial => 'layouts/alerts' %>
+
+            <%= yield :layout %>
+
+          </div>
         </div>
-        <div id="myexp_sidebar" class="yui-b">
-          <%= render :partial => "layouts/sidebar" %>
-        </div>
       </div>
+      <div id="myexp_sidebar" class="yui-b">
+        <%= render :partial => "layouts/sidebar" %>
+      </div>
+    </div>
+  <% end %>
+
+
+  <% if @content_for_footer %>
+    <%= yield :footer %>
+  <% else %>
       <% cache(:controller => 'global_cache', :action ="" 'footer') do -%>
         <div id="ft">
           <%= render :partial => "layouts/footer" %>
         </div>
-      <% end -%>
-      
-      <%= render :partial => "layouts/debug" if Conf.show_debug %> 
-    </div>
-    
-    <%= _javascript__include_tag "tabs.js" %>
-    <%= _javascript__include_tag "folds.js" %>
-    
-    <%= render :partial => "layouts/web_analytics" if Conf.google_web_analytics["enable"] %>
-  </body>
+      <br class="clearer"/>
+    <% end -%>
+  <% end %>
+
+
+  <%= render :partial => "layouts/debug" if Conf.show_debug %>
+</div>
+
+<%= _javascript__include_tag "tabs.js" %>
+<%= _javascript__include_tag "folds.js" %>
+
+<%= render :partial => "layouts/web_analytics" if Conf.google_web_analytics["enable"] %>
+
+</body>
 </html>

Added: branches/elico/app/views/layouts/_tab_bar.rhtml (0 => 2734)


--- branches/elico/app/views/layouts/_tab_bar.rhtml	                        (rev 0)
+++ branches/elico/app/views/layouts/_tab_bar.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -0,0 +1,7 @@
+<ul class="tabnav">
+  <% Conf.main_tabs.each do |tab| %>
+    <li <%= (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'id="selected_tabnav"' : '' %>>
+      <%= link_to(tab['label'], tab['link']) -%>
+    </li>
+  <% end %>
+</ul>
\ No newline at end of file

Added: branches/elico/app/views/layouts/_user_links.rhtml (0 => 2734)


--- branches/elico/app/views/layouts/_user_links.rhtml	                        (rev 0)
+++ branches/elico/app/views/layouts/_user_links.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -0,0 +1,8 @@
+<% if logged_in? -%>
+  <%= signout_link -%> |
+<% else -%>
+  <%= icon "login", new_session_url, nil, nil, "Log in" -%> |
+  <%= icon "user", new_user_url, nil, nil, "Register" -%> |
+<% end %>
+<%= icon "feedback", "/feedback", nil, nil, "Give us Feedback" -%> |
+<%= icon "user-invite", invite_users_path, nil, nil, "Invite" -%>
\ No newline at end of file

Modified: branches/elico/app/views/layouts/application.rhtml (2733 => 2734)


--- branches/elico/app/views/layouts/application.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/layouts/application.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1 +1,2 @@
-<%= render :partial => page_layout %>
+<% configure_layout %>
+<%= render :partial => @layout["page_template"] %>

Deleted: branches/elico/app/views/pictures/_subnav.rhtml (2733 => 2734)


--- branches/elico/app/views/pictures/_subnav.rhtml	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/app/views/pictures/_subnav.rhtml	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,16 +0,0 @@
-<% case controller.action_name.to_s; when "index" %>
-
-  <!-- no subnav options -->
-
-<% when "show" %>
-
-  <ul class="sectionIcons">
-o    <li><%= link_to 'Edit Picture', edit_picture_path(@picture.user_id, @picture) %></li>
-    <li><%= link_to 'Remove Picture', picture_path(@picture.user_id, @picture), :confirm => 'Are you sure?', :method => :delete %></li>
-  </ul>
-
-<% else %>
-
-  <!-- no subnav options -->
-
-<% end %>

Modified: branches/elico/public/stylesheets/elico.css (2733 => 2734)


--- branches/elico/public/stylesheets/elico.css	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/public/stylesheets/elico.css	2011-10-24 12:20:51 UTC (rev 2734)
@@ -1,14 +1,6 @@
-/*
-   This stylesheet relies on base stylesheets from the
-   Yahoo UI library (http://developer.yahoo.com/yui/),
-   licensed under the BSD License
+/* Stylesheet for the e-LICO layout. Requires main myExperiment stylesheet. */
 
-   Note that for font-size, only use %ages according to:
-   http://developer.yahoo.com/yui/fonts/#fontsize
-*/
-
-
-#footer_part, body, #main_part, #post_main_part  {
+body  {
 	background: #cfd5dd;
 }
 
@@ -16,64 +8,41 @@
   background: #4d597e;
 }
 
-#header {
-	background: url('/images/elico_back1.png') repeat-x center;
-  width: 100%;
-  height: 80px;
+#elico_header
+{
+  background: url("/images/elico_back1.png") repeat-x scroll center top #2C3966;
 }
 
-#header > #page_content > DIV > * {
-	vertical-align: middle;
+#elico_links_bar
+{
+  width: 73.074em;
+  height: 32px;
+  margin: 0 auto;
+  padding: 0 1em;
 }
 
-#header_menu {
-	background: #2c3966 url('/images/elico_back2.png') repeat-y center;
-  width: 100%;
-  height: 32px;
+#elico_links_bar #inner
+{
+  border: 1px solid #7D89BE;
+  background: #4D597E;
+  margin: 0 -1em;
+  padding: 0 1em;
 }
 
-#header_menu A {
+.logo {
+  width: 73.074em;
+  float: none;
+  text-align: left;
   color: white;
+  margin: 0 auto;
+  padding-top: 0.5em;
 }
 
-#header_menu #page_content > DIV > * {
-  vertical-align: middle;
+.links {
+  height: 2em;
+  padding: 0.5em;
 }
 
-#header_menu #page_content > DIV {
-  height: 32px;
-  line-height: 32px;
-  padding: 0;
+.links a {
+  color: white;
 }
-
-#header_menu #page_content > DIV > SPAN {
-  font-weight: bold;
-  margin-left:  8px;
-  margin-right: 8px;
-}
-
-#header_menu SPAN.icon A > * {
-  vertical-align: middle;
-}
-
-#page_content {
-  width: 73.07em;
-}
-
-#main_part {
-  background-image: url('/images/elico_back3.png');
-  background-repeat: repeat-y;
-  background-position: center;
-  width: 100%;
-}
-
-#post_main_part {
-  background-image: url('/images/elico_back4.png');
-  background-repeat: repeat-y;
-  background-position: center;
-  width: 100%;
-}
-
-#ft {
-  background: white;
-}

Modified: branches/elico/public/stylesheets/styles.css (2733 => 2734)


--- branches/elico/public/stylesheets/styles.css	2011-10-21 12:05:10 UTC (rev 2733)
+++ branches/elico/public/stylesheets/styles.css	2011-10-24 12:20:51 UTC (rev 2734)
@@ -7,7 +7,7 @@
    http://developer.yahoo.com/yui/fonts/#fontsize
 */
 body {
-	background: #8e8e8e url('/images/body-bg.gif') repeat-y center;
+	background: #8e8e8e;
 	/* Only need to define one font here because the 
 	   YUI Fonts CSS provides a degradation path
 	   (see: http://developer.yahoo.com/yui/fonts/) */
@@ -127,25 +127,29 @@
 
 #doc2 {
 	background-color: #FFFFFF;
+  padding: 0 1em;
 }
 
 #myexp_header {
-	margin: 1em 0.5em 0 0.5em;
+	margin: 0em 0.5em;
 }
 
-#myexp_header .logo {
+#hd
+{
+  padding-top: 1em;
+}
+
+.logo {
 	float: left;
 	width: 300px;
 }
 
-#myexp_header .links {
+.links {
 	color: #999999;
   font-weight: bold;
 }
 
 #site_info_links {
-  text-align: left;
-  float: left;
   margin: 0.5em 0;
 }
 
@@ -187,7 +191,7 @@
 /* Begin Footer styles */
 
 #ft {
-	margin: 2em 0;
+	margin-top: 2em;
 	border: 0px dotted #999999;
 	border-width: 1px 0 1px 0;
 	color: #333333;
@@ -2286,3 +2290,17 @@
 .relationship_sentences * {
   vertical-align: middle;
 }
+
+#error_flash {
+  color: red;
+  font-weight: bold;
+  margin-bottom: 1.5em;
+  line-height: 1.4;
+}
+
+#notice_flash {
+  color: green;
+  font-weight: bold;
+  margin-bottom: 1.5em;
+  line-height: 1.4;
+}
\ No newline at end of file

reply via email to

[Prev in Thread] Current Thread [Next in Thread]