From 86a7864dc78ed9168df889a5994ee7ef80a29476 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 25 Sep 2012 23:33:42 -0400 Subject: [PATCH] Fix various links --- app/views/blame/show.html.haml | 2 +- app/views/events/_event_last_push.html.haml | 2 +- app/views/events/_event_push.html.haml | 2 +- app/views/layouts/_head.html.haml | 2 +- app/views/protected_branches/index.html.haml | 2 +- app/views/repositories/_branch.html.haml | 2 +- app/views/repositories/_feed.html.haml | 2 +- app/views/repositories/tags.html.haml | 2 +- app/views/tree/_tree_file.html.haml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/blame/show.html.haml b/app/views/blame/show.html.haml index 12b4e668..8f82b00f 100644 --- a/app/views/blame/show.html.haml +++ b/app/views/blame/show.html.haml @@ -19,7 +19,7 @@ %small blame %span.options = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank" - = link_to "history", project_commits_path(@project, path: params[:path], ref: @ref), class: "btn very_small" + = link_to "history", project_commits_path(@project, @id), class: "btn very_small" = link_to "source", project_tree_path(@project, @id), class: "btn very_small" .file_content.blame %table diff --git a/app/views/events/_event_last_push.html.haml b/app/views/events/_event_last_push.html.haml index 81b9994c..d70be70c 100644 --- a/app/views/events/_event_last_push.html.haml +++ b/app/views/events/_event_last_push.html.haml @@ -4,7 +4,7 @@ = image_tag gravatar_icon(event.author_email), class: "avatar" %span You pushed to = event.ref_type - = link_to project_commits_path(event.project, ref: event.ref_name) do + = link_to project_commits_path(event.project, event.ref_name) do %strong= truncate(event.ref_name, length: 28) at %strong= link_to event.project.name, event.project diff --git a/app/views/events/_event_push.html.haml b/app/views/events/_event_push.html.haml index 19ac9263..9b7f10d9 100644 --- a/app/views/events/_event_push.html.haml +++ b/app/views/events/_event_push.html.haml @@ -5,7 +5,7 @@ .event-title %strong.author_name #{event.author_name} %span.event_label.pushed #{event.push_action_name} #{event.ref_type} - = link_to project_commits_path(event.project, ref: event.ref_name) do + = link_to project_commits_path(event.project, event.ref_name) do %strong= event.ref_name at %strong= link_to event.project.name, event.project diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index c130c565..25fe9d80 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -10,7 +10,7 @@ - if controller_name == 'projects' && action_name == 'index' = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" - if @project && !@project.new_record? - - if current_controller?(:tree, :commit, :commits) + - if current_controller?(:tree, :commits) = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") - if current_controller?(:issues) = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index 43884de1..50a81712 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -34,7 +34,7 @@ - @branches.each do |branch| %tr %td - = link_to project_commits_path(@project, ref: branch.name) do + = link_to project_commits_path(@project, branch.name) do %strong= branch.name - if branch.name == @project.root_ref %span.label default diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml index 80028a82..3c1fe47c 100644 --- a/app/views/repositories/_branch.html.haml +++ b/app/views/repositories/_branch.html.haml @@ -2,7 +2,7 @@ - commit = CommitDecorator.decorate(commit) %tr %td - = link_to project_commits_path(@project, ref: branch.name) do + = link_to project_commits_path(@project, branch.name) do %strong= truncate(branch.name, length: 60) - if branch.name == @project.root_ref %span.label default diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml index 0c13551d..496328ba 100644 --- a/app/views/repositories/_feed.html.haml +++ b/app/views/repositories/_feed.html.haml @@ -2,7 +2,7 @@ - commit = CommitDecorator.new(commit) %tr %td - = link_to project_commits_path(@project, ref: commit.head.name) do + = link_to project_commits_path(@project, commit.head.name) do %strong = commit.head.name - if commit.head.name == @project.root_ref diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml index a4114586..38cc3aca 100644 --- a/app/views/repositories/tags.html.haml +++ b/app/views/repositories/tags.html.haml @@ -12,7 +12,7 @@ - commit = CommitDecorator.decorate(commit) %tr %td - %strong= link_to tag.name, project_commits_path(@project, ref: tag.name), class: "" + %strong= link_to tag.name, project_commits_path(@project, tag.name), class: "" %td = link_to project_commit_path(@project, commit.id) do %code= commit.short_id diff --git a/app/views/tree/_tree_file.html.haml b/app/views/tree/_tree_file.html.haml index b4c4566b..93f7be28 100644 --- a/app/views/tree/_tree_file.html.haml +++ b/app/views/tree/_tree_file.html.haml @@ -6,7 +6,7 @@ %small #{file.mode} %span.options = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank" - = link_to "history", project_commits_path(@project, path: @path, ref: @ref), class: "btn very_small" + = link_to "history", project_commits_path(@project, @id), class: "btn very_small" = link_to "blame", project_blame_path(@project, @id), class: "btn very_small" - if file.text? - if gitlab_markdown?(name)