#1080 EasyExtensions buttons

This commit is contained in:
Karel Pičman 2020-04-01 14:33:34 +02:00
parent a529022377
commit 4b57453f00
27 changed files with 63 additions and 73 deletions

View File

@ -128,7 +128,9 @@
<p><%= custom_field_tag_with_label(:dmsf_folder, value) %></p>
<% end %>
</div>
<p><%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %></p>
<div class="form-actions">
<%= submit_tag(create ? l(:button_create) : l(:submit_save), class: 'button-positive') %>
</div>
<% end %>
<%= wikitoolbar_for 'dmsf_folder_description' %>

View File

@ -47,8 +47,10 @@
<p>
<%= f.text_area :dmsf_description, rows: 8, class: 'wiki-edit', label: l(:field_description) %>
</p>
<div class="form-actions">
<%= f.submit l(:submit_save), class: 'button-positive' %>
</div>
</div>
<%= f.submit l(:submit_save) %>
<% end %>
<%= wikitoolbar_for 'project_dmsf_description' %>

View File

@ -27,34 +27,34 @@
<%= render partial: 'path', locals: { folder: @folder, filename: nil, title: l(:heading_send_documents_by_email) } %>
<%= form_tag(email_entries_path(id: @project, folder_id: @folder), { method: :post }) do %>
<%= hidden_field_tag('email[zipped_content]', @email_params[:zipped_content]) %>
<%= hidden_field_tag('email[folders]', @email_params[:folders].to_json) %>
<%= hidden_field_tag('email[files]', @email_params[:files].to_json) %>
<%= hidden_field_tag('email[from]', @email_params[:from]) %>
<%= hidden_field_tag('email[reply_to]', @email_params[:reply_to]) %>
<%= hidden_field_tag 'email[zipped_content]', @email_params[:zipped_content] %>
<%= hidden_field_tag 'email[folders]', @email_params[:folders].to_json %>
<%= hidden_field_tag 'email[files]', @email_params[:files].to_json %>
<%= hidden_field_tag 'email[from]', @email_params[:from] %>
<%= hidden_field_tag 'email[reply_to]', @email_params[:reply_to] %>
<div class="box tabular">
<p>
<%= label_tag('', l(:label_email_from)) %>
<%= text_field_tag('email[from_disabled]', @email_params[:from], style: 'width: 90%;', disabled: true) %>
<%= label_tag '', l(:label_email_from) %>
<%= text_field_tag 'email[from_disabled]', @email_params[:from], class: 'dmsf-full-width', disabled: true %>
</p>
<p>
<%= label_tag('email[to]', l(:label_email_to)) %>
<%= label_tag 'email[to]', l(:label_email_to) %>
<span>
<%= text_field_tag('email[to]', @email_params[:to], style: 'width: 90%;', required: true) %>
<%= text_field_tag 'email[to]', @email_params[:to], class: 'dmsf-full-width', required: true %>
<%= link_to l(:button_add), add_email_dmsf_path(project_id: @project),
title: l(:label_email_address_add), class: 'icon icon-add', remote: true %>
</span>
</p>
<p>
<%= label_tag('email[cc]', l(:label_email_cc)) %>
<%= text_field_tag('email[cc]', @email_params[:cc], style: 'width: 90%;') %>
<%= label_tag 'email[cc]', l(:label_email_cc) %>
<%= text_field_tag 'email[cc]', @email_params[:cc], class: 'dmsf-full-width' %>
</p>
<p>
<%= label_tag('email[subject]', l(:label_email_subject)) %>
<%= text_field_tag('email[subject]', @email_params[:subject], style: 'width: 90%;') %>
<%= label_tag 'email[subject]', l(:label_email_subject) %>
<%= text_field_tag 'email[subject]', @email_params[:subject], class: 'dmsf-full-width' %>
</p>
<p>
<%= label_tag('', l(:label_email_documents)) %>
<%= label_tag '', l(:label_email_documents) %>
<span>
<%= link_to 'Documents.zip', download_email_entries_path(id: @project, folder_id: @folder,
path: @email_params[:zipped_content]) %>
@ -67,11 +67,13 @@
</span>
</p>
<p>
<%= label_tag('email[body]', l(:label_email_body)) %>
<%= text_area_tag('email[body]', @email_params['body'], rows: '20', style: 'width: 90%;') %>
<%= label_tag 'email[body]', l(:label_email_body) %>
<%= text_area_tag 'email[body]', @email_params['body'], rows: '20', class: 'dmsf-full-width' %>
</p>
<div class="form-actions">
<%= submit_tag l(:label_email_send), class: 'button-positive' %>
</div>
</div>
<p><%= submit_tag(l(:label_email_send)) %></p>
<% end %>
<%= wikitoolbar_for 'email_body' %>

View File

@ -87,7 +87,9 @@
<p>
<%= f.text_area :comment, rows: 2, label: l(:label_comment), class: 'wiki-edit' %>
</p>
<%= f.submit l(:submit_create) %>
<div class="form-actions">
<%= f.submit l(:button_create), class: 'button-positive' %>
</div>
<% end %>
<% end %>
</div>

View File

@ -104,14 +104,14 @@
<p>
<%= f.text_field :name, required: true, max_length: 255 %>
</p>
</div>
<p>
<div class="form-actions">
<% if modal %>
<%= f.submit l(:button_create), onclick: 'hideModal(this);' %>
<%= f.submit l(:button_create), class: 'button-positive', onclick: 'hideModal(this);' %>
<% else %>
<%= f.submit l(:button_create) %>
<%= f.submit l(:button_create), class: 'button-positive' %>
<% end %>
</p>
</div>
</div>
<% end %>
<%= late_javascript_tag do %>

View File

@ -33,7 +33,7 @@
<fieldset class="box tabular">
<legend><%= l(:link_user_preferences) %></legend>
<p>
<%= content_tag(:label, l(:label_notifications)) %>
<%= content_tag :label, l(:label_notifications) %>
<%= select_tag 'email_notify',
options_for_select([[l(:select_option_default), nil],
[l(:select_option_activated), true], [l(:select_option_deactivated), false]],
@ -65,5 +65,7 @@
</p>
</fieldset>
<% end %>
<%= submit_tag l(:submit_save), title: l(:title_save_preferences) %>
<div class="form-actions">
<%= submit_tag l(:submit_save), title: l(:title_save_preferences), class: 'button-positive' %>
</div>
<% end %>

View File

@ -24,7 +24,7 @@
locals: { folder: @folder, filename: nil, title: l(:label_attachment_new) } %>
<%= form_tag({ controller: 'dmsf_upload', action: 'upload_files', id: @project, folder_id: @folder },
id: 'uploadform', method: :post, multipart: true) do %>
<div>
<div class="box tabular">
<span class="dmsf-uploader">
<%= render partial: 'dmsf_upload/form',
locals: { multiple: true, container: nil, description: true, awf: false } %>

View File

@ -26,7 +26,7 @@
<div class="contextual">
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path, class: 'icon icon-add' %>
</div>
<h2><%=l(:label_dmsf_workflow_plural)%></h2>
<h2><%= l(:label_dmsf_workflow_plural)%></h2>
<%= form_tag(dmsf_workflows_path, method: :get) do %>
<fieldset>
<legend><%= l(:label_filter_plural) %></legend>
@ -61,7 +61,8 @@
<% if @project %>
<p>
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project.id), class: 'icon icon-add' %>
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project.id),
class: 'button button-positive icon icon-add' %>
</p>
<% else %>
<% if @workflow_pages %>

View File

@ -39,11 +39,13 @@
<%= f.text_field :name, required: true %>
</p>
<p>
<%= f.select(:id, dmsf_all_workflows_for_select(params[:dmsf_workflow] ? params[:dmsf_workflow][:id] : nil),
label: l(:label_copy_workflow_from)) %>
<%= f.select :id, dmsf_all_workflows_for_select(params[:dmsf_workflow] ? params[:dmsf_workflow][:id] : nil),
label: l(:label_copy_workflow_from) %>
</p>
<div class="form-actions">
<%= f.submit l(:button_create), class: 'button-positive' %>
</div>
</div>
<%= f.submit l(:button_create) %>
<% end %>
<%= late_javascript_tag do %>

View File

@ -336,12 +336,18 @@ div[id*="revision_access_"] {
display: none;
}
/* Email form */
[id^='email_'].dmsf-full-width {
width: 90%;
max-width: 90%;
}
/* EasyExtensions - font icons */
.icon-actions::before {
content: "\F1D8" !important;
}
/*.icon-only {
overflow: hidden;
display: inline-block;
}*/
/* EasyExtensions - Approval workflows */
#tab-content-dmsf_workflow table.list ~ p .button {
margin-top: 10px;
}

View File

@ -67,7 +67,6 @@ cs:
notice_file_notifications_deactivated: Notifikace souboru byly deaktivovány
link_details: "%{title} detaily"
link_edit: "Upravit %{title}"
submit_create: Vytvořit
link_create_folder: Vytvořit složku
link_title: Název
link_size: Velikost

View File

@ -67,7 +67,6 @@ de:
notice_file_notifications_deactivated: Dateibenachrichtigungen deaktiviert
link_details: "%{title} Details"
link_edit: "Bearbeite %{title}"
submit_create: Erstellen
link_create_folder: Ordner erstellen
link_title: Titel
link_size: Größe

View File

@ -67,7 +67,6 @@ en:
notice_file_notifications_deactivated: File notifications deactivated
link_details: "%{title} details"
link_edit: "Edit %{title}"
submit_create: Create
link_create_folder: Create folder
link_title: Title
link_size: Size

View File

@ -67,7 +67,6 @@ es:
notice_file_notifications_deactivated: Notificación de archivo desactivada
link_details: "%{title} detalles"
link_edit: "Editar %{title}"
submit_create: Crear
link_create_folder: Crear Directorio
link_title: Titulo
link_size: Tamaño

View File

@ -67,7 +67,6 @@ fr:
notice_file_notifications_deactivated: Les notifications du fichier ont été désactivés
link_details: "Détails de %{title}"
link_edit: "Modification du dossier %{title}"
submit_create: Ajouter
link_create_folder: Créer un sous-dossier
link_title: Titre
link_size: Taille

View File

@ -67,7 +67,6 @@ hu:
notice_file_notifications_deactivated: Fájl értesítések kikapcsolva
link_details: "%{title} részletek"
link_edit: "%{title} szerkesztése"
submit_create: Létrehozás
link_create_folder: Mappa létrehozása
link_title: Cím
link_size: Méret

View File

@ -67,7 +67,6 @@ it: # Italian strings thx 2 Matteo Arceci!
notice_file_notifications_deactivated: La notifica su documento è disattiva
link_details: "%{title} dettagli"
link_edit: "Modifica %{title}"
submit_create: Creato
link_create_folder: Creata cartella
link_title: Nome documento
link_size: Dimensioni

View File

@ -67,7 +67,6 @@ ja:
notice_file_notifications_deactivated: ファイル通知を無効にしました
link_details: "%{title} の詳細を表示"
link_edit: "%{title} を編集"
submit_create: 作成
link_create_folder: フォルダ作成
link_title: タイトル
link_size: サイズ

View File

@ -67,7 +67,6 @@ ko:
notice_file_notifications_deactivated: 파일 알림이 비활성화 되었습니다
link_details: "%{title} 상세 내역"
link_edit: "%{title} 수정"
submit_create: 작성
link_create_folder: 폴더 작성
link_title: 제목
link_size: 크기

View File

@ -67,7 +67,6 @@ nl:
notice_file_notifications_deactivated: Meldingen bestand gedeactiveerd
link_details: "%{title} details"
link_edit: "Aanpassen %{title}"
submit_create: Aanmaken
link_create_folder: Maak map
link_title: Titel
link_size: Bestandsgrootte

View File

@ -67,7 +67,6 @@ pl:
notice_file_notifications_deactivated: Wyłączono powiadomienia dla pliku
link_details: "szczegóły %{title}"
link_edit: "Edytuj %{title}"
submit_create: Utwórz
link_create_folder: Utwórz folder
link_title: Tytuł
link_size: Rozmiar

View File

@ -67,7 +67,6 @@ pt-BR:
notice_file_notifications_deactivated: Notificações de arquivo desativadas
link_details: "%{title} detalhes"
link_edit: "Editar %{title}"
submit_create: Criar
link_create_folder: Criar pasta
link_title: Taxonomia
link_size: Tamanho do arquivo

View File

@ -67,7 +67,6 @@ ru:
notice_file_notifications_deactivated: Уведомления файла отключены
link_details: "Подробности %{title}"
link_edit: "Редактировать %{title}"
submit_create: Создать
link_create_folder: Создать папку
link_title: Название
link_size: Размер

View File

@ -67,7 +67,6 @@ sl:
notice_file_notifications_deactivated: Obveščanje o datoteki je deaktivirano
link_details: "%{title} podrobnosti"
link_edit: "Uredi %{title}"
submit_create: Kreiraj
link_create_folder: Kreiraj mapo
link_title: Naslov
link_size: Velikost

View File

@ -67,7 +67,6 @@ zh-TW:
notice_file_notifications_deactivated: 檔案通知己關閉
link_details: "%{title} 描述"
link_edit: "編輯 %{title}"
submit_create: 建立
link_create_folder: 建立資料夾
link_title: 標題
link_size: 檔案大小

View File

@ -67,7 +67,6 @@ zh:
notice_file_notifications_deactivated: 文件通知注销
link_details: "%{title} 详情"
link_edit: "编辑 %{title}"
submit_create: 创建
link_create_folder: 创建文件夹
link_title: 主题
link_size: 大小

View File

@ -26,8 +26,7 @@ module RedmineDmsf
# TODO: *.css are twice there
def view_layouts_base_html_head(context={})
#return if defined?(EasyExtensions)
return unless context[:controller].class.name.match?(/^Dmsf/)
return unless context[:controller].class.name.match?(/^(Dmsf|Projects)/)
meta = "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) +
"\n".html_safe + stylesheet_link_tag('select2.min.css', plugin: :redmine_dmsf) +
"\n".html_safe + javascript_include_tag('select2.min.js', plugin: :redmine_dmsf, defer: true) +
@ -37,22 +36,10 @@ module RedmineDmsf
if defined?(EasyExtensions)
meta << "\n".html_safe + javascript_include_tag('jquery-2.2.4-ui-1.11.0-ujs-5.2.3', 'application')
meta << "\n".html_safe + javascript_include_tag('context_menu', 'application')
#meta << "\n".html_safe + javascript_include_tag('responsive', 'application')
end
meta
end
# def easy_extensions_javascripts_hook(context={})
# context[:template].require_asset('select2.min.js')
# context[:template].require_asset('redmine_dmsf.js')
# context[:template].require_asset('attachments_dmsf.js')
# end
#
# def easy_extensions_stylesheets_hook(context={})
# context[:template].require_asset('redmine_dmsf.css')
# context[:template].require_asset('select2.min.css')
# end
end
end
end