summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-31 23:47:26 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-31 23:47:26 +0300
commitb53557aca64fbf55f9bbd59849d83daa10b7361f (patch)
treeed4e21bce3323b99cc06325bf5de4f7deed64920 /app
parentda5b0c91dc79136be4315cf61e5520692e19be8a (diff)
downloadgitlab-ce-b53557aca64fbf55f9bbd59849d83daa10b7361f.tar.gz
Remove decorator calls and methods from views. Repalace with helper calls when needed
Diffstat (limited to 'app')
-rw-r--r--app/views/blame/show.html.haml4
-rw-r--r--app/views/commit/_commit_box.html.haml4
-rw-r--r--app/views/commits/_commit.html.haml2
-rw-r--r--app/views/commits/show.html.haml2
-rw-r--r--app/views/events/_commit.html.haml1
-rw-r--r--app/views/repositories/_branch.html.haml3
-rw-r--r--app/views/repositories/_feed.html.haml1
-rw-r--r--app/views/repositories/tags.html.haml3
-rw-r--r--app/views/tree/_tree.html.haml4
-rw-r--r--app/views/tree/_tree_commit_column.html.haml2
-rw-r--r--app/views/wikis/history.html.haml5
-rw-r--r--app/views/wikis/pages.html.haml4
-rw-r--r--app/views/wikis/show.html.haml4
13 files changed, 18 insertions, 21 deletions
diff --git a/app/views/blame/show.html.haml b/app/views/blame/show.html.haml
index b2a45ef5303..b07a514fdf7 100644
--- a/app/views/blame/show.html.haml
+++ b/app/views/blame/show.html.haml
@@ -22,13 +22,13 @@
%table
- current_line = 1
- @blame.each do |commit, lines|
- - commit = CommitDecorator.decorate(Commit.new(commit))
+ - commit = Commit.new(commit)
%tr
%td.blame-commit
%span.commit
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
&nbsp;
- = commit.author_link avatar: true, size: 16
+ = commit_author_link(commit, avatar: true, size: 16)
&nbsp;
= link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
%td.lines.blame-numbers
diff --git a/app/views/commit/_commit_box.html.haml b/app/views/commit/_commit_box.html.haml
index 4c80c13ced1..646791773b2 100644
--- a/app/views/commit/_commit_box.html.haml
+++ b/app/views/commit/_commit_box.html.haml
@@ -24,14 +24,14 @@
.row
.span5
.author
- = @commit.author_link avatar: true, size: 32
+ = commit_author_link(@commit, avatar: true, size: 32)
authored
%time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
#{time_ago_in_words(@commit.authored_date)} ago
- if @commit.different_committer?
.committer
&rarr;
- = @commit.committer_link
+ = commit_committer_link(@commit)
committed
%time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
#{time_ago_in_words(@commit.committed_date)} ago
diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml
index 2f5ff130f03..65d920305b1 100644
--- a/app/views/commits/_commit.html.haml
+++ b/app/views/commits/_commit.html.haml
@@ -4,7 +4,7 @@
%strong= link_to "Browse Code ยป", project_tree_path(@project, commit), class: "right"
%p
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
- = commit.author_link avatar: true, size: 24
+ = commit_author_link(commit, avatar: true, size: 24)
&nbsp;
= link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "row_title"
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index d180b8ec426..586b21dfa5d 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -2,7 +2,7 @@
- if @path.present?
%ul.breadcrumb
- = breadcrumbs
+ = commits_breadcrumbs
%div{id: dom_id(@project)}
#commits-list= render "commits"
diff --git a/app/views/events/_commit.html.haml b/app/views/events/_commit.html.haml
index ea417aa9f30..f2f2d47ef96 100644
--- a/app/views/events/_commit.html.haml
+++ b/app/views/events/_commit.html.haml
@@ -1,4 +1,3 @@
-- commit = CommitDecorator.decorate(commit)
%li.commit
%p
= link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml
index a6faa5fd633..dd91e14b66b 100644
--- a/app/views/repositories/_branch.html.haml
+++ b/app/views/repositories/_branch.html.haml
@@ -1,5 +1,4 @@
-- commit = Commit.new(branch.commit)
-- commit = CommitDecorator.decorate(commit)
+- commit = Commit.new(Gitlab::Git::Commit.new(branch.commit))
%tr
%td
= link_to project_commits_path(@project, branch.name) do
diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml
index eaf15ca77d6..6bb75265ffb 100644
--- a/app/views/repositories/_feed.html.haml
+++ b/app/views/repositories/_feed.html.haml
@@ -1,5 +1,4 @@
- commit = update
-- commit = CommitDecorator.new(commit)
%tr
%td
= link_to project_commits_path(@project, commit.head.name) do
diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml
index d4b8bbe10d4..2d311124992 100644
--- a/app/views/repositories/tags.html.haml
+++ b/app/views/repositories/tags.html.haml
@@ -7,8 +7,7 @@
%th Last commit
%th
- @tags.each do |tag|
- - commit = Commit.new(tag.commit)
- - commit = CommitDecorator.decorate(commit)
+ - commit = Commit.new(Gitlab::Git::Commit.new(tag.commit))
%tr
%td
%strong
diff --git a/app/views/tree/_tree.html.haml b/app/views/tree/_tree.html.haml
index 24a57ae7a29..caab6e45bb4 100644
--- a/app/views/tree/_tree.html.haml
+++ b/app/views/tree/_tree.html.haml
@@ -3,7 +3,7 @@
%i.icon-angle-right
= link_to project_tree_path(@project, @ref) do
= @project.path
- - tree.breadcrumbs(6) do |title, path|
+ - tree_breadcrumbs(tree, 6) do |title, path|
\/
%li
- if path
@@ -27,7 +27,7 @@
%tr.tree-item
%td.tree-item-file-name
= image_tag "file_empty.png", size: '16x16'
- = link_to "..", project_tree_path(@project, tree.up_dir_path)
+ = link_to "..", project_tree_path(@project, up_dir_path(tree))
%td
%td
%td
diff --git a/app/views/tree/_tree_commit_column.html.haml b/app/views/tree/_tree_commit_column.html.haml
index 9d02132b0f4..7ae2582c130 100644
--- a/app/views/tree/_tree_commit_column.html.haml
+++ b/app/views/tree/_tree_commit_column.html.haml
@@ -1,2 +1,2 @@
-%span.tree_author= commit.author_link avatar: true
+%span.tree_author= commit_author_link(commit, avatar: true)
= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link"
diff --git a/app/views/wikis/history.html.haml b/app/views/wikis/history.html.haml
index 599e9cf6793..f4946ed000d 100644
--- a/app/views/wikis/history.html.haml
+++ b/app/views/wikis/history.html.haml
@@ -14,12 +14,13 @@
%th Format
%tbody
- @wiki.versions.each do |version|
- - commit = CommitDecorator.new(version)
+ - commit = version
%tr
%td
= link_to project_wiki_path(@project, @wiki, version_id: commit.id) do
= commit.short_id
- %td= commit.author_link avatar: true, size: 24
+ %td
+ = commit_author_link(commit, avatar: true, size: 24)
%td
= commit.title
%td
diff --git a/app/views/wikis/pages.html.haml b/app/views/wikis/pages.html.haml
index eb65599d087..95d5eef16f5 100644
--- a/app/views/wikis/pages.html.haml
+++ b/app/views/wikis/pages.html.haml
@@ -21,5 +21,5 @@
= wiki_page.created_at.to_s(:short) do
(#{time_ago_in_words(wiki_page.created_at)}
ago)
- - commit = CommitDecorator.decorate(wiki_page.version)
- %td= commit.author_link avatar: true, size: 24
+ %td
+ = commit_author_link(wiki_page.version, avatar: true, size: 24)
diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml
index b660a15ee32..4102182e923 100644
--- a/app/views/wikis/show.html.haml
+++ b/app/views/wikis/show.html.haml
@@ -13,5 +13,5 @@
= preserve do
= render_wiki_content(@wiki)
-- commit = CommitDecorator.new(@wiki.version)
-%p.time Last edited by #{commit.author_link(avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago
+- commit = Commit.new(@wiki.version)
+%p.time Last edited by #{commit_author_link(commit, avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago