Skip to content
Snippets Groups Projects
Verified Commit c08cd4a8 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Nova verze checklistu

parent cfc10d88
No related branches found
No related tags found
No related merge requests found
Pipeline #17878 passed
Showing
with 258 additions and 92 deletions
......@@ -2,7 +2,7 @@ image: docker:stable
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 4.2.10-passenger-1
IMAGE_VER: 4.2.10-passenger-2
services:
- docker:dind
......
gem 'redmine_crm'
gem 'redmineup'
# This file is a part of Redmine Checklists (redmine_checklists) plugin,
# issue checklists management plugin for Redmine
#
# Copyright (C) 2011-2021 RedmineUP
# Copyright (C) 2011-2024 RedmineUP
# http://www.redmineup.com/
#
# redmine_checklists is free software: you can redistribute it and/or modify
......@@ -18,7 +18,6 @@
# along with redmine_checklists. If not, see <http://www.gnu.org/licenses/>.
class ChecklistsController < ApplicationController
unloadable
before_action :find_checklist_item, :except => [:index, :create]
before_action :find_issue_by_id, :only => [:index, :create]
......
......@@ -3,7 +3,7 @@
# This file is a part of Redmine Checklists (redmine_checklists) plugin,
# issue checklists management plugin for Redmine
#
# Copyright (C) 2011-2021 RedmineUP
# Copyright (C) 2011-2024 RedmineUP
# http://www.redmineup.com/
#
# redmine_checklists is free software: you can redistribute it and/or modify
......@@ -29,7 +29,7 @@ module ChecklistsHelper
@new_object ||= f.object.class.reflect_on_association(association).klass.new
end
def fields(f, association)
def checklist_fields(f, association)
@fields ||= f.fields_for(association, new_object(f, association), :child_index => "new_#{association}") do |builder|
render(association.to_s.singularize + "_fields", :f => builder)
end
......
# This file is a part of Redmine Checklists (redmine_checklists) plugin,
# issue checklists management plugin for Redmine
#
# Copyright (C) 2011-2021 RedmineUP
# Copyright (C) 2011-2024 RedmineUP
# http://www.redmineup.com/
#
# redmine_checklists is free software: you can redistribute it and/or modify
......@@ -18,13 +18,11 @@
# along with redmine_checklists. If not, see <http://www.gnu.org/licenses/>.
class Checklist < ActiveRecord::Base
unloadable
include Redmine::SafeAttributes
belongs_to :issue
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
attr_protected :id if ActiveRecord::VERSION::MAJOR <= 4
acts_as_event :datetime => :created_at,
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue_id}},
:type => 'issue issue-closed',
......@@ -32,7 +30,6 @@ class Checklist < ActiveRecord::Base
:description => Proc.new {|o| "#{l(:field_issue)}: #{o.issue.subject}" }
if ActiveRecord::VERSION::MAJOR >= 4
acts_as_activity_provider :type => "checklists",
:permission => :view_checklists,
:scope => preload({:issue => :project})
......@@ -40,17 +37,8 @@ class Checklist < ActiveRecord::Base
:scope => lambda { includes([:issue => :project]).order("#{table_name}.id") },
:project_key => "#{Issue.table_name}.project_id"
else
acts_as_activity_provider :type => "checklists",
:permission => :view_checklists,
:find_options => {:issue => :project}
acts_as_searchable :columns => ["#{table_name}.subject"],
:include => [:issue => :project],
:project_key => "#{Issue.table_name}.project_id",
:order_column => "#{table_name}.id"
end
rcrm_acts_as_list
up_acts_as_list scope: :issue
validates_presence_of :subject
validates_length_of :subject, maximum: 512
......
# This file is a part of Redmine Checklists (redmine_checklists) plugin,
# issue checklists management plugin for Redmine
#
# Copyright (C) 2011-2021 RedmineUP
# Copyright (C) 2011-2024 RedmineUP
# http://www.redmineup.com/
#
# redmine_checklists is free software: you can redistribute it and/or modify
......
......@@ -7,5 +7,5 @@
id: "checklist-checkbox-#{checklist_item.id}"
%>
<% end %>
<%= textilizable(checklist_item, :subject).gsub(/<\/?(p|h\d+|li|ul)>/, '').strip.html_safe %>
<%= textilizable(checklist_item, :subject).gsub(/<\/?(p|h\d+|li|ul|hr \/)>/, '').strip.html_safe %>
</li>
......@@ -6,6 +6,7 @@ api.array :checklists, api_meta(:total_count => @checklists.size) do
api.subject checklist.subject
api.is_done checklist.is_done
api.position checklist.position
api.is_section checklist.is_section
api.created_at checklist.created_at
api.updated_at checklist.updated_at
......
......@@ -4,6 +4,7 @@ api.checklist do
api.subject @checklist_item.subject
api.is_done @checklist_item.is_done
api.position @checklist_item.position
api.is_section @checklist_item.is_section
api.created_at @checklist_item.created_at
api.updated_at @checklist_item.updated_at
......
......@@ -9,7 +9,6 @@
<ul id="checklist_items">
<% @issue.checklists.each do |checklist_item| %>
<%= render :partial => 'checklists/checklist_item', :object => checklist_item %>
<% end %>
</ul>
</div>
......
......@@ -4,7 +4,7 @@
<% end %>
<span class="checklist-show checklist-subject <%= done_css(f) %>">
<%= textilizable(f.object, :subject).gsub(/<\/?(p|h\d+|li|ul)>/, '').strip.html_safe %>
<%= f.object.subject.to_s.strip.html_safe %>
</span>
<span class="checklist-edit checklist-new checklist-edit-box">
......
......@@ -3,8 +3,8 @@
<p id="checklist_form">
<label><%=l(:label_checklist_plural)%></label>
<% @issue.checklists.build if @issue.checklists.blank? || @issue.checklists.last.subject.present? %>
<%= fields_for :issue, issue do |f| -%>
<span id="checklist_form_items" data-checklist-fields='<%= fields(f, :checklists) %>'>
<%= fields_for @issue do |f| -%>
<span id="checklist_form_items" data-checklist-fields='<%= checklist_fields(f, :checklists) %>'>
<%= f.fields_for :checklists do |builder| %>
<%= render :partial => 'checklist_fields', :locals => {:f => builder, :checklist => @checklist} %>
<% end %>
......
......@@ -357,11 +357,11 @@ Redmine.Checklist = $.klass({
},
enableUniquenessValidation: function() {
this.root.on('keyup', 'input.edit-box', $.proxy(function(event) {
this.root.on('input', 'input.edit-box', $.proxy(function(event) {
value = $(event.target).val()
span = this.findSpan(event)
span.removeClass('invalid')
$('.checklist-item').each(function(i, elem) {
$('.checklist-item.existing').each(function(i, elem) {
e = $(elem)
if (!e.is('.edit') && !e.is('.new'))
{
......
......@@ -127,6 +127,7 @@ table.list td.checklist_relations { text-align: left }
list-style: none;
padding: 2px;
border-radius: 2px;
z-index: 10;
}
#checklist-menu li {
......
# encoding: utf-8
# German strings go here for Rails i18n
# Deutsche Übersetzungen für Rails i18n
de:
label_checklist_plural: Checkliste
field_checklist: Checkliste
label_checklist_save_log: "Speichere Änderungen in der Ticket-Historie"
label_checklist_done_ratio: Aktualisiere den Ticket-Fortschritt
permission_view_checklists: Checkliste anzeigen
permission_done_checklists: Checkliste anwenden
permission_edit_checklists: Checkliste bearbeiten
label_checklist_template_category_plural: Kategorien
label_checklist_template_category_new: Neue Kategorie
field_checklist_template_category: Kategorie
label_checklist_templates: Checklisten-Vorlagen
label_checklist_new_checklist_template: Neue Checklisten-Vorlage
field_template_items: "Einträge"
label_checklist_template: Checklisten-Vorlage
label_add_checklists_from_template: "Aus Vorlage wählen"
label_select_template: "-- Vorlage auswählen --"
activerecord:
attributes:
checklists:
subject: Checklisten-Thema
label_checklist_plural: Checklist
field_checklist: Checklist
label_checklist_save_log: Änderungen im Problem-Log speichern
label_checklist_done_ratio: Fortschritt des Problems festlegen
permission_view_checklists: Checklist anzeigen
permission_done_checklists: Erledigte Checklistenelemente
permission_edit_checklists: Checklistenelemente bearbeiten
label_checklist_template_category_plural: Vorlagenkategorien
label_checklist_template_category_new: Neue Checklistenvorlage
field_checklist_template_category: Vorlagenelemente
label_checklist_templates: Checklistenvorlagen
label_checklist_new_checklist_template: Neue Checklistenvorlage
field_template_items: Vorlagenelemente
label_checklist_template: Checklistenvorlage
label_add_checklists_from_template: Von Vorlage hinzufügen
label_checklists_from_template: Von Vorlage
label_select_template: "-- Nicht angegeben --"
label_checklist_category_not_specified: "-- Nicht spezifiziert --"
label_checklists_description: 'Mehrere Einträge erlaubt (ein Eintrag pro Zeile)'
label_checklist_item: Checklisten-Eintrag
label_checklists_description: Mehrere Werte erlaubt (eine Zeile für jeden Wert)
label_checklist_item: Checklistenelement
label_checklist_section: Checklistensektion
label_checklist_deleted: gelöscht
label_checklist_changed_from: geändert von
label_checklist_changed_to: zu
label_checklist_added: hinzugefügt
label_checklist_done: als Erledigt markiert
label_checklist_undone: als Nicht erledigt markiert
label_checklist_updated: Checklisten-Eintrag editiert
label_checklist_status: Checklisten-Status
label_checklist_done: auf Erledigt gesetzt
label_checklist_undone: auf Nicht erledigt gesetzt
label_checklist_updated: Checklistenelement bearbeitet
label_checklist_status: Checklistestatus
label_checklist_status_done: Erledigt
label_checklist_status_undone: Nicht erledigt
label_checklist_is_default: Standard
label_checklist_is_default: Standardmäßig
field_is_for_tracker: Tracker
label_checklists_must_be_completed: "Alle Checklisten-Einträge eines Tickets müssen vor dem Schließen erledigt werden."
label_checklist_block_issue_closing: "Schließen des Tickets blockieren"
label_checklist_show_closed: Zeige alle
label_checklist_hide_closed: Verberge geschlossene
label_checklist_new_section: Neue Unterteilung
label_checklists_must_be_completed: Alle Checklisten eines Problems müssen erledigt sein, bevor es geschlossen werden kann
label_checklist_block_issue_closing: Problemabschluss blockieren
label_checklist_show_closed: Geschlossene anzeigen
label_checklist_hide_closed: Geschlossene ausblenden
label_checklist_new_section: Neue Sektion
# encoding: utf-8
# Traductions en français pour Rails i18n
fr:
label_checklist_plural: Liste de Tâches
field_checklist: Tâche
label_checklist_templates: Template de checklists
label_checklist_new_checklist_template: Ajouter un template
field_is_for_tracker:
label_checklist_is_default: Checklist par d faut
field_template_items: Eléments
activerecord:
attributes:
checklists:
subject: Sujet de la checklist
label_checklist_plural: Checklist
field_checklist: Checklist
label_checklist_save_log: Enregistrer les modifications dans le journal des problèmes
label_checklist_done_ratio: Définir le taux d'avancement du problème
permission_view_checklists: Voir la checklist
permission_done_checklists: Éléments de la checklist terminés
permission_edit_checklists: Modifier les éléments de la checklist
label_checklist_template_category_plural: Catégories de modèles
label_checklist_template_category_new: Nouvelle catégorie
field_checklist_template_category: Catégorie
label_checklist_templates: Modèles de checklist
label_checklist_new_checklist_template: Nouveau modèle de checklist
field_template_items: Éléments de modèle
label_checklist_template: Modèle de checklist
label_add_checklists_from_template: Ajouter à partir du modèle
label_checklists_from_template: À partir du modèle
label_select_template: "-- Sélectionner un modèle --"
label_checklist_category_not_specified: "-- Non spécifié --"
label_checklists_description: 'Plusieurs valeurs autorisées (une ligne pour chaque valeur)'
label_checklist_item: Élément de checklist
label_checklist_section: Section de checklist
label_checklist_deleted: supprimé
label_checklist_changed_from: changé de
label_checklist_changed_to: à
label_checklist_added: ajouté
label_checklist_done: défini comme Terminé
label_checklist_undone: défini comme Non terminé
label_checklist_updated: Élément de checklist modifié
label_checklist_status: Statut de la checklist
label_checklist_status_done: Terminé
label_checklist_status_undone: Non terminé
label_checklist_is_default: Par défaut
field_is_for_tracker: Tracker
label_checklists_must_be_completed: Toutes les checklists d'un problème doivent être terminées avant la clôture
label_checklist_block_issue_closing: Bloquer la clôture du problème
label_checklist_show_closed: Afficher les éléments clos
label_checklist_hide_closed: Masquer les éléments clos
label_checklist_new_section: Nouvelle section
# Hungarian translations for redmine_checklists
# by Lilla Basilides basilides.h.lilla@gmail.com)
# Hungarian strings go here for Rails i18n
hu:
activerecord:
attributes:
checklists:
subject: Ellenőrző lista tárgya
label_checklist_plural: Ellenőrző lista
field_checklist: Ellenőrző lista
label_checklist_save_log: Változások mentése a jegy naplójába
label_checklist_done_ratio: Állítsa be az elkészült jegyek arányát
permission_view_checklists: Ellenőrző lista megtekintése
permission_done_checklists: Elkészült ellenőrzőlista elemek
permission_edit_checklists: Ellenőrzőlista elemeinek szerkesztése
label_checklist_template_category_plural: Sablon kategóriák
label_checklist_template_category_new: Új kategória
field_checklist_template_category: Kategória
label_checklist_templates: Ellenőrzőlista sablonok
label_checklist_new_checklist_template: Új ellenőrzőlista sablon
field_template_items: Sablon elemek
label_checklist_template: Ellenőrzőlista sablon
label_add_checklists_from_template: Hozzáadás sablonból
label_checklists_from_template: A sablonból
label_select_template: "-- Sablon kiválasztása --"
label_checklist_category_not_specified: "-- Nincs meghatározva --"
label_checklists_description: 'Több érték megengedett (értékenként egy sor)'
label_checklist_item: Ellenőrzőlista elem
label_checklist_section: Ellenőrzőlista szakasz
label_checklist_deleted: törölve
label_checklist_changed_from: változott a következőből
label_checklist_changed_to: a címre
label_checklist_added: hozzáadva
label_checklist_done: készre állítva
label_checklist_undone: Nem készre állítva
label_checklist_updated: Szerkesztett ellenőrzőlista elem
label_checklist_status: Ellenőrzőlista állapota
label_checklist_status_done: Elkészült
label_checklist_status_undone: visszavonva
label_checklist_is_default: Alapértelmezett
field_is_for_tracker: Nyomkövető
label_checklists_must_be_completed: A jegy összes ellenőrző listáját el kell végezni a lezárás előtt.
label_checklist_block_issue_closing: Blokkjegy zárás
label_checklist_show_closed: Mutasd a zártakat
label_checklist_hide_closed: Rejtsd el zártakat
label_checklist_new_section: Új szakasz
\ No newline at end of file
......@@ -7,3 +7,5 @@ ko:
permission_view_checklists: "체크리스트 보기"
permission_done_checklists: "체크리스트 완료"
permission_edit_checklists: "체크리스트 수정"
label_checklists_must_be_completed: "일감을 완료하려면 모든 체크리스트가 완료되어야 합니다."
label_checklist_block_issue_closing: "일감이 종료되는 것을 방지합니다."
nl:
activerecord:
attributes:
checklists:
subject: Onderwerp van de checklist
label_checklist_plural: Checklists
field_checklist: Checklist
label_checklist_save_log: Wijzigingen in probleemlogboek opslaan
label_checklist_done_ratio: Stel voltooiingspercentage in
permission_view_checklists: View checklist
permission_done_checklists: Voltooide checklistitems
permission_edit_checklists: Bewerk checklistitems
label_checklist_template_category_plural: Sjabloonscategorieën
label_checklist_template_category_new: Nieuwe categorie
field_checklist_template_category: Categorie
label_checklist_templates: Checklistsjablonen
label_checklist_new_checklist_template: Nieuw checklistsjabloon
field_template_items: Sjabloonitems
label_checklist_template: Checklistsjabloon
label_add_checklists_from_template: Toevoegen vanuit sjabloon
label_checklists_from_template: Van sjabloon
label_select_template: -- Selecteer sjabloon --
label_checklist_category_not_specified: -- Niet gespecificeerd --
label_checklists_description: Meerdere waarden toegestaan (één regel voor elke waarde)
label_checklist_item: Checklistitem
label_checklist_section: Checklistsectie
label_checklist_deleted: verwijderd
label_checklist_changed_from: veranderd van
label_checklist_changed_to: naar
label_checklist_added: toegevoegd
label_checklist_done: ingesteld op Voltooid
label_checklist_undone: ingesteld op Niet voltooid
label_checklist_updated: Checklistitem bewerkt
label_checklist_status: Checkliststatus
label_checklist_status_done: Voltooid
label_checklist_status_undone: Niet voltooid
label_checklist_is_default: Standaard
field_is_for_tracker: Tracker
label_checklists_must_be_completed: Alle checklists van een probleem moeten voltooid zijn voordat het gesloten wordt
label_checklist_block_issue_closing: Blokkeer het sluiten van het probleem
label_checklist_show_closed: Gesloten weergeven
label_checklist_hide_closed: Gesloten verbergen
label_checklist_new_section: Nieuwe sectie
# Turkish strings go here for Rails i18n
tr:
activerecord:
attributes:
checklists:
subject: Kontrol Listesi konusu
label_checklist_plural: Kontrol listeleri
field_checklist: Kontrol Listesi
label_checklist_save_log: Değişiklikleri iş geçmişine kaydet
label_checklist_done_ratio: İş tamamlanma oranını ayarla
permission_view_checklists: Kontrol listesini görüntüle
permission_done_checklists: Kontrol Listesi elemanlarını tamamlandı olarak işaretle
permission_edit_checklists: Kontrol Listesini düzenle
label_checklist_template_category_plural: Taslak kategorileri
label_checklist_template_category_new: Yeni kategori
field_checklist_template_category: Kategori
label_checklist_templates: Kontrol listesi taslakları
label_checklist_new_checklist_template: Yeni kontrol listesi taslağı
field_template_items: Taslak elemanları
label_checklist_template: Kontrol listesi taslağı
label_add_checklists_from_template: Taslaktan ekle
label_checklists_from_template: Taslaktan
label_select_template: "-- Taslak seç --"
label_checklist_category_not_specified: "-- Belirtilmemiş --"
label_checklists_description: 'Birden fazla değer kabul edilir (her değer için bir satır)'
label_checklist_item: Kontrol listesi elemanı
label_checklist_section: Kontrol listesi kısmı
label_checklist_deleted: silindi
label_checklist_changed_from: ''
label_checklist_changed_to: '>>'
label_checklist_added: eklendi
label_checklist_done: Bitti olarak işaretlendi
label_checklist_undone: Bitti işareti kaldırıldı
label_checklist_updated: Kontrol listesi elemanı eklendi
label_checklist_status: Kontrol listesi durumu
label_checklist_status_done: Bitti
label_checklist_status_undone: Bitmedi
label_checklist_is_default: Varsayılan
field_is_for_tracker: İş tipi
label_checklists_must_be_completed: İş kapatılmadan önce tüm kontrol listeleri elemanlarının bitti olarak işaretlemesi mecburi olsun.
label_checklist_block_issue_closing: Block issue closing
label_checklist_show_closed: Kapalıları göster
label_checklist_hide_closed: Kapalıları gizle
label_checklist_new_section: Yeni kısım
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment