diff --git a/app/policies/guidance_group_policy.rb b/app/policies/guidance_group_policy.rb index dd3725f..422ea26 100644 --- a/app/policies/guidance_group_policy.rb +++ b/app/policies/guidance_group_policy.rb @@ -24,11 +24,11 @@ end def admin_new? - user.can_modify_guidance? && (guidance_group.organisation_id == user.organisation_id) + user.can_modify_guidance? end def admin_create? - user.can_modify_guidance? && (guidance_group.organisation_id == user.organisation_id) + user.can_modify_guidance? end def admin_destroy? diff --git a/app/views/guidances/admin_index.html.erb b/app/views/guidances/admin_index.html.erb index f808526..76acaf2 100644 --- a/app/views/guidances/admin_index.html.erb +++ b/app/views/guidances/admin_index.html.erb @@ -75,7 +75,7 @@ <%= link_to t("helpers.view"), admin_show_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
<%= link_to t("helpers.submit.edit"), admin_edit_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
<%= link_to t("helpers.submit.delete"), admin_destroy_guidance_group_path(guidance_gr), - :confirm => t("org_admin.guidance_group.delete_message", :guidance_group_name => guidance_gr.name ), :method => :delete, :class => "dmp_table_link"%> + :data => {:confirm => t("org_admin.guidance_group.delete_message", :guidance_group_name => guidance_gr.name )}, :method => :delete, :class => "dmp_table_link"%> @@ -163,7 +163,7 @@ <%= link_to t("helpers.view"), admin_show_guidance_path(guidance), :class => "dmp_table_link"%>
<%= link_to t("helpers.submit.edit"), admin_edit_guidance_path(guidance), :class => "dmp_table_link"%>
<%= link_to t("helpers.submit.delete"), admin_destroy_guidance_path(guidance), - :confirm => t("org_admin.guidance.delete_message_html", :guidance_summary => truncate(sanitize(guidance.text,:tags => %w(br a)), :length => 20 , :omission => t('helpers.truncate_continued')) ), :method => :delete, :class => "dmp_table_link"%> + :data => {:confirm => t("org_admin.guidance.delete_message_html", :guidance_summary => truncate(sanitize(guidance.text,:tags => %w(br a)), :length => 20 , :omission => t('helpers.truncate_continued')) )}, :method => :delete, :class => "dmp_table_link"%> <%end%> diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index 9676554..bf37fe1 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -72,16 +72,16 @@ - - <%= t('org_admin.guidance.published') %> -
- <%= f.check_box :published , :as => :check_boxes%> -
-
- -
- - + + <%= t('org_admin.guidance.published') %> +
+ <%= f.check_box :published , :as => :check_boxes%> +
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.guidance_group_published_help_text_html'))%> +
+ + <%= t('org_admin.guidance.guidance_group_label') %>
diff --git a/config/locales/de.yml b/config/locales/de.yml index 2d33070..8750ba2 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -158,6 +158,7 @@ by_themes_help_text_html: "Wählen Sie die Themen aus, für die diese Hilfestellung relevant ist." by_question_help_text_html: "Wählen Sie die Vorlage, die Phase, die Version, den Abschnitt und die Frage aus den folgenden Auswahllisten aus, um die Frage zu bestimmen, für die diese Hilfestellung angezeigt werden soll." guidance_group_select_help_text_html: "Wählen Sie die Gruppe aus, für die diese Hilfestellung relevant ist." + guidance_group_published_help_text_html: "Markieren Sie dieses Kästchen, wenn Sie bereit sind, für diese Anleitung für Benutzer-Pläne zu erscheinen." guidance_text_html: "

Sie können eine Hilfestellungtexte erstellen, die im Zusammenhang mit bestimmten Themen angezeigt werden, oder die sich auf eine spezifische Frage beziehen. Generische Hilfestellungen für Themen helfen Zeit und Arbeit zu sparen, da Ihre Hilfestellungen automatisch für alle Vorlagen angezeigt werden; sie müssen andernfalls für jede Vorlage neu erstellt werden.

Im Normalfall werden Sie wollen, dass Ihre Orinetierungshilfen in allen Vorlagen angezeigt wird. Ausnahmen sind z.B. Hilfestellungen die spezielle Hinweise für einen Förderer geben.

" delete_message: "Sie sind dabei '%{guidance_summary}' zu löschen. Sind Sie sicher?" diff --git a/config/locales/en-UK.yml b/config/locales/en-UK.yml index 8f56644..c7adea3 100644 --- a/config/locales/en-UK.yml +++ b/config/locales/en-UK.yml @@ -208,6 +208,7 @@ by_themes_help_text_html: "Select which theme(s) this guidance relates to." by_question_help_text_html: "Select the relevant template, phase, version, section and question from the following dropdown options to define which specific question this guidance should display on." guidance_group_select_help_text_html: "Select which group this guidance relates to." + guidance_group_published_help_text_html: "Check this box when you are ready for this guidance to appear on user's plans." guidance_text_html: "

You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board) or you can write guidance for specific questions. Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

You will usually want your guidance to display on all templates, however there may be cases where you only want it to show for specific funders e.g. if you have specific instructions for applicants to BBSRC for example. This can be set too if needed.

" delete_message_html: "You are about to delete '%{guidance_summary}'. Are you sure?" diff --git a/config/locales/en-US.yml b/config/locales/en-US.yml index 71416ba..31b94bb 100644 --- a/config/locales/en-US.yml +++ b/config/locales/en-US.yml @@ -199,6 +199,7 @@ by_themes_help_text_html: "Select which theme(s) this guidance relates to." by_question_help_text_html: "Select the relevant template, phase, version, section and question from the following dropdown options to define which specific question this guidance should display on." guidance_group_select_help_text_html: "Select which group this guidance relates to." + guidance_group_published_help_text_html: "Check this box when you are ready for this guidance to appear on user's plans." guidance_text_html: "

You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board) or you can write guidance for specific questions. Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

You will usually want your guidance to display on all templates, however there may be cases where you only want it to show for specific funders e.g. if you have specific instructions for applicants to BBSRC for example. This can be set too if needed.

" delete_message_html: "You are about to delete '%{guidance_summary}'. Are you sure?" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6040565..18b6c0b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -165,6 +165,7 @@ by_themes_help_text_html: "Sélectionnez le ou les thèmes auxquels ces directives se rapportent." by_question_help_text_html: "Sélectionnez le modèle, la phase, la version, la section et la question appropriés dans les options de la liste déroulante suivante pour déterminer la question précise pour laquelle ces directives devraient être affichées." guidance_group_select_help_text_html: "Sélectionnez le groupe auquel ces directives se rapportent." + guidance_group_published_help_text_html: "Cochez cette case lorsque vous êtes prêt pour cette orientation à apparaître sur les plans de l'utilisateur." guidance_text_html: "

Vous pouvez rédiger des directives à afficher par thème (p. ex. des directives générales sur l'entreposage et la sauvegarde qui devraient être présentées à tous les échelons) ou vous pouvez rédiger des directives pour des questions précises. La rédaction de directives générales par thème vous permet d'économiser du temps et des efforts, car vos conseils seront automatiquement affichés dans tous les modèles au lieu d'avoir à rédiger des directives qui accompagneraient chaque modèle.

De manière générale, vous voudrez que vos directives soient affichées dans tous les modèles. Vous voudrez toutefois, dans certains cas, que les directives soient seulement affichées pour des bailleurs de fonds précis, par exemple, si vous avez des consignes précises pour les candidats qui présentent une demande au Biotechnology and Biological Sciences Research Council (BBSRC). Vous pouvez également le préciser, au besoin.

" delete_message_html: "Vous êtes sur le point de supprimer '%{guidance_summary}'. Êtes-vous sûr de vouloir le supprimer?"