Commit b53557aca64fbf55f9bbd59849d83daa10b7361f
1 parent
da5b0c91
Exists in
master
and in
4 other branches
Remove decorator calls and methods from views. Repalace with helper calls when needed
Showing
13 changed files
with
18 additions
and
21 deletions
Show diff stats
app/views/blame/show.html.haml
... | ... | @@ -22,13 +22,13 @@ |
22 | 22 | %table |
23 | 23 | - current_line = 1 |
24 | 24 | - @blame.each do |commit, lines| |
25 | - - commit = CommitDecorator.decorate(Commit.new(commit)) | |
25 | + - commit = Commit.new(commit) | |
26 | 26 | %tr |
27 | 27 | %td.blame-commit |
28 | 28 | %span.commit |
29 | 29 | = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id" |
30 | 30 | |
31 | - = commit.author_link avatar: true, size: 16 | |
31 | + = commit_author_link(commit, avatar: true, size: 16) | |
32 | 32 | |
33 | 33 | = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title" |
34 | 34 | %td.lines.blame-numbers | ... | ... |
app/views/commit/_commit_box.html.haml
... | ... | @@ -24,14 +24,14 @@ |
24 | 24 | .row |
25 | 25 | .span5 |
26 | 26 | .author |
27 | - = @commit.author_link avatar: true, size: 32 | |
27 | + = commit_author_link(@commit, avatar: true, size: 32) | |
28 | 28 | authored |
29 | 29 | %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")} |
30 | 30 | #{time_ago_in_words(@commit.authored_date)} ago |
31 | 31 | - if @commit.different_committer? |
32 | 32 | .committer |
33 | 33 | → |
34 | - = @commit.committer_link | |
34 | + = commit_committer_link(@commit) | |
35 | 35 | committed |
36 | 36 | %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")} |
37 | 37 | #{time_ago_in_words(@commit.committed_date)} ago | ... | ... |
app/views/commits/_commit.html.haml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | %strong= link_to "Browse Code »", project_tree_path(@project, commit), class: "right" |
5 | 5 | %p |
6 | 6 | = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id" |
7 | - = commit.author_link avatar: true, size: 24 | |
7 | + = commit_author_link(commit, avatar: true, size: 24) | |
8 | 8 | |
9 | 9 | = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "row_title" |
10 | 10 | ... | ... |
app/views/commits/show.html.haml
app/views/events/_commit.html.haml
app/views/repositories/_branch.html.haml
app/views/repositories/_feed.html.haml
app/views/repositories/tags.html.haml
app/views/tree/_tree.html.haml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | %i.icon-angle-right |
4 | 4 | = link_to project_tree_path(@project, @ref) do |
5 | 5 | = @project.path |
6 | - - tree.breadcrumbs(6) do |title, path| | |
6 | + - tree_breadcrumbs(tree, 6) do |title, path| | |
7 | 7 | \/ |
8 | 8 | %li |
9 | 9 | - if path |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | %tr.tree-item |
28 | 28 | %td.tree-item-file-name |
29 | 29 | = image_tag "file_empty.png", size: '16x16' |
30 | - = link_to "..", project_tree_path(@project, tree.up_dir_path) | |
30 | + = link_to "..", project_tree_path(@project, up_dir_path(tree)) | |
31 | 31 | %td |
32 | 32 | %td |
33 | 33 | %td | ... | ... |
app/views/tree/_tree_commit_column.html.haml
app/views/wikis/history.html.haml
... | ... | @@ -14,12 +14,13 @@ |
14 | 14 | %th Format |
15 | 15 | %tbody |
16 | 16 | - @wiki.versions.each do |version| |
17 | - - commit = CommitDecorator.new(version) | |
17 | + - commit = version | |
18 | 18 | %tr |
19 | 19 | %td |
20 | 20 | = link_to project_wiki_path(@project, @wiki, version_id: commit.id) do |
21 | 21 | = commit.short_id |
22 | - %td= commit.author_link avatar: true, size: 24 | |
22 | + %td | |
23 | + = commit_author_link(commit, avatar: true, size: 24) | |
23 | 24 | %td |
24 | 25 | = commit.title |
25 | 26 | %td | ... | ... |
app/views/wikis/pages.html.haml
... | ... | @@ -21,5 +21,5 @@ |
21 | 21 | = wiki_page.created_at.to_s(:short) do |
22 | 22 | (#{time_ago_in_words(wiki_page.created_at)} |
23 | 23 | ago) |
24 | - - commit = CommitDecorator.decorate(wiki_page.version) | |
25 | - %td= commit.author_link avatar: true, size: 24 | |
24 | + %td | |
25 | + = commit_author_link(wiki_page.version, avatar: true, size: 24) | ... | ... |
app/views/wikis/show.html.haml
... | ... | @@ -13,5 +13,5 @@ |
13 | 13 | = preserve do |
14 | 14 | = render_wiki_content(@wiki) |
15 | 15 | |
16 | -- commit = CommitDecorator.new(@wiki.version) | |
17 | -%p.time Last edited by #{commit.author_link(avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago | |
16 | +- commit = Commit.new(@wiki.version) | |
17 | +%p.time Last edited by #{commit_author_link(commit, avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago | ... | ... |