#369: updated UI of commits
This commit is contained in:
parent
871bb40fd7
commit
898321d18b
|
@ -109,6 +109,6 @@ class GitPresenters::CommitAsMessagePresenter < ApplicationPresenter
|
|||
@caption = @caption[0..68] + '...'
|
||||
end
|
||||
# @content = @content.gsub("\n", "<br />").html_safe if @content
|
||||
@content = simple_format(@content, {}, sanitize: true).html_safe if @content
|
||||
# @content = simple_format(@content, {}, sanitize: true).html_safe if @content
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
= render 'submenu'
|
||||
.col-xs-12.col-md-10.col-md-offset-1
|
||||
.row
|
||||
= render 'repo_block', project: @project
|
||||
= render 'about_block', project: @project
|
||||
|
||||
- if @commit.present?
|
||||
%h3= t 'layout.projects.last_commit'
|
||||
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
|
||||
.panel.panel-default
|
||||
.panel-body= render 'shared/feed_commit', presenter: presenter, item_no: 1
|
||||
.clearfix
|
||||
= yield
|
|
@ -0,0 +1,14 @@
|
|||
== render 'submenu'
|
||||
.col-xs-12.col-md-10.col-md-offset-1
|
||||
.row
|
||||
== render 'repo_block', project: @project
|
||||
== render 'about_block', project: @project
|
||||
|
||||
- if @commit.present?
|
||||
h3= t('layout.projects.last_commit')
|
||||
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
|
||||
.panel.panel-default
|
||||
.panel-body
|
||||
== render 'shared/feed_commit', presenter: presenter, item_no: 1
|
||||
.clearfix
|
||||
== yield
|
|
@ -1,13 +0,0 @@
|
|||
- stats = @commit.stats
|
||||
-begin
|
||||
= render_commit_stats(stats)
|
||||
|
||||
.pull-right
|
||||
= link_to "raw diff", commit_path(@project, @commit.id, :diff)
|
||||
\|
|
||||
= link_to "patch", commit_path(@project, @commit.id, :patch)
|
||||
.clearfix
|
||||
|
||||
= render partial: 'commit_diff', collection: @commit.diffs
|
||||
- rescue Grit::Git::GitTimeout
|
||||
%p= t 'layout.git.repositories.commit_diff_too_big'
|
|
@ -0,0 +1,13 @@
|
|||
- stats = @commit.stats
|
||||
- begin
|
||||
= render_commit_stats(stats)
|
||||
|
||||
.pull-right
|
||||
=> link_to 'raw diff', commit_path(@project, @commit.id, :diff)
|
||||
| |
|
||||
=< link_to 'patch', commit_path(@project, @commit.id, :patch)
|
||||
.clearfix
|
||||
|
||||
== render partial: 'commit_diff', collection: @commit.diffs
|
||||
- rescue Grit::Git::GitTimeout
|
||||
p= t('layout.git.repositories.commit_diff_too_big')
|
|
@ -1,9 +1,7 @@
|
|||
-set_meta_tags title: [title_object(@project), shortest_hash_id(@commit.id), @commit.message]
|
||||
== render 'submenu'
|
||||
== render 'about_block', project: @project
|
||||
|
||||
.col-xs-12.col-md-10.col-md-offset-1
|
||||
h3= t("layout.projects.last_commit")
|
||||
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
|
||||
== render partial: 'shared/feed_message', locals: {presenter: presenter, item_no: 1}
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
.pull-left.roffset5
|
||||
img alt = 'avatar' src = presenter.image
|
||||
img alt='avatar' src=presenter.image
|
||||
.pull-left
|
||||
strong= presenter.header
|
||||
=< datetime_moment(presenter.date, tag: :strong)
|
||||
.clearfix
|
||||
span= presenter.caption
|
||||
span=> presenter.caption
|
||||
- if presenter.expandable? && presenter.content?
|
||||
span.glyphicon.glyphicon-chevron-down.pointer[ data-toggle = 'collapse'
|
||||
data-target = "#commit_message_#{item_no}" ]
|
||||
span.glyphicon.glyphicon-chevron-down.pointer[
|
||||
data-toggle = 'collapse'
|
||||
data-target = "#commit_message_#{item_no}" ]
|
||||
.clearfix
|
||||
- if presenter.content?
|
||||
.collapse id = "commit_message_#{item_no}"
|
||||
pre== markdown(presenter.content)
|
||||
.collapse id="commit_message_#{item_no}"
|
||||
/ pre== markdown(presenter.content)
|
||||
.well.well-sm== markdown(presenter.content)
|
||||
|
|
Loading…
Reference in New Issue