@@ -78,11 +78,16 module ApplicationHelper | |||
|
78 | 78 | end |
|
79 | 79 | |
|
80 | 80 | def format_date(date) |
|
81 | l_date(date) if date | |
|
81 | return nil unless date | |
|
82 | @date_format_setting ||= Setting.date_format.to_i | |
|
83 | @date_format_setting == 0 ? l_date(date) : date.strftime("%Y-%m-%d") | |
|
82 | 84 | end |
|
83 | 85 | |
|
84 | 86 | def format_time(time) |
|
85 | l_datetime((time.is_a? String) ? time.to_time : time) if time | |
|
87 | return nil unless time | |
|
88 | @date_format_setting ||= Setting.date_format.to_i | |
|
89 | time = time.to_time if time.is_a?(String) | |
|
90 | @date_format_setting == 0 ? l_datetime(time) : (time.strftime("%Y-%m-%d") + ' ' + l_time(time)) | |
|
86 | 91 | end |
|
87 | 92 | |
|
88 | 93 | def day_name(day) |
@@ -15,6 +15,9 | |||
|
15 | 15 | <p><label><%= l(:setting_default_language) %></label> |
|
16 | 16 | <%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p> |
|
17 | 17 | |
|
18 | <p><label><%= l(:setting_date_format) %></label> | |
|
19 | <%= select_tag 'settings[date_format]', options_for_select( [[l(:label_language_based), '0'], ['ISO 8601 (YYYY-MM-DD)', '1']], Setting.date_format) %></p> | |
|
20 | ||
|
18 | 21 | <p><label><%= l(:setting_attachment_max_size) %></label> |
|
19 | 22 | <%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p> |
|
20 | 23 |
@@ -66,3 +66,9 commit_fix_status_id: | |||
|
66 | 66 | autologin: |
|
67 | 67 | format: int |
|
68 | 68 | default: 0 |
|
69 | # date format | |
|
70 | # 0: language based | |
|
71 | # 1: ISO format | |
|
72 | date_format: | |
|
73 | format: int | |
|
74 | default: 0 |
@@ -172,6 +172,7 setting_sys_api_enabled: Разрешаване на WS за управлени | |||
|
172 | 172 | setting_commit_ref_keywords: Отбелязващи ключови думи |
|
173 | 173 | setting_commit_fix_keywords: Приключващи ключови думи |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Потребител |
|
177 | 178 | label_user_plural: Потребители |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Вход |
|
407 | 409 | button_submit: Изпращане |
@@ -172,6 +172,7 setting_sys_api_enabled: Enable WS for repository management | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Benutzer |
|
177 | 178 | label_user_plural: Benutzer |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Einloggen |
|
407 | 409 | button_submit: OK |
@@ -172,6 +172,7 setting_sys_api_enabled: Enable WS for repository management | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: User |
|
177 | 178 | label_user_plural: Users |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Login |
|
407 | 409 | button_submit: Submit |
@@ -172,6 +172,7 setting_sys_api_enabled: Enable WS for repository management | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Usuario |
|
177 | 178 | label_user_plural: Usuarios |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Conexión |
|
407 | 409 | button_submit: Someter |
@@ -172,6 +172,7 setting_sys_api_enabled: Activer les WS pour la gestion des dépôts | |||
|
172 | 172 | setting_commit_ref_keywords: Mot-clés de référencement |
|
173 | 173 | setting_commit_fix_keywords: Mot-clés de résolution |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Format de date | |
|
175 | 176 | |
|
176 | 177 | label_user: Utilisateur |
|
177 | 178 | label_user_plural: Utilisateurs |
@@ -402,6 +403,7 label_month: Mois | |||
|
402 | 403 | label_week: Semaine |
|
403 | 404 | label_date_from: Du |
|
404 | 405 | label_date_to: Au |
|
406 | label_language_based: Basé sur la langue | |
|
405 | 407 | |
|
406 | 408 | button_login: Connexion |
|
407 | 409 | button_submit: Soumettre |
@@ -172,6 +172,7 setting_sys_api_enabled: Abilita WS per la gestione del repository | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Utente |
|
177 | 178 | label_user_plural: Utenti |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Login |
|
407 | 409 | button_submit: Invia |
@@ -173,6 +173,7 setting_sys_api_enabled: リポジトリ管理用のWeb Serviceを有効化す | |||
|
173 | 173 | setting_commit_ref_keywords: 参照用キーワード |
|
174 | 174 | setting_commit_fix_keywords: 修正用キーワード |
|
175 | 175 | setting_autologin: 自動ログイン |
|
176 | setting_date_format: Date format | |
|
176 | 177 | |
|
177 | 178 | label_user: ユーザ |
|
178 | 179 | label_user_plural: ユーザ |
@@ -403,6 +404,7 label_month: Month | |||
|
403 | 404 | label_week: Week |
|
404 | 405 | label_date_from: From |
|
405 | 406 | label_date_to: To |
|
407 | label_language_based: Language based | |
|
406 | 408 | |
|
407 | 409 | button_login: ログイン |
|
408 | 410 | button_submit: 変更 |
@@ -172,6 +172,7 setting_sys_api_enabled: Gebruik WS voor repository beheer | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Gebruiker |
|
177 | 178 | label_user_plural: Gebruikers |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Inloggen |
|
407 | 409 | button_submit: Toevoegen |
@@ -172,6 +172,7 setting_sys_api_enabled: Ativa WS para gerenciamento do repositorio | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Usuario |
|
177 | 178 | label_user_plural: Usuarios |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Login |
|
407 | 409 | button_submit: Enviar |
@@ -172,6 +172,7 setting_sys_api_enabled: Ativa WS para gerenciamento do repositório | |||
|
172 | 172 | setting_commit_ref_keywords: Palavras-chave de referôncia |
|
173 | 173 | setting_commit_fix_keywords: Palavras-chave fixas |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Usuário |
|
177 | 178 | label_user_plural: Usuários |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Login |
|
407 | 409 | button_submit: Enviar |
@@ -172,6 +172,7 setting_sys_api_enabled: Aktivera WS för repository management | |||
|
172 | 172 | setting_commit_ref_keywords: Referencing keywords |
|
173 | 173 | setting_commit_fix_keywords: Fixing keywords |
|
174 | 174 | setting_autologin: Autologin |
|
175 | setting_date_format: Date format | |
|
175 | 176 | |
|
176 | 177 | label_user: Användare |
|
177 | 178 | label_user_plural: Användare |
@@ -402,6 +403,7 label_month: Month | |||
|
402 | 403 | label_week: Week |
|
403 | 404 | label_date_from: From |
|
404 | 405 | label_date_to: To |
|
406 | label_language_based: Language based | |
|
405 | 407 | |
|
406 | 408 | button_login: Logga in |
|
407 | 409 | button_submit: Skicka |
@@ -175,6 +175,7 setting_sys_api_enabled: Enable WS for repository management | |||
|
175 | 175 | setting_commit_ref_keywords: Referencing keywords |
|
176 | 176 | setting_commit_fix_keywords: Fixing keywords |
|
177 | 177 | setting_autologin: Autologin |
|
178 | setting_date_format: Date format | |
|
178 | 179 | |
|
179 | 180 | label_user: 用户 |
|
180 | 181 | label_user_plural: 用户列表 |
@@ -404,6 +405,7 label_month: Month | |||
|
404 | 405 | label_week: Week |
|
405 | 406 | label_date_from: From |
|
406 | 407 | label_date_to: To |
|
408 | label_language_based: Language based | |
|
407 | 409 | |
|
408 | 410 | button_login: 登录 |
|
409 | 411 | button_submit: 提交 |
General Comments 0
You need to be logged in to leave comments.
Login now