2016-11-04 10:43:43 -04:00
|
|
|
- ref = local_assigns.fetch(:ref)
|
2015-06-30 09:41:25 -04:00
|
|
|
- if @note_counts
|
|
|
|
- note_count = @note_counts.fetch(commit.id, 0)
|
|
|
|
- else
|
|
|
|
- notes = commit.notes
|
|
|
|
- note_count = notes.user.count
|
2014-02-25 08:54:30 -05:00
|
|
|
|
2017-08-18 11:06:17 -04:00
|
|
|
- cache_key = [project.full_path, commit.id, current_application_settings, note_count, @path.presence, current_controller?(:commits), I18n.locale]
|
2016-11-09 08:16:42 -05:00
|
|
|
- cache_key.push(commit.status(ref)) if commit.status(ref)
|
2015-09-23 06:18:16 -04:00
|
|
|
|
2016-08-31 10:04:51 -04:00
|
|
|
= cache(cache_key, expires_in: 1.day) do
|
2017-07-06 10:30:43 -04:00
|
|
|
%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" }
|
2016-07-08 20:47:05 -04:00
|
|
|
|
2017-02-27 22:31:21 -05:00
|
|
|
.avatar-cell.hidden-xs
|
2016-12-09 09:37:44 -05:00
|
|
|
= author_avatar(commit, size: 36)
|
2014-07-08 10:12:06 -04:00
|
|
|
|
2017-02-27 22:31:21 -05:00
|
|
|
.commit-detail
|
|
|
|
.commit-content
|
2017-08-23 12:53:29 -04:00
|
|
|
= link_to_markdown_field(commit, :title, project_commit_path(project, commit.id), class: "commit-row-message item-title")
|
2017-02-27 22:31:21 -05:00
|
|
|
%span.commit-row-message.visible-xs-inline
|
|
|
|
·
|
|
|
|
= commit.short_id
|
|
|
|
- if commit.status(ref)
|
|
|
|
.visible-xs-inline
|
|
|
|
= render_commit_status(commit, ref: ref)
|
|
|
|
- if commit.description?
|
2017-03-14 01:02:30 -04:00
|
|
|
%button.text-expander.hidden-xs.js-toggle-button{ type: "button" } ...
|
2014-06-10 02:50:27 -04:00
|
|
|
|
2017-02-27 22:31:21 -05:00
|
|
|
- if commit.description?
|
|
|
|
%pre.commit-row-description.js-toggle-content
|
2017-08-23 12:53:29 -04:00
|
|
|
= preserve(markdown_field(commit, :description))
|
|
|
|
|
2017-02-27 22:31:21 -05:00
|
|
|
.commiter
|
2017-06-09 09:08:39 -04:00
|
|
|
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
|
2017-09-11 16:23:51 -04:00
|
|
|
- commit_timeago = time_ago_with_tooltip(commit.committed_date, placement: 'bottom')
|
2017-06-09 09:08:39 -04:00
|
|
|
- commit_text = _('%{commit_author_link} committed %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago }
|
|
|
|
#{ commit_text.html_safe }
|
|
|
|
|
2014-02-25 08:54:30 -05:00
|
|
|
|
2017-07-06 10:30:43 -04:00
|
|
|
.commit-actions.hidden-xs
|
2017-07-25 03:40:23 -04:00
|
|
|
- if request.xhr?
|
|
|
|
= render partial: 'projects/commit/signature', object: commit.signature
|
|
|
|
- else
|
|
|
|
= render partial: 'projects/commit/ajax_signature', locals: { commit: commit }
|
|
|
|
|
2017-08-23 11:09:22 -04:00
|
|
|
- if commit.status(ref)
|
|
|
|
= render_commit_status(commit, ref: ref)
|
|
|
|
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to commit.short_id, project_commit_path(project, commit), class: "commit-sha btn btn-transparent"
|
2017-06-07 16:13:44 -04:00
|
|
|
= clipboard_button(text: commit.id, title: _("Copy commit SHA to clipboard"))
|
2017-02-27 22:31:21 -05:00
|
|
|
= link_to_browse_code(project, commit)
|