diff --git a/app/views/additionals/settings/_issues.html.slim b/app/views/additionals/settings/_issues.html.slim index f7d34329..1a0402f0 100644 --- a/app/views/additionals/settings/_issues.html.slim +++ b/app/views/additionals/settings/_issues.html.slim @@ -10,6 +10,7 @@ br p = additionals_settings_checkbox :new_issue_on_profile p = additionals_settings_checkbox :issue_assign_to_me p = additionals_settings_checkbox :issue_note_with_author +p = additionals_settings_checkbox :issue_fast_description_edit p = additionals_settings_checkbox :issue_change_status_in_sidebar p = additionals_settings_checkbox :issue_freezed_with_close diff --git a/app/views/issues/_additionals_show_description_bottom.html.slim b/app/views/issues/_additionals_show_description_bottom.html.slim new file mode 100644 index 00000000..25346f6d --- /dev/null +++ b/app/views/issues/_additionals_show_description_bottom.html.slim @@ -0,0 +1,13 @@ +- if @issue.editable? && Additionals.setting?(:issue_fast_description_edit) + javascript: + $(function() { + $('.issue .description .contextual') + .prepend("#{escape_javascript link_to(l(:button_edit), edit_issue_path(@issue), class: 'icon icon-edit', id: 'fast-desc-link')} "); + + $("#fast-desc-link").click(function(){ + showAndScrollTo("update", "issue_notes"); + $("#issue_description_and_toolbar").show(); + $("#issue_description").focus(); + return false; + }); + }); diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 9fd3c078..5d79d84b 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -204,3 +204,4 @@ cs: label_user_is_author_of: "Tento uživatel je autorem tohoto %{entity}." label_issue_genitive: "Úkol" label_issue_note_with_author: "Zobrazit autora úlohy s poznámkou" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/de.yml b/config/locales/de.yml index 19b4958b..e9bbf17a 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -204,3 +204,4 @@ de: label_user_is_author_of: Dieser Benutzer ist der Autor dieses %{entity}. label_issue_genitive: Tickets label_issue_note_with_author: Ticket-Autor zu Kommentar anzeigen + label_issue_fast_description_edit: Schnellbearbeitung Beschreibung diff --git a/config/locales/en.yml b/config/locales/en.yml index d7a4dfeb..404e24fa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -204,3 +204,4 @@ en: label_user_is_author_of: This user is the author of this %{entity}. label_issue_genitive: issue label_issue_note_with_author: Show issue author with note + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/es.yml b/config/locales/es.yml index e36b5dbf..a2da0d01 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -204,3 +204,4 @@ es: label_user_is_author_of: "Este usuario es el autor de esta %{entity}." label_issue_genitive: "problema" label_issue_note_with_author: "Mostrar autor de tarea con nota" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/fr.yml b/config/locales/fr.yml index a5aadb48..3268506e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -204,3 +204,4 @@ fr: label_user_is_author_of: "Cet utilisateur est l'auteur de cette %{entity}." label_issue_genitive: "problème" label_issue_note_with_author: "Afficher l'auteur de la tâche avec une note" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/it.yml b/config/locales/it.yml index 8656bfc0..a9ff420d 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -204,3 +204,4 @@ it: label_user_is_author_of: "Questo utente è l'autore di questo %{entity}." label_issue_genitive: tema label_issue_note_with_author: "Mostra l'autore dell'attività con una nota" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 92f50592..9a56f4d5 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -204,3 +204,4 @@ ja: label_user_is_author_of: "このユーザーは、この %{entity}." label_issue_genitive: "タスク" label_issue_note_with_author: "タスクの作者とメモを表示する" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 846c94ae..7beeace9 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -204,3 +204,4 @@ ko: label_user_is_author_of: "이 사용자는 이 글의 작성자입니다 %{entity}." label_issue_genitive: "일" label_issue_note_with_author: "메모와 함께 작업 작성자 표시" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 9d03e58c..3677b41a 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -204,3 +204,4 @@ pl: label_user_is_author_of: "Ten użytkownik jest autorem tego %{entity}." label_issue_genitive: issue label_issue_note_with_author: "Pokaż autora zadania z notatką" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index b64436dc..8fe751b7 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -204,3 +204,4 @@ pt-BR: label_user_is_author_of: "Este usuário é o autor deste %{entity}." label_issue_genitive: "Tarefa" label_issue_note_with_author: "Mostrar autor da tarefa com nota" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a552c384..861f89d1 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -204,3 +204,4 @@ ru: label_user_is_author_of: "Этот пользователь является автором этого %{entity}." label_issue_genitive: "Задание" label_issue_note_with_author: "Показать автора задачи с примечанием" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index b6f3afda..c3dad342 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -204,3 +204,4 @@ label_user_is_author_of: "这个用户是这个的作者 %{entity}." label_issue_genitive: "问题" label_issue_note_with_author: "显示任务的作者与注释" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1262307f..e41c159b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -204,3 +204,4 @@ zh: label_user_is_author_of: "这个用户是这个的作者 %{entity}." label_issue_genitive: "问题" label_issue_note_with_author: "显示任务的作者与注释" + label_issue_fast_description_edit: Fast edit for description diff --git a/config/settings.yml b/config/settings.yml index a5262c50..ed4443c0 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -18,6 +18,7 @@ issue_change_status_in_sidebar: 0 issue_current_user_status: 0 issue_freezed_with_close: 0 issue_note_with_author: 0 +issue_fast_description_edit: 0 issue_status_change: 0 issue_status_x: '' issue_status_y: '' diff --git a/lib/additionals/hooks/view_hook.rb b/lib/additionals/hooks/view_hook.rb index 1ba9d3b0..3fbd44d3 100644 --- a/lib/additionals/hooks/view_hook.rb +++ b/lib/additionals/hooks/view_hook.rb @@ -12,6 +12,7 @@ module Additionals render_on :view_account_login_bottom, partial: 'login_text' render_on :view_issue_action_menu, partial: 'issues/additionals_action_menu' + render_on :view_issues_show_description_bottom, partial: 'issues/additionals_show_description_bottom' render_on :view_issues_context_menu_start, partial: 'additionals_closed_issues' render_on :view_issues_bulk_edit_details_bottom, partial: 'change_author_bulk' render_on :view_issues_form_details_bottom, partial: 'change_author'