lib/wally/views/layout.haml in wally-0.0.33 vs lib/wally/views/layout.haml in wally-0.0.34

- old
+ new

@@ -2,41 +2,52 @@ %html %head %title Wally %link{:rel => 'stylesheet', :type => 'text/css', :href => '/bootstrap.min.css'} %link{:rel => 'stylesheet', :type => 'text/css', :href => '/skin.css'} + %script{:type => "text/javascript", :src => "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"} + %script{:type => "text/javascript", :src => "/scripts/projects.js"} %meta{:'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'} %meta{:name => 'viewport', :content => 'width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;'} %body %div.container-fluid %div.logo %h1 - %a{:href => "/"} Wally + %a{:href => "/#{current_project ? "projects/" + current_project.name : nil}"} Wally + + %div.project-list + %select#projects{:name => "projects"} + - Wally::Project.all.each do |project| + %option{:value => project.name} + = project.name + %div.search-bar - %form{:method => "GET", :action => "/search", :id => "search"} + %form{:method => "GET", :action => "/projects/#{current_project.name}/search", :id => "search"} %input{:type => "text", :id => "q", :name => "q", :placeholder => 'text, @tags etc.', :value => @q } %input.btn{:type => "submit", :id => "search", :value => "Search"} - %div.container-fluid - %div.sidebar - %ul - %li - %a{:href => "/progress"} - Progress - %h2 - = "Features (#{Wally::Feature.all.count})" - %ul - - Wally::Feature.sort(:name).each do |feature| - = haml :feature_link, {:locals => {:feature => feature}, :layout => false} - - if tag_count.any? + %div.container-fluid + %div.sidebar + %ul + %li + %a{:href => "/projects/#{current_project.name}/progress"} + Progress %h2 + = "Features (#{current_project.features.count})" + %ul + - current_project.features.sort{|a,b| a.name <=> b.name}.each do |feature| + = haml :feature_link, {:locals => {:feature => feature}, :layout => false} + + %h2 = "Tags (#{tag_count.values.sum})" %ul - tag_count.each do |tag, count| %li - %a{:href => "/search?q=#{tag}"} + %a{:href => "/projects/#{current_project.name}/search?q=#{tag}"} = "#{tag} (#{count})" - %div.content - - if excessive_wip_tags - %div.alert-message.error - %p - = "You have #{tag_count["@wip"]} @wip tags :(" - = yield + + %div.content + - if excessive_wip_tags + %div.alert-message.error + %p + = "You have #{tag_count["@wip"]} @wip tags :(" + = yield +