Mercurial > hg > soundsoftware-site
changeset 115:3e75f003034a luisf
Bug #60:
+ the "jump to project" input box is now below the search box
+ the project ancestors are displayed in a separate line
author | luisf |
---|---|
date | Wed, 12 Jan 2011 17:06:18 +0000 |
parents | d70a0b926135 |
children | 66c73df314fa |
files | app/helpers/application_helper.rb app/views/layouts/base.rhtml public/stylesheets/application.css public/themes/soundsoftware/stylesheets/application.css |
diffstat | 4 files changed, 48 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/app/helpers/application_helper.rb Fri Dec 17 13:02:30 2010 +0000 +++ b/app/helpers/application_helper.rb Wed Jan 12 17:06:18 2011 +0000 @@ -381,21 +381,28 @@ def page_header_title if @project.nil? || @project.new_record? - h(Setting.app_title) + a = [h(Setting.app_title), ''] + else + pname = [] b = [] ancestors = (@project.root? ? [] : @project.ancestors.visible) if ancestors.any? root = ancestors.shift b << link_to_project(root, {:jump => current_menu_item}, :class => 'root') if ancestors.size > 2 - b << '…' + b << '…' ancestors = ancestors[-2, 2] end b += ancestors.collect {|p| link_to_project(p, {:jump => current_menu_item}, :class => 'ancestor') } + b = b.join(' » ') + b << (' »') end - b << h(@project) - b.join(' » ') + + pname << h(@project) + + a = [pname, b] + end end
--- a/app/views/layouts/base.rhtml Fri Dec 17 13:02:30 2010 +0000 +++ b/app/views/layouts/base.rhtml Wed Jan 12 17:06:18 2011 +0000 @@ -32,17 +32,32 @@ </div> <%= tag('div', {:id => 'header', :class => (display_main_menu?(@project) ? 'header-project' : 'header-general')}, true) %> - <div id="quick-search"> - <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> - <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %> - <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>: - <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %> - <% end %> + + + <div id="project-search-jump"> + <div id="quick-search"> + <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> + <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %> + <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>: + <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %> + <% end %> + </div> + + <div id="project-jump-box"> <%= render_project_jump_box %> + </div> </div> + + <% unless page_header_title[1].empty? %> + <h3 id="project-ancestors-title"><%= page_header_title[1] %></h3> + <% end %> + + <h1 id="project-title" + <% unless page_header_title[1].empty? %> + style="margin-top: 0px; " + <% end %> + ><%= page_header_title[0] %></h1> - <h1><%= page_header_title %></h1> - <% if display_main_menu?(@project) %> <div id="main-menu"> <%= render_main_menu(@project) %>
--- a/public/stylesheets/application.css Fri Dec 17 13:02:30 2010 +0000 +++ b/public/stylesheets/application.css Wed Jan 12 17:06:18 2011 +0000 @@ -26,7 +26,9 @@ #header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;} #header a {color:#f8f8f8;} #header h1 a.ancestor { font-size: 80%; } -#quick-search {float:right;} + +#project-search-jump {float:right; } + #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;} #main-menu ul {margin: 0; padding: 0;}
--- a/public/themes/soundsoftware/stylesheets/application.css Fri Dec 17 13:02:30 2010 +0000 +++ b/public/themes/soundsoftware/stylesheets/application.css Wed Jan 12 17:06:18 2011 +0000 @@ -36,7 +36,7 @@ } body,p,h2,h3,h4,li,table,.wiki h1 { - font-family: DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; */ + font-family: DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; } h2,h3,h4,.wiki h1 { @@ -79,7 +79,17 @@ width: 446px; height: 34px; } + #quick-search { margin-right: 6px; margin-top: 1em; color: #000; } +#project-jump-box { float: right; margin-right: 6px; margin-top: 5px; color: #000; } +#project-ancestors-title { + margin-bottom: 0px; + margin-left: 10px; + margin-top: 6px; + font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif; + font-weight: normal; +} + #main-menu { position: absolute; top: 100px; /* background-color: #be5700; */ left: 0; border-top: 0; width: 100%;/* height: 1.82em; */ padding: 0; margin: 0; border: 0; } #main-menu li { margin: 0; padding: 0; } #main-menu li a { background-color: #fdfbf5; color: #be5700; border-right: 1px solid #a9b680; font-size: 97%; padding: 0em 8px 0.2em 10px; font-weight: normal; }