diff --git a/app/controllers/projects/git/commits_controller.rb b/app/controllers/projects/git/commits_controller.rb
index 119083e08..d9a2eaa18 100644
--- a/app/controllers/projects/git/commits_controller.rb
+++ b/app/controllers/projects/git/commits_controller.rb
@@ -1,4 +1,6 @@
class Projects::Git::CommitsController < Projects::Git::BaseController
+ layout 'bootstrap', only: [:index]
+
def index
if @path.present?
@commits = @project.repo.log(@treeish, @path)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a6ec53d7f..3932e0f83 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -56,6 +56,13 @@ module ApplicationHelper
end
def alert_class(type)
- "alert-#{type.to_s == 'error' ? 'danger' : type}"
+ case type
+ when 'error'
+ 'alert-danger'
+ when 'notice'
+ 'alert-success'
+ else
+ "alert-#{type}"
+ end
end
end
diff --git a/app/views/layouts/bootstrap.html.haml b/app/views/layouts/bootstrap.html.haml
index 16214f509..63f1f7430 100644
--- a/app/views/layouts/bootstrap.html.haml
+++ b/app/views/layouts/bootstrap.html.haml
@@ -6,6 +6,7 @@
= display_meta_tags site: APP_CONFIG['project_name'], reverse: true, separator: '-'
- if user_signed_in?
= auto_discovery_link_tag :atom, atom_activity_feeds_path(format: 'atom', token: current_user.authentication_token), title: t("layout.atom_link_tag_title", nickname: current_user.uname, app_name: APP_CONFIG['project_name'])
+ = stylesheet_link_tag 'new_application'
%body{ 'ng-app' => 'RosaABF', 'ng-controller' => 'RosaABFController',
'ng-init' => "init('#{I18n.locale}', #{!!current_user.try(:sound_notifications)})" }
@@ -26,7 +27,6 @@
%article.container-fluid.offset20
= yield
= render 'layouts/menu/new_bottom'
- = stylesheet_link_tag 'new_application'
= javascript_include_tag 'new_application'
- if I18n.locale == :ru
= javascript_include_tag 'moment/ru.js'
diff --git a/app/views/projects/base/_layout.html.haml b/app/views/projects/base/_layout.html.haml
index 134c6bdef..45d5531ad 100644
--- a/app/views/projects/base/_layout.html.haml
+++ b/app/views/projects/base/_layout.html.haml
@@ -6,24 +6,7 @@
%h3= t 'layout.projects.last_commit'
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
- =# render 'shared/feed_message', presenter: presenter, item_no: 1
-
.panel.panel-default
- .panel-body
- .pull-left.roffset5
- %img{ alt: 'avatar', src: presenter.image }
- .pull-left
- %strong= presenter.header
- = "(#{datetime_moment(presenter.date, tag: :strong)})".html_safe
- .clearfix
- %span= presenter.caption
- - if presenter.expandable? and presenter.content?
- %span.glyphicon.glyphicon-chevron-down{ 'data-toggle' => 'collapse', 'data-target' => '#commit_message' }
- .clearfix
- - if presenter.content?
- #commit_message.collapse
- = preserve do
- = markdown(presenter.content)
-
+ .panel-body= render 'shared/feed_commit', presenter: presenter, item_no: 1
.clearfix
= yield
diff --git a/app/views/projects/git/commits/_commits.html.haml b/app/views/projects/git/commits/_commits.html.haml
index c28dcd0c8..d80491d41 100644
--- a/app/views/projects/git/commits/_commits.html.haml
+++ b/app/views/projects/git/commits/_commits.html.haml
@@ -3,16 +3,14 @@
- counter = 1
- commits.each_pair do |year, by_month|
- - if year != cur_year
- .year= "#{year} #{t("layout.year")}"
-
- by_month.each_pair do |month, by_day|
- by_day.each_pair do |day, commits|
- .date-block
- .date= raw l(commits.first.authored_date, format: :date_block_format)
- .messages
+ .panel.panel-info
+ .panel-heading
+ %h3.panel-title= raw l(commits.first.authored_date, format: :date_block_format)
+ %ul.list-group
- commits.each_with_index do |commit|
- - GitPresenters::CommitAsMessagePresenter.present(commit, project: @project) do |presenter|
- = render 'shared/feed_message', presenter: presenter, item_no: counter
- - counter += 1
- .both
+ %li.list-group-item
+ - GitPresenters::CommitAsMessagePresenter.present(commit, project: @project) do |presenter|
+ = render 'shared/feed_commit', presenter: presenter, item_no: counter
+ - counter += 1
diff --git a/app/views/projects/git/commits/_paginate.html.haml b/app/views/projects/git/commits/_paginate.html.haml
index d37621273..6c5798177 100644
--- a/app/views/projects/git/commits/_paginate.html.haml
+++ b/app/views/projects/git/commits/_paginate.html.haml
@@ -1,10 +1,13 @@
-.pagination.tmargin30
+- prev_text, next_text = t('will_paginate.previous_label'), t('will_paginate.next_label')
+%ul.pager
- if @page == 1
- %span.previous_page.disabled= t('will_paginate.previous_label')
+ %li.disabled
+ %a= prev_text
- else
- %a.previous_page{rel: "prev", href: commits_path(@project, treeish: @treeish, page: (@page - 1))}= t('will_paginate.previous_label')
-
- - if @last_page
- %span.next_page.disabled= t('will_paginate.next_label')
- - else
- %a.next_page{rel: "next", href: commits_path(@project, treeish: @treeish, page: (@page + 1))}= t('will_paginate.next_label')
\ No newline at end of file
+ %li
+ %a{ href: commits_path(@project, treeish: @treeish, page: (@page - 1))}= prev_text
+ %li
+ - if @last_page
+ %a= next_text
+ - else
+ %a{ href: commits_path(@project, treeish: @treeish, page: (@page + 1))}= next_text
diff --git a/app/views/projects/git/commits/index.html.haml b/app/views/projects/git/commits/index.html.haml
index 2bb27b3ff..c8f6896a8 100644
--- a/app/views/projects/git/commits/index.html.haml
+++ b/app/views/projects/git/commits/index.html.haml
@@ -1,6 +1,8 @@
-set_meta_tags title: [title_object(@project), "#{t '.title'} #{t('at') if @branch} #{@branch.try :name}"]
= render 'submenu'
-= render 'repo_block', project: @project
-
-= render partial: 'commits', object: @commits
-= render 'paginate' if @path.blank?
+.container
+ .row
+ = render 'repo_block', project: @project
+ .offset20
+ = render partial: 'commits', object: @commits
+ = render 'paginate' if @path.blank?
diff --git a/app/views/shared/_feed_commit.html.haml b/app/views/shared/_feed_commit.html.haml
new file mode 100644
index 000000000..4320c80ff
--- /dev/null
+++ b/app/views/shared/_feed_commit.html.haml
@@ -0,0 +1,14 @@
+.pull-left.roffset5
+ %img{ alt: 'avatar', src: presenter.image }
+.pull-left
+ %strong= presenter.header
+ = "(#{datetime_moment(presenter.date, tag: :strong)})".html_safe
+ .clearfix
+ %span= presenter.caption
+ - if presenter.expandable? and presenter.content?
+ %span.glyphicon.glyphicon-chevron-down{ 'data-toggle' => 'collapse', 'data-target' => "#commit_message_#{item_no}" }
+.clearfix
+- if presenter.content?
+ .collapse{ id: "commit_message_#{item_no}" }
+ = preserve do
+ = markdown(presenter.content)
diff --git a/config/locales/date.en.yml b/config/locales/date.en.yml
index 65af20135..c6148d19d 100644
--- a/config/locales/date.en.yml
+++ b/config/locales/date.en.yml
@@ -1,4 +1,4 @@
en:
time:
formats:
- date_block_format: "%B
%d"
+ date_block_format: "%B %d, %Y"
diff --git a/config/locales/date.ru.yml b/config/locales/date.ru.yml
index 18871dc06..778eb4de2 100644
--- a/config/locales/date.ru.yml
+++ b/config/locales/date.ru.yml
@@ -1,4 +1,4 @@
ru:
time:
formats:
- date_block_format: "%d
%B"
+ date_block_format: "%d %B, %Y"