From b851a3a68b31ff36b6063463921faa4611880518 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Thu, 20 Jun 2019 22:01:07 +0000 Subject: [PATCH 2/3] Connect journal boxes --- app/views/issues/tabs/_changesets.html.erb | 48 +++++++++++----------- app/views/issues/tabs/_history.html.erb | 58 ++++++++++++++------------- app/views/issues/tabs/_time_entries.html.erb | 60 ++++++++++++++-------------- public/stylesheets/application.css | 12 ++++++ 4 files changed, 98 insertions(+), 80 deletions(-) diff --git a/app/views/issues/tabs/_changesets.html.erb b/app/views/issues/tabs/_changesets.html.erb index 5801b15..8a873f1 100644 --- a/app/views/issues/tabs/_changesets.html.erb +++ b/app/views/issues/tabs/_changesets.html.erb @@ -1,26 +1,28 @@ -<% @changesets.each do |changeset| %> -
-
-

- <%= avatar(changeset.user, :size => "24") %> - <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> -

-

<%= link_to_revision(changeset, changeset.repository, - :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> - <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> - (<%= link_to(l(:label_diff), - :controller => 'repositories', - :action => 'diff', - :id => changeset.project, - :repository_id => changeset.repository.identifier_param, - :path => "", - :rev => changeset.identifier) %>) - <% end %>

+
+ <% @changesets.each do |changeset| %> +
+
+

+ <%= avatar(changeset.user, :size => "24") %> + <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> +

+

<%= link_to_revision(changeset, changeset.repository, + :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> + <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> + (<%= link_to(l(:label_diff), + :controller => 'repositories', + :action => 'diff', + :id => changeset.project, + :repository_id => changeset.repository.identifier_param, + :path => "", + :rev => changeset.identifier) %>) + <% end %>

-
- <%= format_changeset_comments changeset %> +
+ <%= format_changeset_comments changeset %> +
-
- <%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %> -<% end %> + <%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %> + <% end %> +
diff --git a/app/views/issues/tabs/_history.html.erb b/app/views/issues/tabs/_history.html.erb index 6571bea..ede671a 100644 --- a/app/views/issues/tabs/_history.html.erb +++ b/app/views/issues/tabs/_history.html.erb @@ -4,37 +4,39 @@ %> <% reply_links = issue.notes_addable? -%> -<% for journal in journals %> -
-
-
- <%= render_journal_actions(issue, journal, :reply_links => reply_links) %> - #<%= journal.indice %> -
-

- <%= avatar(journal.user) %> - <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> - <%= render_private_notes_indicator(journal) %> -

+
+ <% for journal in journals %> +
+
+
+ <%= render_journal_actions(issue, journal, :reply_links => reply_links) %> + #<%= journal.indice %> +
+

+ <%= avatar(journal.user) %> + <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> + <%= render_private_notes_indicator(journal) %> +

- <% if journal.details.any? %> -
    - <% details_to_strings(journal.visible_details).each do |string| %> -
  • <%= string %>
  • - <% end %> -
- <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> -
- <% thumbnail_attachments.each do |attachment| %> -
<%= thumbnail_tag(attachment) %>
+ <% if journal.details.any? %> +
    + <% details_to_strings(journal.visible_details).each do |string| %> +
  • <%= string %>
  • <% end %> +
+ <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> +
+ <% thumbnail_attachments.each do |attachment| %> +
<%= thumbnail_tag(attachment) %>
+ <% end %> +
+ <% end %> + <% end %> + <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
- <% end %> - <% end %> - <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
-
- <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> -<% end %> + <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> + <% end %> +
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %> diff --git a/app/views/issues/tabs/_time_entries.html.erb b/app/views/issues/tabs/_time_entries.html.erb index 9e485bf..7faa208 100644 --- a/app/views/issues/tabs/_time_entries.html.erb +++ b/app/views/issues/tabs/_time_entries.html.erb @@ -1,30 +1,32 @@ -<% for time_entry in time_entries%> -
-
- <% if time_entry.editable_by?(User.current) -%> -
- <%= link_to l(:button_edit), edit_time_entry_path(time_entry), - :title => l(:button_edit), - :class => 'icon-only icon-edit' %> - <%= link_to l(:button_delete), time_entry_path(time_entry), - :data => {:confirm => l(:text_are_you_sure)}, - :method => :delete, - :title => l(:button_delete), - :class => 'icon-only icon-del' %> -
- <% end -%> -

- <%= avatar(time_entry.user, :size => "24") %> - <%= authoring time_entry.created_on, time_entry.user, :label => :label_added_time_by %> -

-
    -
  • - <%= l(:label_time_entry_plural) %>: - <%= l_hours_short time_entry.hours %> -
  • -
-

<%= time_entry.comments %>

+
+ <% for time_entry in time_entries%> +
+
+ <% if time_entry.editable_by?(User.current) -%> +
+ <%= link_to l(:button_edit), edit_time_entry_path(time_entry), + :title => l(:button_edit), + :class => 'icon-only icon-edit' %> + <%= link_to l(:button_delete), time_entry_path(time_entry), + :data => {:confirm => l(:text_are_you_sure)}, + :method => :delete, + :title => l(:button_delete), + :class => 'icon-only icon-del' %> +
+ <% end -%> +

+ <%= avatar(time_entry.user, :size => "24") %> + <%= authoring time_entry.created_on, time_entry.user, :label => :label_added_time_by %> +

+
    +
  • + <%= l(:label_time_entry_plural) %>: + <%= l_hours_short time_entry.hours %> +
  • +
+

<%= time_entry.comments %>

+
-
- <%= call_hook(:view_issues_history_time_entry_bottom, { :time_entry => time_entry }) %> -<% end %> + <%= call_hook(:view_issues_history_time_entry_bottom, { :time_entry => time_entry }) %> + <% end %> +
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 97b613f..b370309 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -540,6 +540,18 @@ div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; } div#issue-changesets p { margin-top: 0; margin-bottom: 1em;} .changeset-comments {margin-bottom:1em;} +#history div.entries {position: relative;} +#history div.entries:before { + content: ''; + border-left: 2px solid #d7d7d7; + position: absolute; + top: 0; + bottom: 0; + left: 17px; +} + +div.journal {padding: 15px 6px; border: 1px solid #d7d7d7; border-radius: 3px; margin: 10px 0; position:relative; background-color: #fff;} + div.journal {padding: 15px 6px; border: 1px solid #d7d7d7; border-radius: 3px; margin: 10px 0;} div.journal .contextual {margin-top: 0;} div.journal div.wiki > :last-child {margin-bottom: 0;} -- 2.1.4