diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-20 08:39:03 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-20 08:38:03 +0200 |
commit | 5f4a7c3e04f9511be01234b9f2d7bd0134491b22 (patch) | |
tree | 786729e0ba1bf1f61c88c7ef44853f59179c306b /app/views/repositories | |
parent | 40ac2ebc2129905cc0831f824dc1c6dc824efc90 (diff) | |
download | gitlab-ce-5f4a7c3e04f9511be01234b9f2d7bd0134491b22.tar.gz |
Home tab added, Repository tab removed\n Ability to download branch
Diffstat (limited to 'app/views/repositories')
-rw-r--r-- | app/views/repositories/_branch.html.haml | 20 | ||||
-rw-r--r-- | app/views/repositories/_branches_head.html.haml | 11 | ||||
-rw-r--r-- | app/views/repositories/_feed.html.haml | 6 | ||||
-rw-r--r-- | app/views/repositories/_head.html.haml | 24 | ||||
-rw-r--r-- | app/views/repositories/branches.html.haml | 16 | ||||
-rw-r--r-- | app/views/repositories/show.html.haml | 31 | ||||
-rw-r--r-- | app/views/repositories/tags.html.haml | 14 |
7 files changed, 45 insertions, 77 deletions
diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml new file mode 100644 index 00000000000..7858b0fc59f --- /dev/null +++ b/app/views/repositories/_branch.html.haml @@ -0,0 +1,20 @@ +%tr + %td + = link_to project_commits_path(@project, :ref => branch.name) do + %strong= branch.name + - if branch.name == @project.root_ref + %span.label default + %td + = link_to project_commits_path(@project, branch.commit.id) do + %code= branch.commit.id.to_s[0..10] + + = image_tag gravatar_icon(Commit.new(branch.commit).author_email), :class => "", :width => 16 + = truncate(Commit.new(branch.commit).safe_message, :length => 40) + %td + %span.update-author.right + = time_ago_in_words(branch.commit.committed_date) + ago + %td + - if can? current_user, :download_code, @project + = link_to "Download", archive_project_repository_path(@project, :ref => branch.name), :class => "visible_link download_repo_link" + diff --git a/app/views/repositories/_branches_head.html.haml b/app/views/repositories/_branches_head.html.haml index dd4d6868bcc..9a189498413 100644 --- a/app/views/repositories/_branches_head.html.haml +++ b/app/views/repositories/_branches_head.html.haml @@ -1,9 +1,12 @@ -= render "repositories/head" += render "commits/head" %ul.pills - %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))} - = link_to branches_project_repository_path(@project) do - All + %li{:class => ("active" if current_page?(project_repository_path(@project)))} + = link_to project_repository_path(@project) do + Recent %li{:class => ("active" if current_page?(project_protected_branches_path(@project)))} = link_to project_protected_branches_path(@project) do Protected + %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))} + = link_to branches_project_repository_path(@project) do + All %hr diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml index d66f51e4ba4..9fdba10b926 100644 --- a/app/views/repositories/_feed.html.haml +++ b/app/views/repositories/_feed.html.haml @@ -4,9 +4,13 @@ = link_to project_commits_path(@project, :ref => commit.head.name) do %strong = commit.head.name + - if commit.head.name == @project.root_ref + %span.label default + %td %div - %code= commit.id.to_s[0..10] + = link_to project_commits_path(@project, commit.id) do + %code= commit.id.to_s[0..10] = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 = truncate(commit.safe_message, :length => 40) %td diff --git a/app/views/repositories/_head.html.haml b/app/views/repositories/_head.html.haml index 2d43d008e2a..bc96f306eee 100644 --- a/app/views/repositories/_head.html.haml +++ b/app/views/repositories/_head.html.haml @@ -1,23 +1 @@ -%ul.tabs - %li{:class => "#{'active' if current_page?(project_repository_path(@project)) }"} - = link_to project_repository_path(@project) do - %span - Activities - %li{:class => "#{'active' if current_page?(branches_project_repository_path(@project)) || current_page?(project_protected_branches_path(@project)) }"} - = link_to branches_project_repository_path(@project) do - %span - Branches - %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} - = link_to tags_project_repository_path(@project) do - %span - Tags - %li{:class => "#{'active' if controller.controller_name == "hooks" }"} - = link_to project_hooks_path do - %span - Hooks - %li{:class => "#{'active' if controller.controller_name == "deploy_keys"}"} - - if can? current_user, :admin_project, @project - = link_to project_deploy_keys_path(@project) do - %span - Deploy Keys - += render "projects/project_head" diff --git a/app/views/repositories/branches.html.haml b/app/views/repositories/branches.html.haml index 23e3eac3b35..c56b54d5349 100644 --- a/app/views/repositories/branches.html.haml +++ b/app/views/repositories/branches.html.haml @@ -1,20 +1,6 @@ = render "repositories/branches_head" - unless @branches.empty? %table.zebra-striped.borders - %thead - %tr - %th Name - %th Last commit %tbody - @branches.each do |branch| - %tr - %td - = link_to project_commits_path(@project, :ref => branch.name) do - %strong= branch.name - - if branch.name == @project.root_ref - %span.label default - %td - = link_to project_commits_path(@project, branch.commit.id) do - = truncate branch.commit.id.to_s, :length => 10 - = time_ago_in_words(branch.commit.committed_date) - ago + = render "repositories/branch", :branch => branch diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index c72b866b950..43514551420 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -1,33 +1,6 @@ -= render "head" -%h3 - = @project.name - - if can? current_user, :download_code, @project - = link_to "Download", archive_project_repository_path(@project), :class => "btn small right" - - -%hr -.entry - %p - Last commit was - %small - %code= @activities.first.commit.id.to_s[0..10] - - = time_ago_in_words(@activities.first.commit.committed_date) - ago to - = link_to project_commits_path(@project, :ref => @activities.first.head.name), :class => "visible_link" do - %span.label= @activities.first.head.name -.alert-message.block-message.warning - .input - .input-prepend - %span.add-on git clone - = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" - - - -%h5.cgray - Recently updated branches += render "branches_head" %table.zebra-striped.borders - @activities.each do |update| - = render "repositories/feed", :update => update, :project => @project + = render "repositories/branch", :branch => update.head diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml index 229362bc1ca..16113853438 100644 --- a/app/views/repositories/tags.html.haml +++ b/app/views/repositories/tags.html.haml @@ -1,19 +1,23 @@ -= render "head" += render "commits/head" - unless @tags.empty? %table.zebra-striped.borders - @tags.each do |tag| %tr %td - = tag.name - %code= tag.commit.id.to_s[0..10] + %strong= link_to tag.name, project_commits_path(@project, :ref => tag.name), :class => "" + %td + = link_to project_commits_path(@project, tag.commit.id) do + %code= tag.commit.id.to_s[0..10] + = image_tag gravatar_icon(Commit.new(tag.commit).author_email), :class => "", :width => 16 + = truncate(Commit.new(tag.commit).safe_message, :length => 40) + %td %span.update-author.right = time_ago_in_words(tag.commit.committed_date) ago %td - if can? current_user, :download_code, @project - = link_to "Download", archive_project_repository_path(@project, :ref => tag.name), :class => "btn small" - = link_to "Commits", project_commits_path(@project, :ref => tag.name), :class => "btn small" + = link_to "Download", archive_project_repository_path(@project, :ref => tag.name), :class => "visible_link download_repo_link" - else %h3 No tags |