diff --git a/README.md b/README.md index e4eaca0cd8..49ef9b007d 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ This plugin adds functions to support project meetings to [OpenProject](https://www.openproject.org). Meetings can be scheduled selecting invitees from the same project to take part in the meeting. An agenda can be created and sent to the invitees. -After the meeting, attendants can be selected and minutes can be +After the meeting, attendees can be selected and minutes can be created based on the agenda. Finally, the minutes can be sent to -all attendants and invitees. +all attendees and invitees. A more detailed feature tour can be found [here](https://www.openproject.org/projects/openproject/wiki/Meetings). diff --git a/app/controllers/meeting_contents_controller.rb b/app/controllers/meeting_contents_controller.rb index 968d7250b8..ec79cfc9af 100644 --- a/app/controllers/meeting_contents_controller.rb +++ b/app/controllers/meeting_contents_controller.rb @@ -88,7 +88,6 @@ class MeetingContentsController < ApplicationController recipients.each do |recipient| MeetingMailer.content_for_review(@content, @content_type, recipient).deliver end - flash[:notice] = l(:notice_successful_notification) end redirect_back_or_default controller: '/meetings', action: 'show', id: @meeting end diff --git a/app/views/meeting_contents/_form.html.erb b/app/views/meeting_contents/_form.html.erb index 077614b654..d4b3818a7f 100644 --- a/app/views/meeting_contents/_form.html.erb +++ b/app/views/meeting_contents/_form.html.erb @@ -26,7 +26,7 @@ See doc/COPYRIGHT.md for more details. :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json) %>

<%= f.hidden_field :lock_version %>

<%= f.text_field :comment, :size => 120 %>

-

<%= submit_tag l(:button_save), class: 'button -highlight' %> +

<%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-yes' %> <% path = send("preview_#{content_type}_path", content.meeting) %> <%= preview_link path, "#{content_type}_form", { class: 'button preview' } %> <%= link_to l(:button_cancel), "#", diff --git a/app/views/meeting_contents/diff.html.erb b/app/views/meeting_contents/diff.html.erb index d8e2a241d0..0ba195aa4a 100644 --- a/app/views/meeting_contents/diff.html.erb +++ b/app/views/meeting_contents/diff.html.erb @@ -19,15 +19,16 @@ See doc/COPYRIGHT.md for more details. ++#%> -<% content_for :action_menu_specific do %> - <%= link_to_if_authorized(l(:label_history), {:controller => '/' + @content_type.pluralize, :action => 'history', :meeting_id => @meeting}, :class => 'icon icon-wiki') %> -<% end %> - <% html_title "#{l(:label_meeting_diff)}: #{@meeting.title}" %> - -

<%= l(:"label_#{@content_type}") %>: <%= link_to @meeting, @meeting %>

- -<%= render :partial => 'layouts/action_menu_specific' %> +<%= toolbar title: "#{l(:"label_#{@content_type}")}: #{link_to @meeting, @meeting}" do %> + <% if authorize_for(@content_type.pluralize, :history) %> +
  • + <%= link_to({controller: "/#{@content_type.pluralize}", action: 'history', meeting_id: @meeting }, class: 'button') do %> + <%= l(:label_history) %> + <% end %> +
  • + <% end %> +<% end %>

    <%= l(:label_version) %> <%= link_to @diff.content_from.version, send(:"#{@content_type}_version_path", @meeting, @diff.content_from.version) %> diff --git a/app/views/meeting_contents/history.html.erb b/app/views/meeting_contents/history.html.erb index 759abbb789..365c9a4a46 100644 --- a/app/views/meeting_contents/history.html.erb +++ b/app/views/meeting_contents/history.html.erb @@ -21,7 +21,7 @@ See doc/COPYRIGHT.md for more details. <% html_title "#{l(:label_history)}: #{@meeting.title}" %> -

    <%= l(:"label_#{@content_type}") %>: <%= link_to @meeting, @meeting %>

    +<%= toolbar title: "#{l(:"label_#{@content_type}")}: #{link_to @meeting, @meeting}" %>

    <%= l(:label_history) %>

    @@ -53,7 +53,7 @@ See doc/COPYRIGHT.md for more details. <% end %> -<%= submit_tag l(:label_view_diff), class: 'button -small -highlight' if show_diff %> +<%= styled_button_tag l(:label_view_diff), class: '-small -highlight' if show_diff %> <%= pagination_links_full @content_versions %> <% end %> diff --git a/app/views/meetings/edit.html.erb b/app/views/meetings/edit.html.erb index 5c9dd5a6e2..c9c1d9b467 100644 --- a/app/views/meetings/edit.html.erb +++ b/app/views/meetings/edit.html.erb @@ -21,10 +21,10 @@ See doc/COPYRIGHT.md for more details. <% html_title "#{l(:label_meeting_edit)}: #{@meeting.title}" %> -

    <%= l(:label_meeting) %> #<%= @meeting.id %>

    +<%= toolbar title: "#{l(:label_meeting)} ##{@meeting.id}" %> <%= labelled_tabular_form_for @meeting, :url => {:controller => '/meetings', :action => 'update'}, :html => {:id => 'meeting-form', :method => :put} do |f| -%> <%= render :partial => 'form', :locals => {:f => f} %> -<%= submit_tag l(:button_save), class: 'button -highlight' %> +<%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-yes' %> <%= link_to l(:button_cancel), { :action => 'show', :id => @meeting }, class: 'button' %> <% end if @project %> diff --git a/app/views/meetings/index.html.erb b/app/views/meetings/index.html.erb index 8352d1c5cf..384a61c59b 100644 --- a/app/views/meetings/index.html.erb +++ b/app/views/meetings/index.html.erb @@ -21,8 +21,7 @@ See doc/COPYRIGHT.md for more details. <% html_title l(:label_meeting_plural) %> -

    <%= l(:label_meeting_plural)%>

    - +<%= toolbar title: l(:label_meeting_plural) %> <% if @meetings_by_start_year_month_date.empty? -%>

    <%= l(:label_no_data) %>

    <% else -%> diff --git a/app/views/meetings/new.html.erb b/app/views/meetings/new.html.erb index 781ece0c8b..aa1320d891 100644 --- a/app/views/meetings/new.html.erb +++ b/app/views/meetings/new.html.erb @@ -20,11 +20,10 @@ See doc/COPYRIGHT.md for more details. ++#%> <% html_title l(:label_meeting_new) %> - -

    <%= l(:label_meeting_new) %>

    +<%= toolbar title: l(:label_meeting_new) %> <%= labelled_tabular_form_for @meeting, :url => {:controller => '/meetings', :action => 'create', :project_id => @project}, :html => {:id => 'meeting-form'} do |f| -%> <%= render :partial => 'form', :locals => {:f => f} %> - <%= submit_tag l(:button_create), class: 'button -highlight' %> + <%= styled_button_tag l(:button_create), class: '-highlight' %> <%= link_to l(:button_cancel), { :action => 'index', :project_id => @project }, class: 'button' %> <% end if @project %> diff --git a/app/views/meetings/show.html.erb b/app/views/meetings/show.html.erb index 27d9c71974..d4f34c3b95 100644 --- a/app/views/meetings/show.html.erb +++ b/app/views/meetings/show.html.erb @@ -19,19 +19,40 @@ See doc/COPYRIGHT.md for more details. ++#%> -<% content_for :action_menu_specific do %> - <%= watcher_link @meeting, User.current %> - <%= link_to_if_authorized(l(:button_edit), {:controller => '/meetings', :action => 'edit', :id => @meeting}, :class => 'icon icon-edit', :accesskey => accesskey(:edit))%> - <%= link_to_if_authorized(l(:button_copy), {:controller => '/meetings', :action => 'copy', :id => @meeting}, :class => 'icon icon-copy')%> - <%= link_to_if_authorized(l(:button_delete), {:controller => '/meetings', :action => 'destroy', :id => @meeting}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-delete')%> -<% end %> - <% html_title "#{l(:label_meeting)}: #{@meeting.title}" %> - -
    - <%= render :partial => 'layouts/action_menu_specific' %> -

    <%= l(:label_meeting) %>: <%= link_to @meeting %>

    -
    +<%= toolbar title: "#{l(:label_meeting)}: #{link_to @meeting}" do %> + <% unless User.current.anonymous? %> +
  • +
    + <%= watcher_link @meeting, User.current %> +
    +
  • + <% end %> + <% if authorize_for(:meetings, :edit) %> +
  • + <%= link_to({:controller => '/meetings', :action => 'edit', :id => @meeting}, class: 'button',:accesskey => accesskey(:edit)) do%> + <%= l(:button_edit) %> + <% end %> +
  • + <% end %> + <% if authorize_for(:meetings, :copy) %> +
  • + <%= link_to({:controller => '/meetings', :action => 'copy', :id => @meeting}, class: 'button') do %> + <%= l(:button_copy) %> + <% end %> +
  • + <% end %> + <% if authorize_for(:meetings, :destroy) %> +
  • + <%= link_to({controller: '/meetings', action: 'destroy', id: @meeting}, + class: 'button', + method: :delete, + confirm: l(:text_are_you_sure)) do %> + <%= l(:button_delete) %> + <% end %> +
  • + <% end %> +<% end %>
    diff --git a/config/locales/de.yml b/config/locales/de.yml index d386ca315c..c8656f2489 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -36,6 +36,8 @@ de: description_attended: "teilgenommen" description_invite: "eingeladen" + error_notification_with_errors: "Benachrichtigungversenden fehlgeschlagen. Folgende Empfänger konnten nicht benachrichtigt werden: " + events: meeting: Besprechung bearbeitet meeting_agenda: Agenda bearbeitet diff --git a/config/locales/en.yml b/config/locales/en.yml index 9bec3d7452..da68ad38bc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -26,7 +26,7 @@ en: location: "Location" duration: "Duration" participants: "Participants" - participants_attended: "Attendants" + participants_attended: "Attendees" participants_invited: "Invitees" start_time: "Time" models: @@ -44,6 +44,8 @@ en: meeting_minutes: Meeting minutes edited meeting_minutes_created: Meeting minutes created + error_notification_with_errors: "Failed to send notification. The following recipients could not be notified: " + label_meeting_hour: "Time (hour)" label_meeting_minute: "Time (minute)" diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md deleted file mode 100644 index eabdaf457f..0000000000 --- a/doc/CHANGELOG.md +++ /dev/null @@ -1,120 +0,0 @@ - - -# Changelog - -## 3.0.8 - -* new version scheme -* `#1565` Fix: Not possible to withdraw invitation of inactive users - -## 3.0.10 - -* `#5061` Add label for meeting time selection - -## 3.0.9 - -* `#5357` Adapt released plugins to base on plugins functionality -* `#4040` Fix: Referencing work packages with ### in news, forums and meetings does not work -* Fix: Add edit accesskey for wiki - -## 3.0.8 - -* `#4024` Subpages have no unique page titles -* `#4797` Fix: [Subdirectory] Broken Links - -## 3.0.7 - -* `#2259` [Accessibility] linearisation of issue show form (2) - -## 3.0.6 - -* Adaptations for new icon font -* `#2250` [Accessibility] activity icon labels -* `#2759` Fix: [Performance] Activity View very slow -* `#3119` [Migration] Meetings do not migrate planning element references -* `#3329` Refactor Duplicated Code Journals -* added icon for new project menu - -## 3.0.5 - -* fixed cukes - -## 3.0.4 - -* `#2463` Squashed old migrations - -## 3.0.3 - -* `#1790` Adapt Meeting Plugin to the acts_as_journalized changes - -## 3.0.2 - -* `#1602` Copyright notice updates and wiring to specific Core versions because of coming update to acts_as_journalized - -## 3.0.1 - -* `#1673` Fixed missing translation in diff view - -## 3.0.0 - -* `#1554` Execute release - -## 3.0.0.rc2 - -* `#1529` First public release -* `#1551` Fixed bug: Not possible to withdraw invitation - -## 2013-07-04 Christian Ratz - - * fix time zones bug - -## 2013-06-27 Christian Ratz - - * new pagination - * fix time zones bug - -## 2013-06-21 Christian Ratz - - * Use final plugin name schema - -## 2013-06-14 Christian Ratz - - * added dependency to OpenProject core >= 3.0.0beta1 - -## 2013024 Christian Ratz - - * RC1 of the Rails 3 version - * This version is no longer compatible with the Rails 2 core - -## 2013-03-22 Jens Ulferts - - * fixes routes - * removes unnecessary code - * shows only the users as possible participants who have the required - permissions - * adds missing html_safe - * fixes mailer i18n issue - -## 2013-03-18 Hagen Schink - - * Swtiched to version 0.2.5 - * Rails 3.2-ified plug-in diff --git a/features/meetings_copy.feature b/features/meetings_copy.feature index a22739fc23..9cdab1adac 100644 --- a/features/meetings_copy.feature +++ b/features/meetings_copy.feature @@ -54,7 +54,7 @@ Feature: Copy meetings When I am already logged in as "alice" And I go to the Meetings page for the project called "dingens" And I click on "Alices Meeting" - Then I should see "Copy" within ".top-page > .action_menu_specific" + Then I should see "Copy" within "#toolbar" Scenario: Navigate to a meeting copy page Given the role "user" may have the following rights: diff --git a/features/meetings_delete.feature b/features/meetings_delete.feature index 80ab2bee8d..f62d270464 100644 --- a/features/meetings_delete.feature +++ b/features/meetings_delete.feature @@ -44,7 +44,6 @@ Feature: Delete meetings | duration | 2:30 | | start_time | 2011-02-10 11:00:00 | - @javascript Scenario: Navigate to an other-created meeting with no permission to delete meetings Given the role "user" may have the following rights: | view_meetings | @@ -53,7 +52,6 @@ Feature: Delete meetings And I click on "Bobs Meeting" Then I should not see "Delete" - @javascript Scenario: Navigate to a self-created meeting with permission to delete meetings Given the role "user" may have the following rights: | view_meetings | @@ -63,7 +61,6 @@ Feature: Delete meetings And I click on "Alices Meeting" Then I should see "Delete" - @javascript Scenario: Navigate to an other-created meeting with permission to delete meetings Given the role "user" may have the following rights: | view_meetings | @@ -73,17 +70,15 @@ Feature: Delete meetings And I click on "Bobs Meeting" Then I should see "Delete" - # TODO: kann nicht getestet werden bis die js confirm Geschichte geklärt ist - #@javascript - #Scenario: Delete an other-created meeting with permission to delete meetings - # Given the role "user" may have the following rights: - # | view_meetings | - # | delete_meetings | - # When I am already logged in as "alice" - # And I go to the Meetings page for the project called "dingens" - # And I click on "Bobs Meeting" - # # TODO Wie kriegt man das hin? - # # Momentan bleibt das bei mir beim javascript "confirm" Dialog hängen - # And I click on "Delete" - # Then I should see "Meetings" - # But I should not see "Bobs Meeting" + @javascript + Scenario: Delete a meeting with permission to delete meetings + Given the role "user" may have the following rights: + | view_meetings | + | delete_meetings | + When I am already logged in as "alice" + And I go to the Meetings page for the project called "dingens" + And I click on "Bobs Meeting" + And I click on "Delete" + And I confirm the JS confirm dialog + Then I should see "Meetings" + But I should not see "Bobs Meeting" diff --git a/openproject-meeting.gemspec b/openproject-meeting.gemspec index 0a064b4308..0d74f2a564 100644 --- a/openproject-meeting.gemspec +++ b/openproject-meeting.gemspec @@ -14,8 +14,8 @@ Gem::Specification.new do |s| s.summary = 'OpenProject Meeting' s.description = "This plugin adds functions to support project meetings to OpenProject. Meetings can be scheduled selecting invitees from the same project to take part in the meeting. An agenda - can be created and sent to the invitees. After the meeting, attendants can be selected and - minutes can be created based on the agenda. Finally, the minutes can be sent to all attendants + can be created and sent to the invitees. After the meeting, attendees can be selected and + minutes can be created based on the agenda. Finally, the minutes can be sent to all attendees and invitees." s.license = 'GPLv3' diff --git a/spec/controllers/meeting_contents_controller_spec.rb b/spec/controllers/meeting_contents_controller_spec.rb index 35a6cc21c8..6a2ad1fb4b 100644 --- a/spec/controllers/meeting_contents_controller_spec.rb +++ b/spec/controllers/meeting_contents_controller_spec.rb @@ -71,6 +71,25 @@ describe MeetingContentsController do let(:mail_count) { 3 } end end + + context 'with an error during deliver' do + before do + author.pref[:no_self_notified] = false + author.save! + allow(MeetingMailer).to receive(:content_for_review).and_raise(Net::SMTPError) + end + + it 'does not raise an error' do + expect { put 'notify', meeting_id: meeting.id }.to_not raise_error + end + + it 'produces a flash message containing the mail addresses raising the error' do + put 'notify', meeting_id: meeting.id + meeting.participants.each do |participant| + expect(flash[:error]).to include(participant.name) + end + end + end end end end