#369: updated UI of commits

This commit is contained in:
Vokhmin Alexey V 2015-02-05 01:53:08 +03:00
parent 871bb40fd7
commit 898321d18b
7 changed files with 36 additions and 35 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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