From 20721eff1c9a9a8f291d68538f209091b92961b4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 29 Jan 2012 21:58:31 +0200 Subject: [PATCH] Bootstrap: Commits page --- app/assets/stylesheets/top_panel.scss | 1 - app/views/commits/_commits.html.haml | 25 ++++++++++++------------- app/views/commits/index.html.haml | 12 +++++++++--- app/views/layouts/_project_side.html.haml | 2 +- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/assets/stylesheets/top_panel.scss b/app/assets/stylesheets/top_panel.scss index bcbbb104c..b7493b07c 100644 --- a/app/assets/stylesheets/top_panel.scss +++ b/app/assets/stylesheets/top_panel.scss @@ -109,7 +109,6 @@ body header { margin:0 15px; padding:3px; border-radius:3px; - float:left; } diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index 71737d5ae..cdea9acb9 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -2,19 +2,18 @@ %div{ :class => "commits-date ui-box ui-box-small ui-box-big" } .day-commits-table %h5.underlined= day.stamp("28 Aug, 2010") + %br %ul.unstyled - commits.each do |commit| - %li.wll - %a{ :class => "update-item", :href => project_commit_path(@project, :id => commit.id) } - .right.btn - = truncate(commit.id.to_s, :length => 10) - » - = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 32 - %span.update-author - %strong= commit.author_name - – - = time_ago_in_words(commit.committed_date) - ago - %p + %li.entry + = link_to project_commit_path(@project, :id => commit.id) do + %div %strong - = truncate(commit.safe_message, :length => 50) + = truncate commit.id.to_s, :length => 10 + – + = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 + = truncate(commit.safe_message, :length => 50) + + %span.right.cgray + = time_ago_in_words(commit.committed_date) + ago diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 735b77e1d..5f1eb9d42 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -1,8 +1,13 @@ -- if current_user.private_token - = content_for :rss_icon do - .rss-icon +%h3 + Commits + - if current_user.private_token + %span.rss-icon = link_to project_commits_path(@project, :atom, { :private_token => current_user.private_token, :ref => @ref }) do = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" + = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form right" do + = select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select" + = hidden_field_tag :destination, "commits" +%hr - if params[:path] %ul.breadcrumb @@ -24,4 +29,5 @@ :javascript $(function(){ CommitsList.init("#{@ref}", 20); + $('.project-refs-select').chosen(); }); diff --git a/app/views/layouts/_project_side.html.haml b/app/views/layouts/_project_side.html.haml index f29c38cc6..ed7a453a5 100644 --- a/app/views/layouts/_project_side.html.haml +++ b/app/views/layouts/_project_side.html.haml @@ -6,7 +6,7 @@ - if @project.repo_exists? = link_to "Repository", project_repository_path(@project), :class => repository_tab_class - = link_to "Tree", tree_project_ref_path(@project), :class => tree_tab_class + = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do -- 2.11.0