Diff
Modified: branches/elico/app/helpers/application_helper.rb (2767 => 2768)
--- branches/elico/app/helpers/application_helper.rb 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/app/helpers/application_helper.rb 2011-10-27 12:56:26 UTC (rev 2768)
@@ -1617,7 +1617,7 @@
layout = @network.layout
end
- @layout = layout || {"page_template" => Conf.page_template, "stylesheets" => [Conf.stylesheet]}
+ @layout = layout || {"layout" => Conf.page_template, "stylesheets" => [Conf.stylesheet]}
end
end
Modified: branches/elico/app/views/layouts/_elico.rhtml (2767 => 2768)
--- branches/elico/app/views/layouts/_elico.rhtml 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/app/views/layouts/_elico.rhtml 2011-10-27 12:56:26 UTC (rev 2768)
@@ -2,38 +2,39 @@
<% 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 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; font-size: 120%; margin-top: 1.5em">
- e-Laboratory for Interdisciplinary Collaborative Data Mining
- </div>
</div>
+ <div style="float: right; font-size: 120%; margin-top: 1.5em">
+ e-Laboratory for Interdisciplinary Collaborative Data Mining
+ </div>
<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="float: right;" class="links">
- <%= render :partial => 'layouts/user_links' %>
- </div>
- <br class="clearer"/>
+ </div>
+ <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="float: right;" class="links">
+ <%= render :partial => 'layouts/user_links' %>
+ </div>
+ <br class="clearer"/>
</div>
</div>
+</div>
-<div id="doc2" class="yui-t4">
+<div id="doc2" class="yui-t4" style="*overflow: visible; *height: auto">
<div id="hd">
<div id="myexp_tabs">
<%= render :partial => 'layouts/tab_bar' %>
@@ -44,4 +45,5 @@
</div>
<% end %>
+<%# TODO: In rails 2, this can possibly be removed, and the layout specified when rendering the partial in application.rhtml %>
<%= render :partial => "layouts/myexperiment" %>
Modified: branches/elico/app/views/layouts/_myexperiment.rhtml (2767 => 2768)
--- branches/elico/app/views/layouts/_myexperiment.rhtml 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/app/views/layouts/_myexperiment.rhtml 2011-10-27 12:56:26 UTC (rev 2768)
@@ -23,17 +23,24 @@
<div id="doc2" class="yui-t4">
+ <%# TODO: Rails 2: '@content_for_x' has changed to 'content_for?(:x)' in later versions of rails %>
<% if @content_for_header %>
<%= yield :header %>
<% else %>
<div id="hd">
<div id="myexp_header">
<div class="logo">
- <%= link_to image_tag(Conf.site_logo), "/" %>
+ <% if @content_for_logo %>
+ <%= yield :logo %>
+ <% else %>
+ <%= link_to image_tag(Conf.site_logo), "/" %>
+ <% end %>
<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' %>
+ <% if @content_for_site_info_links %>
+ <%= yield :site_info_links %>
+ <% else %>
+ <%= render :partial => 'layouts/site_info_links' %>
+ <% end %>
</div>
</div>
<div id="user_links" class="links">
Added: branches/elico/app/views/layouts/_site_info_links.rhtml (0 => 2768)
--- branches/elico/app/views/layouts/_site_info_links.rhtml (rev 0)
+++ branches/elico/app/views/layouts/_site_info_links.rhtml 2011-10-27 12:56:26 UTC (rev 2768)
@@ -0,0 +1,3 @@
+<%= 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' %>
\ No newline at end of file
Modified: branches/elico/app/views/layouts/_tab_bar.rhtml (2767 => 2768)
--- branches/elico/app/views/layouts/_tab_bar.rhtml 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/app/views/layouts/_tab_bar.rhtml 2011-10-27 12:56:26 UTC (rev 2768)
@@ -1,7 +1,5 @@
-<ul class="tabnav">
+<div 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>
+ <%= link_to(tab['label'], tab['link'], :class => "tab", :id => (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'selected_tabnav' : '') -%>
<% end %>
-</ul>
\ No newline at end of file
+</div>
Modified: branches/elico/app/views/layouts/application.rhtml (2767 => 2768)
--- branches/elico/app/views/layouts/application.rhtml 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/app/views/layouts/application.rhtml 2011-10-27 12:56:26 UTC (rev 2768)
@@ -1,2 +1,2 @@
<% configure_layout %>
-<%= render :partial => @layout["page_template"] %>
+<%= render :partial => @layout["layout"] %>
\ No newline at end of file
Modified: branches/elico/lib/conf.rb (2767 => 2768)
--- branches/elico/lib/conf.rb 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/lib/conf.rb 2011-10-27 12:56:26 UTC (rev 2768)
@@ -166,7 +166,8 @@
end
def self.layouts
- self.fetch_entry('layouts')
+ #TODO: Perhaps implement code that can load different/extra settings files based on current environment
+ self.fetch_entry('layouts').delete_if {|k,v| v["environment"] && (v["environment"] != ENV["RAILS_ENV"])}
end
# This method is required to create an administrator in the test fixtures
Modified: branches/elico/public/stylesheets/elico.css (2767 => 2768)
--- branches/elico/public/stylesheets/elico.css 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/public/stylesheets/elico.css 2011-10-27 12:56:26 UTC (rev 2768)
@@ -4,7 +4,7 @@
background: #cfd5dd;
}
-#myexp_searchbar, #myexp_sidebar, .tabnav li a:hover, .tabnav li#selected_tabnav a, .pagination a {
+#myexp_searchbar, #myexp_sidebar, a.tab:hover, #selected_tabnav, .pagination a {
background: #4d597e;
}
@@ -46,3 +46,14 @@
.links a {
color: white;
}
+
+/* IE7 fixes */
+#doc2 {
+ *overflow: hidden;
+ *height: 0px;
+}
+
+#elico_links_bar #inner {
+ *height: 100%;
+}
+/* end of IE7 fixes */
Modified: branches/elico/public/stylesheets/styles.css (2767 => 2768)
--- branches/elico/public/stylesheets/styles.css 2011-10-26 12:36:52 UTC (rev 2767)
+++ branches/elico/public/stylesheets/styles.css 2011-10-27 12:56:26 UTC (rev 2768)
@@ -296,6 +296,8 @@
}
/* begin css tabs nav */
+
+/* TODO: Remove me?
.tabnav {
text-align: center;
font-weight: bolder;
@@ -342,8 +344,34 @@
background-color: #317eff;
background-image: none;
color: #FFFFFF;
+} */
+
+.tabnav
+{
+ text-align: center;
+ margin: 0;
+ padding: 0;
}
+a.tab {
+ display: inline-block;
+ padding: 4px 12px;
+ margin-left: 3px;
+ border-style: solid;
+ border-color: #BBBBBB;
+ border-width: 1px 1px 0px 1px;
+ text-decoration: none;
+ background: url('/images/tab-bg.png') top repeat-x #EDEDED;
+ color: #333333;
+ font-weight: bolder;
+ font-size: 108%;
+}
+
+a.tab:hover, #selected_tabnav {
+ color: #FFFFFF;
+ background: #317eff;
+}
+
/* end css tabs nav */
/* begin css breadcrumbs */