Home tab added, Repository tab removed\n Ability to download branch

This commit is contained in:
Dmitriy Zaporozhets 2012-02-20 08:39:03 +02:00
parent 40ac2ebc21
commit 5f4a7c3e04
22 changed files with 125 additions and 94 deletions

View file

@ -6,12 +6,19 @@
%li{:class => "#{'active' if current_page?(project_commits_path(@project)) }"}
= link_to project_commits_path(@project) do
%span
Commits
%li{:class => "#{'active' if current_page?(compare_project_commits_path(@project)) }"}
= link_to compare_project_commits_path(@project) do
%span
Compare
%li{:class => "#{branches_tab_class}"}
= link_to project_repository_path(@project) do
Branches
%span.number= @project.repo.branches.count
%li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"}
= link_to tags_project_repository_path(@project) do
Tags
%span.number= @project.repo.tags.count

View file

@ -1,4 +1,4 @@
= render "repositories/head"
= render "projects/project_head"
- if can? current_user, :admin_project, @project
.alert-message.block-message

View file

@ -1,5 +1,6 @@
%nav.main_menu
= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path) || current_page?(root_path)}"
= render "layouts/const_menu_links"
-#= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path) || current_page?(root_path)}"
= link_to "Issues", dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
= link_to "Requests", dashboard_merge_requests_path, :class => "#{"current" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
= link_to "Help", help_path, :class => "#{"current" if controller.controller_name == "help"}"

View file

@ -0,0 +1 @@
= link_to "Home", root_path, :class => "home #{"current" if current_page?(projects_path) || current_page?(root_path)}", :title => "Home"

View file

@ -1,11 +1,11 @@
%nav.main_menu
= render "layouts/const_menu_links"
= link_to project_path(@project), :class => "#{project_tab_class}", :title => "Project" do
Project
- if @project.repo_exists?
= link_to "Repository", project_repository_path(@project), :class => repository_tab_class
= link_to "Files", 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 "Commits", project_commits_path(@project), :class => commit_tab_class
= link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
- if @project.issues_enabled

View file

@ -6,6 +6,7 @@
= render "layouts/head_panel", :title => "Admin area"
.container
%nav.main_menu
= render "layouts/const_menu_links"
= link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil
= link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil
= link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil

View file

@ -6,6 +6,7 @@
= render "layouts/head_panel", :title => "Profile"
.container
%nav.main_menu
= render "layouts/const_menu_links"
= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
= link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
= link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil

View file

@ -16,3 +16,16 @@
%li{ :class => " #{'active' if (controller.controller_name == "snippets") }" }
= link_to project_snippets_path(@project), :class => "snippets-tab tab" do
Snippets
-#%li{:class => "#{'active' if current_page?(project_repository_path(@project)) }"}
-#= link_to project_repository_path(@project) do
-#%span
-#Activities
%li{:class => "#{'active' if controller.controller_name == "hooks" }"}
= link_to project_hooks_path(@project) 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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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