Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a0e3f40a7 | ||
|
|
1a71316b37 | ||
|
|
5fa087a792 | ||
|
|
425a0fe988 | ||
|
|
606762dcad | ||
|
|
07dc1e34ff | ||
|
|
1afe67bf74 | ||
|
|
f9f4591cff | ||
|
|
aa4fc1b58a | ||
|
|
8c17237638 | ||
|
|
06ab582e5d | ||
|
|
af66c42d9e | ||
|
|
655c50849d | ||
|
|
bd5b7428d8 | ||
|
|
4ed30a4495 | ||
|
|
ca39b05420 | ||
|
|
e189641e8c | ||
|
|
102dd4c11b | ||
|
|
c1d853d957 | ||
|
|
225f99377a | ||
|
|
d8cf4c57d3 | ||
|
|
4b5fa08f66 | ||
|
|
4380c0af73 |
@@ -471,7 +471,11 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def accesskey(s)
|
||||
Redmine::AccessKeys.key_for s
|
||||
@used_accesskeys ||= []
|
||||
key = Redmine::AccessKeys.key_for(s)
|
||||
return nil if @used_accesskeys.include?(key)
|
||||
@used_accesskeys << key
|
||||
key
|
||||
end
|
||||
|
||||
# Formats text according to system settings.
|
||||
@@ -758,7 +762,7 @@ module ApplicationHelper
|
||||
if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first)
|
||||
link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier},
|
||||
:class => 'changeset',
|
||||
:title => truncate_single_line(h(changeset.comments), :length => 100)
|
||||
:title => truncate_single_line(changeset.comments, :length => 100)
|
||||
end
|
||||
else
|
||||
if repository && User.current.allowed_to?(:browse_repository, project)
|
||||
|
||||
@@ -29,6 +29,30 @@ module QueriesHelper
|
||||
end
|
||||
end
|
||||
|
||||
def query_filters_hidden_tags(query)
|
||||
tags = ''.html_safe
|
||||
query.filters.each do |field, options|
|
||||
tags << hidden_field_tag("f[]", field, :id => nil)
|
||||
tags << hidden_field_tag("op[#{field}]", options[:operator], :id => nil)
|
||||
options[:values].each do |value|
|
||||
tags << hidden_field_tag("v[#{field}][]", value, :id => nil)
|
||||
end
|
||||
end
|
||||
tags
|
||||
end
|
||||
|
||||
def query_columns_hidden_tags(query)
|
||||
tags = ''.html_safe
|
||||
query.columns.each do |column|
|
||||
tags << hidden_field_tag("c[]", column.name, :id => nil)
|
||||
end
|
||||
tags
|
||||
end
|
||||
|
||||
def query_hidden_tags(query)
|
||||
query_filters_hidden_tags(query) + query_columns_hidden_tags(query)
|
||||
end
|
||||
|
||||
def available_block_columns_tags(query)
|
||||
tags = ''.html_safe
|
||||
query.available_block_columns.each do |column|
|
||||
|
||||
@@ -859,10 +859,14 @@ class Issue < ActiveRecord::Base
|
||||
dependencies = []
|
||||
dependencies += relations_from.map(&:issue_to)
|
||||
dependencies += children unless leaf?
|
||||
dependencies << parent
|
||||
dependencies.compact!
|
||||
dependencies -= except
|
||||
dependencies + dependencies.map {|issue| issue.all_dependent_issues(except)}.flatten
|
||||
dependencies += dependencies.map {|issue| issue.all_dependent_issues(except)}.flatten
|
||||
if parent
|
||||
dependencies << parent
|
||||
dependencies += parent.all_dependent_issues(except + parent.descendants)
|
||||
end
|
||||
dependencies
|
||||
end
|
||||
|
||||
# Returns an array of issues that duplicate this one
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<%= form_tag(params.slice(:project_id, :issue_id).merge(:format => 'csv', :page=>nil), :method => :get, :id => 'csv-export-form') do %>
|
||||
<%= query_hidden_tags @query %>
|
||||
<p>
|
||||
<label><%= radio_button_tag 'columns', '', true %> <%= l(:description_selected_columns) %></label><br />
|
||||
<label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# Lithuanian translations for Ruby on Rails
|
||||
# by Laurynas Butkus (laurynas.butkus@gmail.com)
|
||||
# Redmine translation by Gediminas Muižis gediminas.muizis@gmail.com
|
||||
# and Sergej Jegorov sergej.jegorov@gmail.com
|
||||
# and Gytis Gurklys gytis.gurklys@gmail.com
|
||||
# and Sergej Jegorov sergej.jegorov@gmail.com
|
||||
# and Gytis Gurklys gytis.gurklys@gmail.com
|
||||
# and Andrius Kriučkovas andrius.kriuckovas@gmail.com
|
||||
|
||||
lt:
|
||||
direction: ltr
|
||||
date:
|
||||
@@ -228,8 +230,8 @@ lt:
|
||||
notice_default_data_loaded: Numatytoji konfiguracija sėkmingai užkrauta.
|
||||
notice_unable_delete_version: Neįmanoma panaikinti versiją.
|
||||
notice_unable_delete_time_entry: Neįmano ištrinti laiko žurnalo įrašą.
|
||||
notice_issue_done_ratios_updated: Issue done ratios updated.
|
||||
notice_gantt_chart_truncated: The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})
|
||||
notice_issue_done_ratios_updated: Problemos baigtumo rodikliai atnaujinti.
|
||||
notice_gantt_chart_truncated: Grafikas buvo sutrumpintas, kadangi jis viršija maksimalų (%{max}) leistinų atvaizduoti elementų kiekį
|
||||
notice_issue_successful_create: Darbas %{id} sukurtas.
|
||||
|
||||
error_can_t_load_default_data: "Numatytoji konfiguracija negali būti užkrauta: %{value}"
|
||||
@@ -241,15 +243,16 @@ lt:
|
||||
error_no_tracker_in_project: 'Joks pėdsekys nesusietas su šiuo projektu. Prašom patikrinti Projekto nustatymus.'
|
||||
error_no_default_issue_status: Nenustatyta numatytoji darbų būsena. Prašome patikrinti konfigūravimą ("Administravimas -> Darbų būsenos").
|
||||
error_can_not_delete_custom_field: Negalima ištrinti kliento lauko
|
||||
error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted."
|
||||
error_can_not_remove_role: "This role is in use and cannot be deleted."
|
||||
error_can_not_delete_tracker: "Šis pėdsekys turi įrašus ir todėl negali būti ištrintas."
|
||||
error_can_not_remove_role: "Ši rolė yra naudojama ir negali būti ištrinta."
|
||||
error_can_not_reopen_issue_on_closed_version: Uždarytai versijai priskirtas darbas negali būti atnaujintas.
|
||||
error_can_not_archive_project: Šio projekto negalima suarchyvuoti
|
||||
error_issue_done_ratios_not_updated: "Issue done ratios not updated."
|
||||
error_workflow_copy_source: 'Please select a source tracker or role'
|
||||
error_workflow_copy_target: 'Please select target tracker(s) and role(s)'
|
||||
error_issue_done_ratios_not_updated: "Įrašo baigtumo rodikliai nebuvo atnaujinti. "
|
||||
error_workflow_copy_source: 'Prašome pasirinkti pirminį šaltinio seklį arba rolę'
|
||||
error_workflow_copy_target: 'Prašome pasirinkti galutinį paskirties seklį(-ius) arba rolę(-s)'
|
||||
error_unable_delete_issue_status: 'Negalima ištrinti darbo statuso'
|
||||
error_unable_to_connect: Negalima prisijungti (%{value})
|
||||
error_attachment_too_big: "Ši byla negali būti įkelta, nes viršija maksimalią (%{max_size}) leistiną bylos apimtį"
|
||||
error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})"
|
||||
warning_attachments_not_saved: "%{count} byla(ų) negali būti išsaugota."
|
||||
|
||||
@@ -431,7 +434,7 @@ lt:
|
||||
setting_cache_formatted_text: Paslėpti formatuotą tekstą
|
||||
setting_default_notification_option: Numatytosios pranešimų nuostatos
|
||||
setting_commit_logtime_enabled: Įjungti laiko registravimą
|
||||
setting_commit_logtime_activity_id: Activity for logged time
|
||||
setting_commit_logtime_activity_id: Laiko įrašų veikla
|
||||
setting_gantt_items_limit: Maksimalus rodmenų skaičius rodomas Gantt'o grafike
|
||||
setting_issue_group_assignment: Leisti darbo priskirimą grupėms
|
||||
setting_default_issue_start_date_to_creation_date: Naudoti dabartinę datą kaip naujų darbų pradžios datą
|
||||
@@ -877,8 +880,8 @@ lt:
|
||||
label_issues_visibility_public: Visi vieši darbai
|
||||
label_issues_visibility_own: Darbai, sukurti vartotojo arba jam priskirti
|
||||
label_git_report_last_commit: Nurodyti paskutinį failų ir katalogų pakeitimą
|
||||
label_parent_revision: Parent
|
||||
label_child_revision: Child
|
||||
label_parent_revision: Pirminė revizija
|
||||
label_child_revision: Sekanti revizija
|
||||
label_export_options: "%{export_format} eksportavimo nustatymai"
|
||||
|
||||
button_login: Registruotis
|
||||
@@ -991,20 +994,19 @@ lt:
|
||||
text_enumeration_destroy_question: "%{count} objektai(ų) priskirti šiai reikšmei."
|
||||
text_enumeration_category_reassign_to: 'Priskirti juos šiai reikšmei:'
|
||||
text_email_delivery_not_configured: "El.pašto siuntimas nesukonfigūruotas, ir perspėjimai neaktyvus.\nSukonfigūruokite savo SMTP serverį byloje config/configuration.yml ir perleiskite programą norėdami pritaikyti pakeitimus."
|
||||
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
|
||||
text_repository_usernames_mapping: "Parinkite ar atnaujinkite Redmine vartotoją, kuris paminėtas saugyklos log'e.\nVartotojai, turintys tą patį Redmine ir saugyklos vardą ar el.paštą yra automatiškai surišti."
|
||||
text_diff_truncated: "... Šis diff'as nukarpytas, nes jis viršijo maksimalų rodomų eilučių skaičių."
|
||||
text_custom_field_possible_values_info: 'Po vieną eilutę kiekvienai reikšmei'
|
||||
text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?"
|
||||
text_wiki_page_destroy_question: "Šis puslapis turi %{descendants} susijusių arba išvestinių puslapių. Ką norėtumėte daryti?"
|
||||
text_wiki_page_nullify_children: Laikyti child puslapius kaip pagrindinius puslapius
|
||||
text_wiki_page_destroy_children: "Pašalinti child puslapius ir jų palikuonis"
|
||||
text_wiki_page_reassign_children: "Priskirkite iš naujo 'child' puslapius šiam pagrindiniam puslapiui"
|
||||
text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?"
|
||||
text_own_membership_delete_confirmation: "Jūs esate pasiruošęs panaikinti dalį arba visus leidimus ir po šio pakeitimo galite prarasti šio projekto redagavimo galimybę. \n Ar jūs esate įsitikinęs ir tęsti?"
|
||||
text_zoom_in: Priartinti
|
||||
text_zoom_out: Nutolinti
|
||||
text_warn_on_leaving_unsaved: "Dabartinis puslapis turi neišsaugoto teksto, kuris bus prarastas, jeigu paliksite šį puslapį."
|
||||
text_scm_path_encoding_note: "Numatytasis: UTF-8"
|
||||
text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo)
|
||||
text_git_repository_note: Saugykla (repository) yra plika ir vietinė (pvz. /gitrepo, c:\gitrepo)
|
||||
text_mercurial_repository_note: Vietinė saugykla (e.g. /hgrepo, c:\hgrepo)
|
||||
text_scm_command: Komanda
|
||||
text_scm_command_version: Versija
|
||||
@@ -1069,7 +1071,7 @@ lt:
|
||||
label_completed_versions: Užbaigtos versijos
|
||||
text_project_identifier_info: Leidžiamos tik mažosios raidės (a-z), skaitmenys, brūkšneliai ir pabraukimo simboliai.<br />Kartą išsaugojus pakeitimai negalimi
|
||||
field_multiple: Keletas reikšmių
|
||||
setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
|
||||
setting_commit_cross_project_ref: Leisti visų kitų projektų įrašus susieti nuorodomis ir sutaisyti
|
||||
text_issue_conflict_resolution_add_notes: Išsaugoti mano žinutę ir atmesti likusius mano pataisymus
|
||||
text_issue_conflict_resolution_overwrite: Išsaugoti mano pakeitimus (ankstesnių pakeitimų žinutės bus išsaugotos, tačiau kai kurie pakeitimai bus perrašyti)
|
||||
notice_issue_update_conflict: Darbas buvo pakoreguotas kito vartotojo kol jūs atlikote pakeitimus.
|
||||
@@ -1131,18 +1133,17 @@ lt:
|
||||
setting_non_working_week_days: Nedarbo dienos
|
||||
label_in_the_next_days: per ateinančias
|
||||
label_in_the_past_days: per paskutines
|
||||
label_attribute_of_user: User's %{name}
|
||||
text_turning_multiple_off: If you disable multiple values, multiple values will be
|
||||
removed in order to preserve only one value per item.
|
||||
label_attribute_of_issue: Issue's %{name}
|
||||
permission_add_documents: Add documents
|
||||
permission_edit_documents: Edit documents
|
||||
permission_delete_documents: Delete documents
|
||||
label_gantt_progress_line: Progress line
|
||||
setting_jsonp_enabled: Enable JSONP support
|
||||
field_inherit_members: Inherit members
|
||||
field_closed_on: Closed
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_attribute_of_user: Vartotojo %{name}
|
||||
text_turning_multiple_off: Jei jūs išjungsite kelių reikšmių pasirinkimą, visos išvardintos reikšmės bus pašalintos ir palikta tik viena reikšmė kiekvienam laukui.
|
||||
label_attribute_of_issue: Įrašai %{name}
|
||||
permission_add_documents: Pridėti dokumentus
|
||||
permission_edit_documents: Redaguoti dokumentus
|
||||
permission_delete_documents: Trinti dokumentus
|
||||
label_gantt_progress_line: Progreso linija
|
||||
setting_jsonp_enabled: Įgalinti JSONP palaikymą
|
||||
field_inherit_members: Paveldėti narius
|
||||
field_closed_on: Uždarytas
|
||||
setting_default_projects_tracker_ids: Sekliai pagal nutylėjimą naujiems projektams
|
||||
label_total_time: Iš viso
|
||||
text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it.
|
||||
text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel.
|
||||
text_scm_config: Jūs galite pakeisti SCM komandas byloje config/configuration.yml. Prašome perkrauti programą po redagavimo, idant įgalinti pakeitimus.
|
||||
text_scm_command_not_available: SCM komanda nepasiekiama. Patikrinkite administravimo skydelio nustatymus.
|
||||
|
||||
@@ -343,9 +343,9 @@ nl:
|
||||
one: 1 open
|
||||
other: "%{count} open"
|
||||
label_x_closed_issues_abbr:
|
||||
zero: 0 closed
|
||||
one: 1 closed
|
||||
other: "%{count} closed"
|
||||
zero: 0 gesloten
|
||||
one: 1 gesloten
|
||||
other: "%{count} gesloten"
|
||||
label_comment: Commentaar
|
||||
label_comment_add: Voeg commentaar toe
|
||||
label_comment_added: Commentaar toegevoegd
|
||||
@@ -1022,7 +1022,7 @@ nl:
|
||||
text_project_closed: Dit project is gesloten en op alleen-lezen
|
||||
notice_user_successful_create: Gebruiker %{id} aangemaakt.
|
||||
field_core_fields: Standaard verleden
|
||||
field_timeout: Timeout (in seconds)
|
||||
field_timeout: Timeout (in seconden)
|
||||
setting_thumbnails_enabled: Geef bijlage miniaturen weer
|
||||
setting_thumbnails_size: Grootte miniaturen (in pixels)
|
||||
label_status_transitions: Status transitie
|
||||
@@ -1036,36 +1036,35 @@ nl:
|
||||
label_attribute_of_assigned_to: Toegewezen %{name}
|
||||
label_attribute_of_fixed_version: Target versions %{name}
|
||||
label_copy_subtasks: Kopieer subtaken
|
||||
label_copied_to: copied to
|
||||
label_copied_from: copied from
|
||||
label_copied_to: gekopieerd naar
|
||||
label_copied_from: gekopieerd van
|
||||
label_any_issues_in_project: any issues in project
|
||||
label_any_issues_not_in_project: any issues not in project
|
||||
field_private_notes: Private notes
|
||||
permission_view_private_notes: View private notes
|
||||
permission_set_notes_private: Set notes as private
|
||||
label_no_issues_in_project: no issues in project
|
||||
field_private_notes: Privé notities
|
||||
permission_view_private_notes: Bekijk privé notities
|
||||
permission_set_notes_private: Maak notities privé
|
||||
label_no_issues_in_project: geen issues in project
|
||||
label_any: alle
|
||||
label_last_n_weeks: last %{count} weeks
|
||||
setting_cross_project_subtasks: Allow cross-project subtasks
|
||||
label_last_n_weeks: afgelopen %{count} weken
|
||||
setting_cross_project_subtasks: Sta subtaken in andere projecten toe
|
||||
label_cross_project_descendants: Met subprojecten
|
||||
label_cross_project_tree: Met project boom
|
||||
label_cross_project_hierarchy: Met project hiërarchie
|
||||
label_cross_project_system: Met alle projecten
|
||||
button_hide: Hide
|
||||
setting_non_working_week_days: Non-working days
|
||||
label_in_the_next_days: in the next
|
||||
label_in_the_past_days: in the past
|
||||
button_hide: Verberg
|
||||
setting_non_working_week_days: Niet-werkdagen
|
||||
label_in_the_next_days: in de volgende
|
||||
label_in_the_past_days: in de afgelopen
|
||||
label_attribute_of_user: User's %{name}
|
||||
text_turning_multiple_off: If you disable multiple values, multiple values will be
|
||||
removed in order to preserve only one value per item.
|
||||
text_turning_multiple_off: Bij het uitschakelen van meerdere waardes zal er maar een waarde bewaard blijven.
|
||||
label_attribute_of_issue: Issue's %{name}
|
||||
permission_add_documents: Add documents
|
||||
permission_edit_documents: Edit documents
|
||||
permission_delete_documents: Delete documents
|
||||
label_gantt_progress_line: Progress line
|
||||
setting_jsonp_enabled: Enable JSONP support
|
||||
field_inherit_members: Inherit members
|
||||
field_closed_on: Closed
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
permission_add_documents: Voeg documenten toe
|
||||
permission_edit_documents: Bewerk documenten
|
||||
permission_delete_documents: Verwijder documenten
|
||||
label_gantt_progress_line: Voortgangslijn
|
||||
setting_jsonp_enabled: Schakel JSONP support in
|
||||
field_inherit_members: Neem leden over
|
||||
field_closed_on: Gesloten
|
||||
setting_default_projects_tracker_ids: Standaard trackers voor nieuwe projecten
|
||||
label_total_time: Totaal
|
||||
setting_emails_header: Email header
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
"zh-TW":
|
||||
direction: ltr
|
||||
jquery:
|
||||
locale: "zh-TW"
|
||||
date:
|
||||
formats:
|
||||
# Use the strftime parameters for formats.
|
||||
@@ -483,6 +485,7 @@
|
||||
setting_thumbnails_size: "縮圖大小 (單位: 像素 pixels)"
|
||||
setting_non_working_week_days: 非工作日
|
||||
setting_jsonp_enabled: 啟用 JSONP 支援
|
||||
setting_default_projects_tracker_ids: 新專案預設使用的追蹤標籤
|
||||
|
||||
permission_add_project: 建立專案
|
||||
permission_add_subprojects: 建立子專案
|
||||
@@ -1165,5 +1168,4 @@
|
||||
description_date_from: 輸入起始日期
|
||||
description_date_to: 輸入結束日期
|
||||
text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
|
||||
setting_default_projects_tracker_ids: Default trackers for new projects
|
||||
label_total_time: 總計
|
||||
|
||||
@@ -4,6 +4,25 @@ Redmine - project management software
|
||||
Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
http://www.redmine.org/
|
||||
|
||||
== 2013-05-01 v2.3.1
|
||||
|
||||
* Defect #12650: Lost text after selection in issue list with IE
|
||||
* Defect #12684: Hotkey for Issue-Edit doesn't work as expected
|
||||
* Defect #13405: Commit link title is escaped twice when using "commit:" prefix
|
||||
* Defect #13541: Can't access SCM when log/production.scm.stderr.log is not writable
|
||||
* Defect #13579: Datepicker uses Simplified Chinese in Traditional Chinese locale
|
||||
* Defect #13584: Missing Portuguese jQuery UI date picker
|
||||
* Defect #13586: Circular loop testing prevents precedes/follows relation between subtasks
|
||||
* Defect #13618: CSV export of spent time ignores filters and columns selection
|
||||
* Defect #13630: PDF export generates the issue id twice
|
||||
* Defect #13644: Diff - Internal Error
|
||||
* Defect #13712: Fix email rake tasks to also support no_account_notice and default_group options
|
||||
* Defect #13811: Broken javascript in IE7 ; recurrence of #12195
|
||||
* Defect #13823: Trailing comma in javascript files
|
||||
* Patch #13531: Traditional Chinese translation for 2.3-stable
|
||||
* Patch #13552: Dutch translations for 2.3-stable
|
||||
* Patch #13678: Lithuanian translation for 2.3-stable
|
||||
|
||||
== 2013-03-19 v2.3.0
|
||||
|
||||
* Defect #3107: Issue with two digit year on Logtime
|
||||
|
||||
@@ -7,7 +7,7 @@ http://www.redmine.org/
|
||||
|
||||
== Requirements
|
||||
|
||||
* Ruby 1.8.7, 1.9.2 or 1.9.3
|
||||
* Ruby 1.8.7, 1.9.2, 1.9.3 or 2.0.0
|
||||
* RubyGems
|
||||
* Bundler >= 1.0.21
|
||||
|
||||
@@ -15,6 +15,7 @@ http://www.redmine.org/
|
||||
* MySQL (tested with MySQL 5.1)
|
||||
* PostgreSQL (tested with PostgreSQL 9.1)
|
||||
* SQLite3 (tested with SQLite 3.7)
|
||||
* SQLServer (tested with SQLServer 2012)
|
||||
|
||||
Optional:
|
||||
* SCM binaries (e.g. svn, git...), for repository browsing (must be available in PATH)
|
||||
@@ -39,6 +40,12 @@ Optional:
|
||||
of the rmagick gem using:
|
||||
bundle install --without development test rmagick
|
||||
|
||||
Only the gems that are needed by the adapters you've specified in your database
|
||||
configuration file are actually installed (eg. if your config/database.yml
|
||||
uses the 'mysql2' adapter, then only the mysql2 gem will be installed). Don't
|
||||
forget to re-run `bundle install` when you change config/database.yml for using
|
||||
other database adapters.
|
||||
|
||||
If you need to load some gems that are not required by Redmine core (eg. fcgi),
|
||||
you can create a file named Gemfile.local at the root of your redmine directory.
|
||||
It will be loaded automatically when running `bundle install`.
|
||||
|
||||
@@ -380,7 +380,7 @@ module Redmine
|
||||
col_width
|
||||
end
|
||||
|
||||
def render_table_header(pdf, query, col_width, row_height, col_id_width, table_width)
|
||||
def render_table_header(pdf, query, col_width, row_height, table_width)
|
||||
# headers
|
||||
pdf.SetFontStyle('B',8)
|
||||
pdf.SetFillColor(230, 230, 230)
|
||||
@@ -389,13 +389,12 @@ module Redmine
|
||||
base_x = pdf.GetX
|
||||
base_y = pdf.GetY
|
||||
max_height = issues_to_pdf_write_cells(pdf, query.inline_columns, col_width, row_height, true)
|
||||
pdf.Rect(base_x, base_y, table_width + col_id_width, max_height, 'FD');
|
||||
pdf.Rect(base_x, base_y, table_width, max_height, 'FD');
|
||||
pdf.SetXY(base_x, base_y);
|
||||
|
||||
# write the cells on page
|
||||
pdf.RDMCell(col_id_width, row_height, "#", "T", 0, 'C', 1)
|
||||
issues_to_pdf_write_cells(pdf, query.inline_columns, col_width, row_height, true)
|
||||
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_id_width, col_width)
|
||||
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_width)
|
||||
pdf.SetY(base_y + max_height);
|
||||
|
||||
# rows
|
||||
@@ -417,22 +416,22 @@ module Redmine
|
||||
# Landscape A4 = 210 x 297 mm
|
||||
page_height = 210
|
||||
page_width = 297
|
||||
left_margin = 10
|
||||
right_margin = 10
|
||||
bottom_margin = 20
|
||||
col_id_width = 10
|
||||
row_height = 4
|
||||
|
||||
# column widths
|
||||
table_width = page_width - right_margin - 10 # fixed left margin
|
||||
table_width = page_width - right_margin - left_margin
|
||||
col_width = []
|
||||
unless query.inline_columns.empty?
|
||||
col_width = calc_col_width(issues, query, table_width - col_id_width, pdf)
|
||||
col_width = calc_col_width(issues, query, table_width, pdf)
|
||||
table_width = col_width.inject(0) {|s,v| s += v}
|
||||
end
|
||||
|
||||
# use full width if the description is displayed
|
||||
# use full width if the description is displayed
|
||||
if table_width > 0 && query.has_column?(:description)
|
||||
col_width = col_width.map {|w| w = w * (page_width - right_margin - 10 - col_id_width) / table_width}
|
||||
col_width = col_width.map {|w| w * (page_width - right_margin - left_margin) / table_width}
|
||||
table_width = col_width.inject(0) {|s,v| s += v}
|
||||
end
|
||||
|
||||
@@ -440,7 +439,7 @@ module Redmine
|
||||
pdf.SetFontStyle('B',11)
|
||||
pdf.RDMCell(190,10, title)
|
||||
pdf.Ln
|
||||
render_table_header(pdf, query, col_width, row_height, col_id_width, table_width)
|
||||
render_table_header(pdf, query, col_width, row_height, table_width)
|
||||
previous_group = false
|
||||
issue_list(issues) do |issue, level|
|
||||
if query.grouped? &&
|
||||
@@ -449,7 +448,7 @@ module Redmine
|
||||
group_label = group.blank? ? 'None' : group.to_s.dup
|
||||
group_label << " (#{query.issue_count_by_group[group]})"
|
||||
pdf.Bookmark group_label, 0, -1
|
||||
pdf.RDMCell(table_width + col_id_width, row_height * 2, group_label, 1, 1, 'L')
|
||||
pdf.RDMCell(table_width, row_height * 2, group_label, 1, 1, 'L')
|
||||
pdf.SetFontStyle('',8)
|
||||
previous_group = group
|
||||
end
|
||||
@@ -468,15 +467,14 @@ module Redmine
|
||||
space_left = page_height - base_y - bottom_margin
|
||||
if max_height > space_left
|
||||
pdf.AddPage("L")
|
||||
render_table_header(pdf, query, col_width, row_height, col_id_width, table_width)
|
||||
render_table_header(pdf, query, col_width, row_height, table_width)
|
||||
base_x = pdf.GetX
|
||||
base_y = pdf.GetY
|
||||
end
|
||||
|
||||
# write the cells on page
|
||||
pdf.RDMCell(col_id_width, row_height, issue.id.to_s, "T", 0, 'C', 1)
|
||||
issues_to_pdf_write_cells(pdf, col_values, col_width, row_height)
|
||||
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_id_width, col_width)
|
||||
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_width)
|
||||
pdf.SetY(base_y + max_height);
|
||||
|
||||
if query.has_column?(:description) && issue.description?
|
||||
@@ -513,9 +511,8 @@ module Redmine
|
||||
end
|
||||
|
||||
# Draw lines to close the row (MultiCell border drawing in not uniform)
|
||||
def issues_to_pdf_draw_borders(pdf, top_x, top_y, lower_y,
|
||||
id_width, col_widths)
|
||||
col_x = top_x + id_width
|
||||
def issues_to_pdf_draw_borders(pdf, top_x, top_y, lower_y, col_widths)
|
||||
col_x = top_x
|
||||
pdf.Line(col_x, top_y, col_x, lower_y) # id right border
|
||||
col_widths.each do |width|
|
||||
col_x += width
|
||||
|
||||
@@ -219,18 +219,39 @@ module Redmine
|
||||
end
|
||||
|
||||
# Path to the file where scm stderr output is logged
|
||||
# Returns nil if the log file is not writable
|
||||
def self.stderr_log_file
|
||||
@stderr_log_path ||=
|
||||
Redmine::Configuration['scm_stderr_log_file'].presence ||
|
||||
Rails.root.join("log/#{Rails.env}.scm.stderr.log").to_s
|
||||
if @stderr_log_file.nil?
|
||||
writable = false
|
||||
path = Redmine::Configuration['scm_stderr_log_file'].presence
|
||||
path ||= Rails.root.join("log/#{Rails.env}.scm.stderr.log").to_s
|
||||
if File.exists?(path)
|
||||
if File.file?(path) && File.writable?(path)
|
||||
writable = true
|
||||
else
|
||||
logger.warn("SCM log file (#{path}) is not writable")
|
||||
end
|
||||
else
|
||||
begin
|
||||
File.open(path, "w") {}
|
||||
writable = true
|
||||
rescue => e
|
||||
logger.warn("SCM log file (#{path}) cannot be created: #{e.message}")
|
||||
end
|
||||
end
|
||||
@stderr_log_file = writable ? path : false
|
||||
end
|
||||
@stderr_log_file || nil
|
||||
end
|
||||
|
||||
def self.shellout(cmd, options = {}, &block)
|
||||
if logger && logger.debug?
|
||||
logger.debug "Shelling out: #{strip_credential(cmd)}"
|
||||
# Capture stderr in a log file
|
||||
if stderr_log_file
|
||||
cmd = "#{cmd} 2>>#{shell_quote(stderr_log_file)}"
|
||||
end
|
||||
end
|
||||
# Capture stderr in a log file
|
||||
cmd = "#{cmd} 2>>#{shell_quote(stderr_log_file)}"
|
||||
begin
|
||||
mode = "r+"
|
||||
IO.popen(cmd, mode) do |io|
|
||||
|
||||
@@ -199,15 +199,19 @@ module Redmine
|
||||
while starting < max && line_left[starting] == line_right[starting]
|
||||
starting += 1
|
||||
end
|
||||
while line_left[starting].ord.between?(128, 191) && starting > 0
|
||||
starting -= 1
|
||||
if (! "".respond_to?(:force_encoding)) && starting < line_left.size
|
||||
while line_left[starting].ord.between?(128, 191) && starting > 0
|
||||
starting -= 1
|
||||
end
|
||||
end
|
||||
ending = -1
|
||||
while ending >= -(max - starting) && line_left[ending] == line_right[ending]
|
||||
ending -= 1
|
||||
end
|
||||
while line_left[ending].ord.between?(128, 191) && ending > -1
|
||||
ending -= 1
|
||||
if (! "".respond_to?(:force_encoding)) && ending > (-1 * line_left.size)
|
||||
while line_left[ending].ord.between?(128, 191) && ending > -1
|
||||
ending -= 1
|
||||
end
|
||||
end
|
||||
unless starting == 0 && ending == -1
|
||||
[starting, ending]
|
||||
|
||||
@@ -4,7 +4,7 @@ module Redmine
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 2
|
||||
MINOR = 3
|
||||
TINY = 0
|
||||
TINY = 1
|
||||
|
||||
# Branch values:
|
||||
# * official release: nil
|
||||
|
||||
@@ -29,6 +29,8 @@ General options:
|
||||
create: create a user account
|
||||
no_permission_check=1 disable permission checking when receiving
|
||||
the email
|
||||
no_account_notice=1 disable new user account notification
|
||||
default_group=foo,bar adds created user to foo and bar groups
|
||||
|
||||
Issue attributes control options:
|
||||
project=PROJECT identifier of the target project
|
||||
@@ -58,6 +60,8 @@ END_DESC
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
MailHandler.receive(STDIN.read, options)
|
||||
end
|
||||
@@ -73,6 +77,8 @@ General options:
|
||||
create: create a user account
|
||||
no_permission_check=1 disable permission checking when receiving
|
||||
the email
|
||||
no_account_notice=1 disable new user account notification
|
||||
default_group=foo,bar adds created user to foo and bar groups
|
||||
|
||||
Available IMAP options:
|
||||
host=HOST IMAP server host (default: 127.0.0.1)
|
||||
@@ -129,6 +135,8 @@ END_DESC
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
Redmine::IMAP.check(imap_options, options)
|
||||
end
|
||||
@@ -162,6 +170,8 @@ END_DESC
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
Redmine::POP3.check(pop_options, options)
|
||||
end
|
||||
|
||||
@@ -14,12 +14,12 @@ function toggleCheckboxesBySelector(selector) {
|
||||
$(selector).each(function(index) {
|
||||
if (!$(this).is(':checked')) { all_checked = false; }
|
||||
});
|
||||
$(selector).attr('checked', !all_checked)
|
||||
$(selector).attr('checked', !all_checked);
|
||||
}
|
||||
|
||||
function showAndScrollTo(id, focus) {
|
||||
$('#'+id).show();
|
||||
if (focus!=null) {
|
||||
if (focus !== null) {
|
||||
$('#'+focus).focus();
|
||||
}
|
||||
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
|
||||
@@ -131,10 +131,10 @@ function buildFilterRow(field, operator, values) {
|
||||
select = tr.find('td.operator select');
|
||||
for (i=0;i<operators.length;i++){
|
||||
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]);
|
||||
if (operators[i] == operator) {option.attr('selected', true)};
|
||||
if (operators[i] == operator) { option.attr('selected', true); }
|
||||
select.append(option);
|
||||
}
|
||||
select.change(function(){toggleOperator(field)});
|
||||
select.change(function(){ toggleOperator(field); });
|
||||
|
||||
switch (filterOptions['type']){
|
||||
case "list":
|
||||
@@ -146,7 +146,7 @@ function buildFilterRow(field, operator, values) {
|
||||
' <span class="toggle-multiselect"> </span></span>'
|
||||
);
|
||||
select = tr.find('td.values select');
|
||||
if (values.length > 1) {select.attr('multiple', true)};
|
||||
if (values.length > 1) { select.attr('multiple', true); }
|
||||
for (i=0;i<filterValues.length;i++){
|
||||
var filterValue = filterValues[i];
|
||||
var option = $('<option>');
|
||||
@@ -189,7 +189,7 @@ function buildFilterRow(field, operator, values) {
|
||||
var filterValue = allProjects[i];
|
||||
var option = $('<option>');
|
||||
option.val(filterValue[1]).text(filterValue[0]);
|
||||
if (values[0] == filterValue[1]) {option.attr('selected', true)};
|
||||
if (values[0] == filterValue[1]) { option.attr('selected', true); }
|
||||
select.append(option);
|
||||
}
|
||||
case "integer":
|
||||
@@ -352,7 +352,7 @@ function setPredecessorFieldsVisibility() {
|
||||
|
||||
function showModal(id, width) {
|
||||
var el = $('#'+id).first();
|
||||
if (el.length == 0 || el.is(':visible')) {return;}
|
||||
if (el.length === 0 || el.is(':visible')) {return;}
|
||||
var title = el.find('h3.title').text();
|
||||
el.dialog({
|
||||
width: width,
|
||||
@@ -462,7 +462,7 @@ function observeAutocompleteField(fieldId, url, options) {
|
||||
source: url,
|
||||
minLength: 2,
|
||||
search: function(){$('#'+fieldId).addClass('ajax-loading');},
|
||||
response: function(){$('#'+fieldId).removeClass('ajax-loading');},
|
||||
response: function(){$('#'+fieldId).removeClass('ajax-loading');}
|
||||
}, options));
|
||||
$('#'+fieldId).addClass('autocomplete');
|
||||
});
|
||||
@@ -546,13 +546,13 @@ function warnLeavingUnsaved(message) {
|
||||
});
|
||||
if (warn) {return warnLeavingUnsavedMessage;}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function setupAjaxIndicator() {
|
||||
|
||||
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
|
||||
|
||||
if ($('.ajax-loading').length == 0 && settings.contentType != 'application/octet-stream') {
|
||||
if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
|
||||
$('#ajax-indicator').show();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -186,7 +186,7 @@ function contextMenuCheckSelectionBox(tr, checked) {
|
||||
function contextMenuClearDocumentSelection() {
|
||||
// TODO
|
||||
if (document.selection) {
|
||||
document.selection.clear(); // IE
|
||||
document.selection.empty(); // IE
|
||||
} else {
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ function drawRelations() {
|
||||
.attr({stroke: "none",
|
||||
fill: color,
|
||||
"stroke-linecap": "butt",
|
||||
"stroke-linejoin": "miter",
|
||||
"stroke-linejoin": "miter"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
22
public/javascripts/i18n/jquery.ui.datepicker-pt.js
vendored
Normal file
22
public/javascripts/i18n/jquery.ui.datepicker-pt.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['pt'] = {
|
||||
closeText: 'Fechar',
|
||||
prevText: '<Anterior',
|
||||
nextText: 'Seguinte',
|
||||
currentText: 'Hoje',
|
||||
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
||||
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
||||
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
||||
'Jul','Ago','Set','Out','Nov','Dez'],
|
||||
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
||||
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
||||
weekHeader: 'Sem',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 0,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['pt']);
|
||||
});
|
||||
@@ -9,8 +9,8 @@ jsToolBar.strings['Heading 2'] = 'Heading 2';
|
||||
jsToolBar.strings['Heading 3'] = 'Heading 3';
|
||||
jsToolBar.strings['Unordered list'] = 'Nenumeruotas sąrašas';
|
||||
jsToolBar.strings['Ordered list'] = 'Numeruotas sąrašas';
|
||||
jsToolBar.strings['Quote'] = 'Quote';
|
||||
jsToolBar.strings['Unquote'] = 'Remove Quote';
|
||||
jsToolBar.strings['Quote'] = 'Cituoti';
|
||||
jsToolBar.strings['Unquote'] = 'Pašalinti citavimą';
|
||||
jsToolBar.strings['Preformatted text'] = 'Preformatuotas tekstas';
|
||||
jsToolBar.strings['Wiki link'] = 'Nuoroda į Wiki puslapį';
|
||||
jsToolBar.strings['Image'] = 'Paveikslas';
|
||||
|
||||
@@ -43,7 +43,7 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {
|
||||
revisionGraph.circle(x, y, 3)
|
||||
.attr({
|
||||
fill: colors[commit.space],
|
||||
stroke: 'none',
|
||||
stroke: 'none'
|
||||
}).toFront();
|
||||
// paths to parents
|
||||
$.each(commit.parent_scmids, function(index, parent_scmid) {
|
||||
|
||||
3
test/fixtures/changesets.yml
vendored
3
test/fixtures/changesets.yml
vendored
@@ -3,8 +3,9 @@ changesets_001:
|
||||
commit_date: 2007-04-11
|
||||
committed_on: 2007-04-11 15:14:44 +02:00
|
||||
revision: 1
|
||||
scmid: 691322a8eb01e11fd7
|
||||
id: 100
|
||||
comments: My very first commit
|
||||
comments: 'My very first commit do not escaping #<>&'
|
||||
repository_id: 10
|
||||
committer: dlopper
|
||||
user_id: 3
|
||||
|
||||
7
test/fixtures/diffs/issue-13644-1.diff
vendored
Normal file
7
test/fixtures/diffs/issue-13644-1.diff
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
--- a.txt 2013-04-05 14:19:39.000000000 +0900
|
||||
+++ b.txt 2013-04-05 14:19:51.000000000 +0900
|
||||
@@ -1,3 +1,3 @@
|
||||
aaaa
|
||||
-日本
|
||||
+日本語
|
||||
bbbb
|
||||
7
test/fixtures/diffs/issue-13644-2.diff
vendored
Normal file
7
test/fixtures/diffs/issue-13644-2.diff
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
--- a.txt 2013-04-05 14:19:39.000000000 +0900
|
||||
+++ b.txt 2013-04-05 14:19:51.000000000 +0900
|
||||
@@ -1,3 +1,3 @@
|
||||
aaaa
|
||||
-日本
|
||||
+にっぽん日本
|
||||
bbbb
|
||||
@@ -548,6 +548,46 @@ class TimelogControllerTest < ActionController::TestCase
|
||||
assert assigns(:items).first.is_a?(TimeEntry)
|
||||
end
|
||||
|
||||
def test_index_at_project_level_should_include_csv_export_dialog
|
||||
get :index, :project_id => 'ecookbook',
|
||||
:f => ['spent_on'],
|
||||
:op => {'spent_on' => '>='},
|
||||
:v => {'spent_on' => ['2007-04-01']},
|
||||
:c => ['spent_on', 'user']
|
||||
assert_response :success
|
||||
|
||||
assert_select '#csv-export-options' do
|
||||
assert_select 'form[action=?][method=get]', '/projects/ecookbook/time_entries.csv' do
|
||||
# filter
|
||||
assert_select 'input[name=?][value=?]', 'f[]', 'spent_on'
|
||||
assert_select 'input[name=?][value=?]', 'op[spent_on]', '>='
|
||||
assert_select 'input[name=?][value=?]', 'v[spent_on][]', '2007-04-01'
|
||||
# columns
|
||||
assert_select 'input[name=?][value=?]', 'c[]', 'spent_on'
|
||||
assert_select 'input[name=?][value=?]', 'c[]', 'user'
|
||||
assert_select 'input[name=?]', 'c[]', 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_cross_project_should_include_csv_export_dialog
|
||||
get :index
|
||||
assert_response :success
|
||||
|
||||
assert_select '#csv-export-options' do
|
||||
assert_select 'form[action=?][method=get]', '/time_entries.csv'
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_at_issue_level_should_include_csv_export_dialog
|
||||
get :index, :project_id => 'ecookbook', :issue_id => 3
|
||||
assert_response :success
|
||||
|
||||
assert_select '#csv-export-options' do
|
||||
assert_select 'form[action=?][method=get]', '/projects/ecookbook/issues/3/time_entries.csv'
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_csv_all_projects
|
||||
Setting.date_format = '%m/%d/%Y'
|
||||
get :index, :format => 'csv'
|
||||
|
||||
@@ -85,6 +85,26 @@ class LayoutTest < ActionController::IntegrationTest
|
||||
get '/issues'
|
||||
assert_not_include "/javascripts/i18n/jquery.ui.datepicker", response.body
|
||||
end
|
||||
|
||||
with_settings :default_language => 'zh' do
|
||||
get '/issues'
|
||||
assert_include "/javascripts/i18n/jquery.ui.datepicker-zh-CN.js", response.body
|
||||
end
|
||||
|
||||
with_settings :default_language => 'zh-TW' do
|
||||
get '/issues'
|
||||
assert_include "/javascripts/i18n/jquery.ui.datepicker-zh-TW.js", response.body
|
||||
end
|
||||
|
||||
with_settings :default_language => 'pt' do
|
||||
get '/issues'
|
||||
assert_include "/javascripts/i18n/jquery.ui.datepicker-pt.js", response.body
|
||||
end
|
||||
|
||||
with_settings :default_language => 'pt-BR' do
|
||||
get '/issues'
|
||||
assert_include "/javascripts/i18n/jquery.ui.datepicker-pt-BR.js", response.body
|
||||
end
|
||||
end
|
||||
|
||||
def test_search_field_outside_project_should_link_to_global_search
|
||||
|
||||
@@ -264,11 +264,15 @@ RAW
|
||||
note_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'},
|
||||
:class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)')
|
||||
|
||||
changeset_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1},
|
||||
:class => 'changeset', :title => 'My very first commit')
|
||||
changeset_link2 = link_to('r2', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2},
|
||||
revision_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1},
|
||||
:class => 'changeset', :title => 'My very first commit do not escaping #<>&')
|
||||
revision_link2 = link_to('r2', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2},
|
||||
:class => 'changeset', :title => 'This commit fixes #1, #2 and references #1 & #3')
|
||||
|
||||
changeset_link2 = link_to('691322a8eb01e11fd7',
|
||||
{:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1},
|
||||
:class => 'changeset', :title => 'My very first commit do not escaping #<>&')
|
||||
|
||||
document_link = link_to('Test document', {:controller => 'documents', :action => 'show', :id => 1},
|
||||
:class => 'document')
|
||||
|
||||
@@ -304,10 +308,11 @@ RAW
|
||||
# should not ignore leading zero
|
||||
'#03' => '#03',
|
||||
# changesets
|
||||
'r1' => changeset_link,
|
||||
'r1.' => "#{changeset_link}.",
|
||||
'r1, r2' => "#{changeset_link}, #{changeset_link2}",
|
||||
'r1,r2' => "#{changeset_link},#{changeset_link2}",
|
||||
'r1' => revision_link,
|
||||
'r1.' => "#{revision_link}.",
|
||||
'r1, r2' => "#{revision_link}, #{revision_link2}",
|
||||
'r1,r2' => "#{revision_link},#{revision_link2}",
|
||||
'commit:691322a8eb01e11fd7' => changeset_link2,
|
||||
# documents
|
||||
'document#1' => document_link,
|
||||
'document:"Test document"' => document_link,
|
||||
|
||||
@@ -137,6 +137,19 @@ class IssueRelationTest < ActiveSupport::TestCase
|
||||
assert_include 'This relation would create a circular dependency', r.errors.full_messages
|
||||
end
|
||||
|
||||
def test_subtasks_should_allow_precedes_relation
|
||||
parent = Issue.generate!
|
||||
child1 = Issue.generate!(:parent_issue_id => parent.id)
|
||||
child2 = Issue.generate!(:parent_issue_id => parent.id)
|
||||
|
||||
r = IssueRelation.new(
|
||||
:issue_from => child1, :issue_to => child2,
|
||||
:relation_type => IssueRelation::TYPE_PRECEDES
|
||||
)
|
||||
assert r.valid?
|
||||
assert r.save
|
||||
end
|
||||
|
||||
def test_validates_circular_dependency_on_reverse_relations
|
||||
IssueRelation.delete_all
|
||||
assert IssueRelation.create!(
|
||||
|
||||
@@ -244,6 +244,70 @@ DIFF
|
||||
end
|
||||
end
|
||||
|
||||
def test_offset_range_ascii_1
|
||||
raw = <<-DIFF
|
||||
--- a.txt 2013-04-05 14:19:39.000000000 +0900
|
||||
+++ b.txt 2013-04-05 14:19:51.000000000 +0900
|
||||
@@ -1,3 +1,3 @@
|
||||
aaaa
|
||||
-abc
|
||||
+abcd
|
||||
bbbb
|
||||
DIFF
|
||||
diff = Redmine::UnifiedDiff.new(raw, :type => 'sbs')
|
||||
assert_equal 1, diff.size
|
||||
assert_equal 3, diff.first.size
|
||||
assert_equal "abc<span></span>", diff.first[1].html_line_left
|
||||
assert_equal "abc<span>d</span>", diff.first[1].html_line_right
|
||||
end
|
||||
|
||||
def test_offset_range_ascii_2
|
||||
raw = <<-DIFF
|
||||
--- a.txt 2013-04-05 14:19:39.000000000 +0900
|
||||
+++ b.txt 2013-04-05 14:19:51.000000000 +0900
|
||||
@@ -1,3 +1,3 @@
|
||||
aaaa
|
||||
-abc
|
||||
+zabc
|
||||
bbbb
|
||||
DIFF
|
||||
diff = Redmine::UnifiedDiff.new(raw, :type => 'sbs')
|
||||
assert_equal 1, diff.size
|
||||
assert_equal 3, diff.first.size
|
||||
assert_equal "<span></span>abc", diff.first[1].html_line_left
|
||||
assert_equal "<span>z</span>abc", diff.first[1].html_line_right
|
||||
end
|
||||
|
||||
def test_offset_range_japanese_1
|
||||
ja1 = "\xe6\x97\xa5\xe6\x9c\xac<span></span>"
|
||||
ja1.force_encoding('UTF-8') if ja1.respond_to?(:force_encoding)
|
||||
ja2 = "\xe6\x97\xa5\xe6\x9c\xac<span>\xe8\xaa\x9e</span>"
|
||||
ja2.force_encoding('UTF-8') if ja2.respond_to?(:force_encoding)
|
||||
with_settings :repositories_encodings => '' do
|
||||
diff = Redmine::UnifiedDiff.new(
|
||||
read_diff_fixture('issue-13644-1.diff'), :type => 'sbs')
|
||||
assert_equal 1, diff.size
|
||||
assert_equal 3, diff.first.size
|
||||
assert_equal ja1, diff.first[1].html_line_left
|
||||
assert_equal ja2, diff.first[1].html_line_right
|
||||
end
|
||||
end
|
||||
|
||||
def test_offset_range_japanese_2
|
||||
ja1 = "<span></span>\xe6\x97\xa5\xe6\x9c\xac"
|
||||
ja1.force_encoding('UTF-8') if ja1.respond_to?(:force_encoding)
|
||||
ja2 = "<span>\xe3\x81\xab\xe3\x81\xa3\xe3\x81\xbd\xe3\x82\x93</span>\xe6\x97\xa5\xe6\x9c\xac"
|
||||
ja2.force_encoding('UTF-8') if ja2.respond_to?(:force_encoding)
|
||||
with_settings :repositories_encodings => '' do
|
||||
diff = Redmine::UnifiedDiff.new(
|
||||
read_diff_fixture('issue-13644-2.diff'), :type => 'sbs')
|
||||
assert_equal 1, diff.size
|
||||
assert_equal 3, diff.first.size
|
||||
assert_equal ja1, diff.first[1].html_line_left
|
||||
assert_equal ja2, diff.first[1].html_line_right
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def read_diff_fixture(filename)
|
||||
|
||||
Reference in New Issue
Block a user