|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,400 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | |
|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> | |
|
4 | <book> | |
|
5 | <title>Documentation redMine</title> | |
|
6 | ||
|
7 | <chapter> | |
|
8 | <title>Administration</title> | |
|
9 | ||
|
10 | <section> | |
|
11 | <title>Utilisateurs</title> | |
|
12 | ||
|
13 | <para>Ces écrans vous permettent de gérer les utilisateurs de | |
|
14 | l'application.</para> | |
|
15 | ||
|
16 | <section> | |
|
17 | <title>Liste des utilisateurs</title> | |
|
18 | ||
|
19 | <para></para> | |
|
20 | ||
|
21 | <screenshot> | |
|
22 | <screeninfo>Liste des utilisateurs</screeninfo> | |
|
23 | ||
|
24 | <mediaobject> | |
|
25 | <imageobject> | |
|
26 | <imagedata fileref="images/users_list.png" /> | |
|
27 | </imageobject> | |
|
28 | </mediaobject> | |
|
29 | </screenshot> | |
|
30 | ||
|
31 | <para>Les boutons Lock/Unlock vous permettent de | |
|
32 | vérouiller/dévérouiller les comptes utilisateurs.</para> | |
|
33 | ||
|
34 | <para>Un utilisateur dont le compte est vérouillé ne peut plus | |
|
35 | s'identifier pour accéder à l'application.</para> | |
|
36 | </section> | |
|
37 | ||
|
38 | <section> | |
|
39 | <title>Création ou modification d'un utilisateur</title> | |
|
40 | ||
|
41 | <para>En mode modification, laissez le champ Password vide pour | |
|
42 | laisser le mot de passe de l'utilisateur inchangé.</para> | |
|
43 | ||
|
44 | <para>Un utilisateur déclaré comme administrateur dispose de toutes | |
|
45 | les permissions sur l'application et sur tous les projets.</para> | |
|
46 | ||
|
47 | <itemizedlist> | |
|
48 | <listitem> | |
|
49 | <para><guilabel>Administrateur</guilabel>: déclare l'utilisateur | |
|
50 | comme administrateur de l'application.</para> | |
|
51 | </listitem> | |
|
52 | ||
|
53 | <listitem> | |
|
54 | <para><guilabel>Notifications par mail</guilabel>: permet | |
|
55 | d'activer ou non l'envoi automatique de notifications par mail | |
|
56 | pour cet utilisateur</para> | |
|
57 | </listitem> | |
|
58 | ||
|
59 | <listitem> | |
|
60 | <para><guilabel>Vérouillé</guilabel>: désactive le compte de | |
|
61 | l'utilisateur</para> | |
|
62 | </listitem> | |
|
63 | </itemizedlist> | |
|
64 | </section> | |
|
65 | </section> | |
|
66 | ||
|
67 | <section> | |
|
68 | <title>Rôles et permissions</title> | |
|
69 | ||
|
70 | <para>Les rôles permettent de définir les permissions des différents | |
|
71 | membres d'un projet. Chaque membre d'un projet dispose d'un rôle unique | |
|
72 | au sein d'un projet. Un utilisateur peut avoir différents rôles au sein | |
|
73 | de différents projets.</para> | |
|
74 | ||
|
75 | <para>Sur l'écran d'édition du rôle, cochez les actions que vous | |
|
76 | souhaitez autoriser pour le rôle.</para> | |
|
77 | </section> | |
|
78 | ||
|
79 | <section> | |
|
80 | <title>Trackers</title> | |
|
81 | ||
|
82 | <para>Les trackers permettent de typer les demandes et de définir des | |
|
83 | workflows spécifiques pour chacun de ces types.</para> | |
|
84 | </section> | |
|
85 | ||
|
86 | <section> | |
|
87 | <title>Champs personnalisés</title> | |
|
88 | ||
|
89 | <para>Les champs personnalisés vous permettent d'ajouter des | |
|
90 | informations supplémentaires sur les demandes. Un champ personnalisé | |
|
91 | peut être de l'un des types suivants:</para> | |
|
92 | ||
|
93 | <itemizedlist> | |
|
94 | <listitem> | |
|
95 | <para><guilabel>Integer</guilabel>: entier positif ou négatif</para> | |
|
96 | </listitem> | |
|
97 | ||
|
98 | <listitem> | |
|
99 | <para><guilabel>String</guilabel>: chaîne de caractère</para> | |
|
100 | </listitem> | |
|
101 | ||
|
102 | <listitem> | |
|
103 | <para><guilabel>Date</guilabel>: date</para> | |
|
104 | </listitem> | |
|
105 | ||
|
106 | <listitem> | |
|
107 | <para><guilabel>Boolean</guilabel>: booléen (case à cocher)</para> | |
|
108 | </listitem> | |
|
109 | ||
|
110 | <listitem> | |
|
111 | <para><guilabel>List</guilabel>: valeur à sélectionnée parmi une | |
|
112 | liste prédéfinie (liste déroulante)</para> | |
|
113 | </listitem> | |
|
114 | </itemizedlist> | |
|
115 | ||
|
116 | <para>Des éléments de validation peuvent être définis:</para> | |
|
117 | ||
|
118 | <itemizedlist> | |
|
119 | <listitem> | |
|
120 | <para><guilabel>Obligatoire</guilabel>: champ dont la saisie est | |
|
121 | obligatoire sur les demandes</para> | |
|
122 | </listitem> | |
|
123 | ||
|
124 | <listitem> | |
|
125 | <para><guilabel>Pour tous les projects</guilabel>: champ | |
|
126 | automatiquement associé à l'ensemble des projets</para> | |
|
127 | </listitem> | |
|
128 | ||
|
129 | <listitem> | |
|
130 | <para><guilabel>Min - max length</guilabel>: longueurs minimales et | |
|
131 | maximales pour les champs en saisie libre (0 signifie qu'il n'y a | |
|
132 | pas de restriction)</para> | |
|
133 | </listitem> | |
|
134 | ||
|
135 | <listitem> | |
|
136 | <para><guilabel>Expression régulière</guilabel>: expression | |
|
137 | régulière permettant de valider la valeur saisie</para> | |
|
138 | </listitem> | |
|
139 | ||
|
140 | <listitem> | |
|
141 | <para><guilabel>Valeurs possibles</guilabel>: valeurs possibles pour | |
|
142 | les champs de type "Liste". Les valeurs sont séparées par le | |
|
143 | caractère |</para> | |
|
144 | </listitem> | |
|
145 | </itemizedlist> | |
|
146 | ||
|
147 | <para>Si l'option <guilabel>Pour tous les projets</guilabel> n'est pas | |
|
148 | activée, chaque projet pourra choisir d'utiliser ou non le champ pour | |
|
149 | ses demandes.</para> | |
|
150 | </section> | |
|
151 | ||
|
152 | <section> | |
|
153 | <title>Statut des demandes</title> | |
|
154 | ||
|
155 | <para>Ces écrans vous permettent de définir les différents statuts | |
|
156 | possibles des demandes.</para> | |
|
157 | ||
|
158 | <itemizedlist> | |
|
159 | <listitem> | |
|
160 | <para><guilabel>Demande fermée</guilabel>: indique que le statut | |
|
161 | correspond à une demande considérée comme fermée</para> | |
|
162 | </listitem> | |
|
163 | ||
|
164 | <listitem> | |
|
165 | <para><guilabel>Statut par défaut</guilabel>: statut appliqué par | |
|
166 | défaut aux nouvelles demandes (seul un statut peut être déclaré | |
|
167 | comme statut par défaut)</para> | |
|
168 | </listitem> | |
|
169 | ||
|
170 | <listitem> | |
|
171 | <para><guilabel>Couleur</guilabel>: code couleur HTML (6 caractères) | |
|
172 | représentant le statut à l'affichage</para> | |
|
173 | </listitem> | |
|
174 | </itemizedlist> | |
|
175 | ||
|
176 | <para></para> | |
|
177 | </section> | |
|
178 | ||
|
179 | <section> | |
|
180 | <title>Workflow</title> | |
|
181 | ||
|
182 | <para>Le workflow permet de définir les changements que les différents | |
|
183 | membres d'un projet sont autorisés à effectuer sur les demandes, en | |
|
184 | fonction de leur type.</para> | |
|
185 | ||
|
186 | <para>Sélectionnez le rôle et le tracker pour lesquels vous souhaitez | |
|
187 | modifier le workflow, puis cliquez sur Edit. L'écran vous permet alors | |
|
188 | de modifier, pour le rôle et le tracker choisi, les changements | |
|
189 | autorisés. Les lignes représentent les statuts initiaux des demandes. | |
|
190 | Les colonnes représentent les statuts autorisés à être appliqués.</para> | |
|
191 | ||
|
192 | <para>Remarque: pour qu'un rôle puisse changer le statut des demandes, | |
|
193 | la permission doit lui être explicitement donnée indépendemment de la | |
|
194 | configuration du workflow.</para> | |
|
195 | ||
|
196 | <para></para> | |
|
197 | ||
|
198 | <screenshot> | |
|
199 | <screeninfo>Exemple de configuration d'un workflow</screeninfo> | |
|
200 | ||
|
201 | <mediaobject> | |
|
202 | <imageobject> | |
|
203 | <imagedata fileref="images/workflow.png" /> | |
|
204 | </imageobject> | |
|
205 | </mediaobject> | |
|
206 | </screenshot> | |
|
207 | ||
|
208 | <para>Dans l'exemple ci-dessus, les demandes de type Bug au statut | |
|
209 | Nouveau pourront être passées au statut Assignée ou Résolue par le rôle | |
|
210 | Développeur. Celles au statut Assignée pourront être passées au statut | |
|
211 | Résolue. Le statut de toutes les autres demandes de type Bug ne pourra | |
|
212 | pas être modifié par le Développeur.</para> | |
|
213 | </section> | |
|
214 | ||
|
215 | <section> | |
|
216 | <title>Listes de valeurs</title> | |
|
217 | ||
|
218 | <para>Les listes de valeurs utilisées par l'application (exemple: les | |
|
219 | priorités des demandes) peuvent être personnalisées. Cet écran vous | |
|
220 | permet de définir les valeurs possibles pour chacune des listes | |
|
221 | suivantes:</para> | |
|
222 | ||
|
223 | <itemizedlist> | |
|
224 | <listitem> | |
|
225 | <para>Priorités des demandes</para> | |
|
226 | </listitem> | |
|
227 | ||
|
228 | <listitem> | |
|
229 | <para>Catégories de documents</para> | |
|
230 | </listitem> | |
|
231 | </itemizedlist> | |
|
232 | ||
|
233 | <para></para> | |
|
234 | </section> | |
|
235 | ||
|
236 | <section> | |
|
237 | <title>Notifications par mail</title> | |
|
238 | ||
|
239 | <para>Cet écran vous permet de sélectionner les actions qui donneront | |
|
240 | lieu à une notification par mail aux membres du projet.</para> | |
|
241 | ||
|
242 | <para>Remarque: l'envoi de mails doit être activé dans la configuration | |
|
243 | de l'application si souhaitez effectuer des notifications.</para> | |
|
244 | </section> | |
|
245 | ||
|
246 | <section> | |
|
247 | <title>Informations</title> | |
|
248 | ||
|
249 | <para>Affiche des informations relatives à l'application et à son | |
|
250 | environnement.</para> | |
|
251 | </section> | |
|
252 | </chapter> | |
|
253 | ||
|
254 | <chapter> | |
|
255 | <title>Projets</title> | |
|
256 | ||
|
257 | <para></para> | |
|
258 | ||
|
259 | <section> | |
|
260 | <title>Aperçu du projet</title> | |
|
261 | ||
|
262 | <para>L'aperçu vous présente les informations générales relatives au | |
|
263 | projet, les principaux membres, les dernières annonces, ainsi qu'une | |
|
264 | synthèse du nombre de demandes ouvertes par tracker.</para> | |
|
265 | ||
|
266 | <para></para> | |
|
267 | </section> | |
|
268 | ||
|
269 | <section> | |
|
270 | <title>Gestion des demandes</title> | |
|
271 | ||
|
272 | <para></para> | |
|
273 | ||
|
274 | <section> | |
|
275 | <title>Liste des demandes</title> | |
|
276 | ||
|
277 | <para>Par défaut, l'ensemble des demandes ouvertes du projet sont | |
|
278 | affichées. Différents filtres vous permettent de sélectionner les | |
|
279 | demandes à afficher. Si le projet comporte des sous-projets, vous avez | |
|
280 | la possibilité d'afficher également les demandes relatives aux | |
|
281 | sous-projets (non affichées par défaut).</para> | |
|
282 | ||
|
283 | <para>Une fois appliqué, un filtre reste valable durant toute votre | |
|
284 | session. Vous pouvez le redéfinir, ou le supprimer en cliquant sur | |
|
285 | Annuler.</para> | |
|
286 | ||
|
287 | <para></para> | |
|
288 | ||
|
289 | <screenshot> | |
|
290 | <screeninfo>Liste des demandes</screeninfo> | |
|
291 | ||
|
292 | <mediaobject> | |
|
293 | <imageobject> | |
|
294 | <imagedata fileref="images/issues_list.png" /> | |
|
295 | </imageobject> | |
|
296 | </mediaobject> | |
|
297 | </screenshot> | |
|
298 | ||
|
299 | <para></para> | |
|
300 | </section> | |
|
301 | </section> | |
|
302 | ||
|
303 | <section> | |
|
304 | <title>Rapports</title> | |
|
305 | ||
|
306 | <para>Cet écran présente la synthèse du nombre de demandes par statut et | |
|
307 | selon différents critères (tracker, priorité, catégorie). Des liens | |
|
308 | directs permettent d'accéder à la liste détaillée des demandes pour | |
|
309 | chaque critère.</para> | |
|
310 | </section> | |
|
311 | ||
|
312 | <section> | |
|
313 | <title>Historique</title> | |
|
314 | ||
|
315 | <para>Cette page présente l'ensemble des demandes résolues dans chacune | |
|
316 | des versions du projet. Certains types de demande peuvent être exclus de | |
|
317 | cet affichage.</para> | |
|
318 | </section> | |
|
319 | ||
|
320 | <section> | |
|
321 | <title>Annonces</title> | |
|
322 | ||
|
323 | <para>Les nouvelles vous permettent d'informer les utilisateurs sur | |
|
324 | l'activité du projet.</para> | |
|
325 | </section> | |
|
326 | ||
|
327 | <section> | |
|
328 | <title>Documents</title> | |
|
329 | ||
|
330 | <para>Les documents sont groupés par catégories (voir Listes de | |
|
331 | valeurs). Un document peut contenir plusieurs fichiers (exemple: | |
|
332 | révisions ou versions successives).</para> | |
|
333 | </section> | |
|
334 | ||
|
335 | <section> | |
|
336 | <title>Fichiers</title> | |
|
337 | ||
|
338 | <para>Ce module vous permet de publier les différents fichiers (sources, | |
|
339 | binaires, ...) pour chaque version de l'application.</para> | |
|
340 | </section> | |
|
341 | ||
|
342 | <section> | |
|
343 | <title>Configuration du projet</title> | |
|
344 | ||
|
345 | <para></para> | |
|
346 | ||
|
347 | <section> | |
|
348 | <title>Propriétés du projet</title> | |
|
349 | ||
|
350 | <para></para> | |
|
351 | ||
|
352 | <itemizedlist> | |
|
353 | <listitem> | |
|
354 | <para><guilabel>Public</guilabel>: si le projet est public, il | |
|
355 | sera visible (consultation des demandes, des documents, ...) pour | |
|
356 | l'ensemble des utilisateurs, y compris ceux qui ne sont pas | |
|
357 | membres du projet. Si le projet n'est pas public, seuls les | |
|
358 | membres du projet y ont accès, en fonction de leur rôle.</para> | |
|
359 | </listitem> | |
|
360 | ||
|
361 | <listitem> | |
|
362 | <para><guilabel>Champs personnalisés</guilabel>: sélectionner les | |
|
363 | champs personnalisés que vous souhaitez utiliser au sein du | |
|
364 | projet. Seul l'administrateur peut ajouter de nouveaux champs | |
|
365 | personnalisés.</para> | |
|
366 | </listitem> | |
|
367 | </itemizedlist> | |
|
368 | ||
|
369 | <para></para> | |
|
370 | </section> | |
|
371 | ||
|
372 | <section> | |
|
373 | <title>Membres</title> | |
|
374 | ||
|
375 | <para>Cet écran vous permet de définir les membres du projet ainsi que | |
|
376 | leurs rôles respectifs. Un utilisateur ne peut avoir qu'un rôle au | |
|
377 | sein d'un projet donné. Le rôle d'un membre détermine les permissions | |
|
378 | dont il bénéficie sur le projet.</para> | |
|
379 | </section> | |
|
380 | ||
|
381 | <section> | |
|
382 | <title>Versions</title> | |
|
383 | ||
|
384 | <para>Les versions vous permettent de suivre les changements survenus | |
|
385 | tout au long du projet. A la fermeture d'une demande, vous pouvez par | |
|
386 | exemple indiquer quelle version la prend en compte. Vous pouvez par | |
|
387 | ailleurs publier les différentes versions de l'application (voir | |
|
388 | Fichiers).</para> | |
|
389 | </section> | |
|
390 | ||
|
391 | <section> | |
|
392 | <title>Catégories des demandes</title> | |
|
393 | ||
|
394 | <para>Les catégories de demande vous permettent de typer les demandes. | |
|
395 | Les catégories peuvent par exemple correspondre aux différents modules | |
|
396 | du projet.</para> | |
|
397 | </section> | |
|
398 | </section> | |
|
399 | </chapter> | |
|
400 | </book> No newline at end of file |
@@ -0,0 +1,43 | |||
|
1 | desc 'Load default configuration data (using default language)' | |
|
2 | ||
|
3 | task :load_default_data => :environment do | |
|
4 | include GLoc | |
|
5 | set_language_if_valid($RDM_DEFAULT_LANG) | |
|
6 | ||
|
7 | # roles | |
|
8 | r = Role.create :name => l(:default_role_manager) | |
|
9 | r.permissions = Permission.find(:all, :conditions => ["is_public=?", false]) | |
|
10 | r = Role.create :name => l(:default_role_developper) | |
|
11 | r.permissions = Permission.find(:all, :conditions => ["is_public=?", false]) | |
|
12 | r = Role.create :name => l(:default_role_reporter) | |
|
13 | r.permissions = Permission.find(:all, :conditions => ["is_public=?", false]) | |
|
14 | # trackers | |
|
15 | Tracker.create(:name => l(:default_tracker_bug), :is_in_chlog => true) | |
|
16 | Tracker.create(:name => l(:default_tracker_feature), :is_in_chlog => true) | |
|
17 | Tracker.create(:name => l(:default_tracker_support), :is_in_chlog => false) | |
|
18 | # issue statuses | |
|
19 | IssueStatus.create(:name => l(:default_issue_status_new), :is_closed => false, :is_default => true, :html_color => 'F98787') | |
|
20 | IssueStatus.create(:name => l(:default_issue_status_assigned), :is_closed => false, :is_default => false, :html_color => 'C0C0FF') | |
|
21 | IssueStatus.create(:name => l(:default_issue_status_resolved), :is_closed => false, :is_default => false, :html_color => '88E0B3') | |
|
22 | IssueStatus.create(:name => l(:default_issue_status_feedback), :is_closed => false, :is_default => false, :html_color => 'F3A4F4') | |
|
23 | IssueStatus.create(:name => l(:default_issue_status_closed), :is_closed => true, :is_default => false, :html_color => 'DBDBDB') | |
|
24 | IssueStatus.create(:name => l(:default_issue_status_rejected), :is_closed => true, :is_default => false, :html_color => 'F5C28B') | |
|
25 | # workflow | |
|
26 | Tracker.find(:all).each { |t| | |
|
27 | Role.find(:all).each { |r| | |
|
28 | IssueStatus.find(:all).each { |os| | |
|
29 | IssueStatus.find(:all).each { |ns| | |
|
30 | Workflow.create(:tracker_id => t.id, :role_id => r.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns | |
|
31 | } | |
|
32 | } | |
|
33 | } | |
|
34 | } | |
|
35 | # enumerations | |
|
36 | Enumeration.create(:opt => "DCAT", :name => l(:default_doc_category_user)) | |
|
37 | Enumeration.create(:opt => "DCAT", :name => l(:default_doc_category_tech)) | |
|
38 | Enumeration.create(:opt => "IPRI", :name => l(:default_priority_low)) | |
|
39 | Enumeration.create(:opt => "IPRI", :name => l(:default_priority_normal)) | |
|
40 | Enumeration.create(:opt => "IPRI", :name => l(:default_priority_high)) | |
|
41 | Enumeration.create(:opt => "IPRI", :name => l(:default_priority_urgent)) | |
|
42 | Enumeration.create(:opt => "IPRI", :name => l(:default_priority_immediate)) | |
|
43 | end No newline at end of file |
@@ -1,154 +1,160 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class AccountController < ApplicationController |
|
19 | 19 | layout 'base' |
|
20 | 20 | helper :custom_fields |
|
21 | 21 | include CustomFieldsHelper |
|
22 | 22 | |
|
23 | 23 | # prevents login action to be filtered by check_if_login_required application scope filter |
|
24 | 24 | skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register] |
|
25 | 25 | before_filter :require_login, :except => [:show, :login, :lost_password, :register] |
|
26 | 26 | |
|
27 | 27 | # Show user's account |
|
28 | 28 | def show |
|
29 | 29 | @user = User.find(params[:id]) |
|
30 | 30 | end |
|
31 | 31 | |
|
32 | 32 | # Login request and validation |
|
33 | 33 | def login |
|
34 | 34 | if request.get? |
|
35 | 35 | # Logout user |
|
36 | 36 | self.logged_in_user = nil |
|
37 | 37 | else |
|
38 | 38 | # Authenticate user |
|
39 | 39 | user = User.try_to_login(params[:login], params[:password]) |
|
40 | 40 | if user |
|
41 | 41 | self.logged_in_user = user |
|
42 | 42 | redirect_back_or_default :controller => 'account', :action => 'my_page' |
|
43 | 43 | else |
|
44 | flash[:notice] = l(:notice_account_invalid_creditentials) | |
|
44 | flash.now[:notice] = l(:notice_account_invalid_creditentials) | |
|
45 | 45 | end |
|
46 | 46 | end |
|
47 | 47 | end |
|
48 | 48 | |
|
49 | 49 | # Log out current user and redirect to welcome page |
|
50 | 50 | def logout |
|
51 | 51 | self.logged_in_user = nil |
|
52 | 52 | redirect_to :controller => '' |
|
53 | 53 | end |
|
54 | 54 | |
|
55 | 55 | # Show logged in user's page |
|
56 | 56 | def my_page |
|
57 | 57 | @user = self.logged_in_user |
|
58 | 58 | @reported_issues = Issue.find(:all, :conditions => ["author_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC') |
|
59 | 59 | @assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC') |
|
60 | 60 | end |
|
61 | 61 | |
|
62 | 62 | # Edit logged in user's account |
|
63 | 63 | def my_account |
|
64 | 64 | @user = self.logged_in_user |
|
65 | 65 | if request.post? and @user.update_attributes(@params[:user]) |
|
66 | 66 | set_localization |
|
67 | flash[:notice] = l(:notice_account_updated) | |
|
67 | flash.now[:notice] = l(:notice_account_updated) | |
|
68 | 68 | self.logged_in_user.reload |
|
69 | 69 | end |
|
70 | 70 | end |
|
71 | 71 | |
|
72 | 72 | # Change logged in user's password |
|
73 | 73 | def change_password |
|
74 | 74 | @user = self.logged_in_user |
|
75 | flash.now[:notice] = l(:notice_can_t_change_password) and render :action => 'my_account' and return if @user.auth_source_id | |
|
75 | 76 | if @user.check_password?(@params[:password]) |
|
76 | 77 | @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] |
|
77 | flash[:notice] = l(:notice_account_password_updated) if @user.save | |
|
78 | flash.now[:notice] = l(:notice_account_password_updated) if @user.save | |
|
78 | 79 | else |
|
79 | flash[:notice] = l(:notice_account_wrong_password) | |
|
80 | flash.now[:notice] = l(:notice_account_wrong_password) | |
|
80 | 81 | end |
|
81 | 82 | render :action => 'my_account' |
|
82 | 83 | end |
|
83 | 84 | |
|
84 | 85 | # Enable user to choose a new password |
|
85 | 86 | def lost_password |
|
86 | 87 | if params[:token] |
|
87 | 88 | @token = Token.find_by_action_and_value("recovery", params[:token]) |
|
88 | 89 | redirect_to :controller => '' and return unless @token and !@token.expired? |
|
89 | 90 | @user = @token.user |
|
90 | 91 | if request.post? |
|
91 | 92 | @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] |
|
92 | 93 | if @user.save |
|
93 | 94 | @token.destroy |
|
94 | 95 | flash[:notice] = l(:notice_account_password_updated) |
|
95 | 96 | redirect_to :action => 'login' |
|
96 | 97 | return |
|
97 | 98 | end |
|
98 | 99 | end |
|
99 | 100 | render :template => "account/password_recovery" |
|
100 | 101 | return |
|
101 | 102 | else |
|
102 | 103 | if request.post? |
|
103 |
user = User.find_by_mail(params[:mail]) |
|
|
104 | flash[:notice] = l(:notice_account_unknown_email) and return unless user | |
|
104 | user = User.find_by_mail(params[:mail]) | |
|
105 | # user not found in db | |
|
106 | flash.now[:notice] = l(:notice_account_unknown_email) and return unless user | |
|
107 | # user uses an external authentification | |
|
108 | flash.now[:notice] = l(:notice_can_t_change_password) and return if user.auth_source_id | |
|
109 | # create a new token for password recovery | |
|
105 | 110 | token = Token.new(:user => user, :action => "recovery") |
|
106 | 111 | if token.save |
|
107 | Mailer.set_language_if_valid(Localization.lang) | |
|
112 | # send token to user via email | |
|
113 | Mailer.set_language_if_valid(user.language) | |
|
108 | 114 | Mailer.deliver_lost_password(token) |
|
109 | 115 | flash[:notice] = l(:notice_account_lost_email_sent) |
|
110 | 116 | redirect_to :action => 'login' |
|
111 | 117 | return |
|
112 | 118 | end |
|
113 | 119 | end |
|
114 | 120 | end |
|
115 | 121 | end |
|
116 | 122 | |
|
117 | 123 | # User self-registration |
|
118 | 124 | def register |
|
119 | 125 | redirect_to :controller => '' and return if $RDM_SELF_REGISTRATION == false |
|
120 | 126 | if params[:token] |
|
121 | 127 | token = Token.find_by_action_and_value("register", params[:token]) |
|
122 | 128 | redirect_to :controller => '' and return unless token and !token.expired? |
|
123 | 129 | user = token.user |
|
124 | 130 | redirect_to :controller => '' and return unless user.status == User::STATUS_REGISTERED |
|
125 | 131 | user.status = User::STATUS_ACTIVE |
|
126 | 132 | if user.save |
|
127 | 133 | token.destroy |
|
128 | 134 | flash[:notice] = l(:notice_account_activated) |
|
129 | 135 | redirect_to :action => 'login' |
|
130 | 136 | return |
|
131 | 137 | end |
|
132 | 138 | else |
|
133 | 139 | if request.get? |
|
134 | 140 | @user = User.new(:language => $RDM_DEFAULT_LANG) |
|
135 | 141 | @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) } |
|
136 | 142 | else |
|
137 | 143 | @user = User.new(params[:user]) |
|
138 | 144 | @user.admin = false |
|
139 | 145 | @user.login = params[:user][:login] |
|
140 | 146 | @user.status = User::STATUS_REGISTERED |
|
141 | 147 | @user.password, @user.password_confirmation = params[:password], params[:password_confirmation] |
|
142 | 148 | @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) } |
|
143 | 149 | @user.custom_values = @custom_values |
|
144 | 150 | token = Token.new(:user => @user, :action => "register") |
|
145 | 151 | if @user.save and token.save |
|
146 |
Mailer.set_language_if_valid( |
|
|
152 | Mailer.set_language_if_valid(@user.language) | |
|
147 | 153 | Mailer.deliver_register(token) |
|
148 | 154 | flash[:notice] = l(:notice_account_register_done) |
|
149 | 155 | redirect_to :controller => '' |
|
150 | 156 | end |
|
151 | 157 | end |
|
152 | 158 | end |
|
153 | 159 | end |
|
154 | 160 | end |
@@ -1,111 +1,109 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class ApplicationController < ActionController::Base |
|
19 | 19 | before_filter :check_if_login_required, :set_localization |
|
20 | 20 | |
|
21 | 21 | def logged_in_user=(user) |
|
22 | 22 | @logged_in_user = user |
|
23 | 23 | session[:user_id] = (user ? user.id : nil) |
|
24 | 24 | end |
|
25 | 25 | |
|
26 | 26 | def logged_in_user |
|
27 | 27 | if session[:user_id] |
|
28 | 28 | @logged_in_user ||= User.find(session[:user_id], :include => :memberships) |
|
29 | 29 | else |
|
30 | 30 | nil |
|
31 | 31 | end |
|
32 | 32 | end |
|
33 | 33 | |
|
34 | 34 | # check if login is globally required to access the application |
|
35 | 35 | def check_if_login_required |
|
36 | 36 | require_login if $RDM_LOGIN_REQUIRED |
|
37 | 37 | end |
|
38 | 38 | |
|
39 | 39 | def set_localization |
|
40 |
|
|
|
41 |
if self.logged_in_user and |
|
|
40 | lang = begin | |
|
41 | if self.logged_in_user and self.logged_in_user.language and !self.logged_in_user.language.empty? and GLoc.valid_languages.include? self.logged_in_user.language.to_sym | |
|
42 | 42 | self.logged_in_user.language |
|
43 | 43 | elsif request.env['HTTP_ACCEPT_LANGUAGE'] |
|
44 | 44 | accept_lang = HTTPUtils.parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.split('-').first |
|
45 | if Localization.langs.keys.include? accept_lang | |
|
45 | if accept_lang and !accept_lang.empty? and GLoc.valid_languages.include? accept_lang.to_sym | |
|
46 | 46 | accept_lang |
|
47 | 47 | end |
|
48 | 48 | end |
|
49 | 49 | rescue |
|
50 | 50 | nil |
|
51 | 51 | end || $RDM_DEFAULT_LANG |
|
52 | ||
|
53 | set_language_if_valid(Localization.lang) | |
|
54 | ||
|
52 | set_language_if_valid(lang) | |
|
55 | 53 | end |
|
56 | 54 | |
|
57 | 55 | def require_login |
|
58 | 56 | unless self.logged_in_user |
|
59 | 57 | store_location |
|
60 | 58 | redirect_to(:controller => "account", :action => "login") |
|
61 | 59 | return false |
|
62 | 60 | end |
|
63 | 61 | true |
|
64 | 62 | end |
|
65 | 63 | |
|
66 | 64 | def require_admin |
|
67 | 65 | return unless require_login |
|
68 | 66 | unless self.logged_in_user.admin? |
|
69 | 67 | flash[:notice] = "Acces denied" |
|
70 | 68 | redirect_to:controller => '' |
|
71 | 69 | return false |
|
72 | 70 | end |
|
73 | 71 | true |
|
74 | 72 | end |
|
75 | 73 | |
|
76 | 74 | # authorizes the user for the requested action. |
|
77 | 75 | def authorize |
|
78 | 76 | # check if action is allowed on public projects |
|
79 | 77 | if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ @params[:controller], @params[:action] ] |
|
80 | 78 | return true |
|
81 | 79 | end |
|
82 | 80 | # if action is not public, force login |
|
83 | 81 | return unless require_login |
|
84 | 82 | # admin is always authorized |
|
85 | 83 | return true if self.logged_in_user.admin? |
|
86 | 84 | # if not admin, check membership permission |
|
87 | 85 | @user_membership ||= Member.find(:first, :conditions => ["user_id=? and project_id=?", self.logged_in_user.id, @project.id]) |
|
88 | 86 | if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id ) |
|
89 | 87 | return true |
|
90 | 88 | end |
|
91 | 89 | flash[:notice] = "Acces denied" |
|
92 | 90 | redirect_to :controller => '' |
|
93 | 91 | false |
|
94 | 92 | end |
|
95 | 93 | |
|
96 | 94 | # store current uri in session. |
|
97 | 95 | # return to this location by calling redirect_back_or_default |
|
98 | 96 | def store_location |
|
99 | 97 | session[:return_to] = @request.request_uri |
|
100 | 98 | end |
|
101 | 99 | |
|
102 | 100 | # move to the last store_location call or to the passed default one |
|
103 | 101 | def redirect_back_or_default(default) |
|
104 | 102 | if session[:return_to].nil? |
|
105 | 103 | redirect_to default |
|
106 | 104 | else |
|
107 | 105 | redirect_to_url session[:return_to] |
|
108 | 106 | session[:return_to] = nil |
|
109 | 107 | end |
|
110 | 108 | end |
|
111 | 109 | end No newline at end of file |
@@ -1,69 +1,70 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class EnumerationsController < ApplicationController |
|
19 | 19 | layout 'base' |
|
20 | 20 | before_filter :require_admin |
|
21 | 21 | |
|
22 | 22 | def index |
|
23 | 23 | list |
|
24 | 24 | render :action => 'list' |
|
25 | 25 | end |
|
26 | 26 | |
|
27 | 27 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
28 | 28 | verify :method => :post, :only => [ :destroy, :create, :update ], |
|
29 | 29 | :redirect_to => { :action => :list } |
|
30 | 30 | |
|
31 | 31 | def list |
|
32 | 32 | end |
|
33 | 33 | |
|
34 | 34 | def new |
|
35 | 35 | @enumeration = Enumeration.new(:opt => params[:opt]) |
|
36 | 36 | end |
|
37 | 37 | |
|
38 | 38 | def create |
|
39 | 39 | @enumeration = Enumeration.new(params[:enumeration]) |
|
40 | 40 | if @enumeration.save |
|
41 |
flash[:notice] = |
|
|
41 | flash[:notice] = l(:notice_successful_create) | |
|
42 | 42 | redirect_to :action => 'list', :opt => @enumeration.opt |
|
43 | 43 | else |
|
44 | 44 | render :action => 'new' |
|
45 | 45 | end |
|
46 | 46 | end |
|
47 | 47 | |
|
48 | 48 | def edit |
|
49 | 49 | @enumeration = Enumeration.find(params[:id]) |
|
50 | 50 | end |
|
51 | 51 | |
|
52 | 52 | def update |
|
53 | 53 | @enumeration = Enumeration.find(params[:id]) |
|
54 | 54 | if @enumeration.update_attributes(params[:enumeration]) |
|
55 |
flash[:notice] = |
|
|
55 | flash[:notice] = l(:notice_successful_update) | |
|
56 | 56 | redirect_to :action => 'list', :opt => @enumeration.opt |
|
57 | 57 | else |
|
58 | 58 | render :action => 'edit' |
|
59 | 59 | end |
|
60 | 60 | end |
|
61 | 61 | |
|
62 | 62 | def destroy |
|
63 | Enumeration.find(params[:id]).destroy | |
|
63 | Enumeration.find(params[:id]).destroy | |
|
64 | flash[:notice] = l(:notice_successful_delete) | |
|
64 | 65 | redirect_to :action => 'list' |
|
65 | 66 | rescue |
|
66 | 67 | flash[:notice] = "Unable to delete enumeration" |
|
67 | 68 | redirect_to :action => 'list' |
|
68 | 69 | end |
|
69 | 70 | end |
@@ -1,47 +1,47 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class HelpController < ApplicationController |
|
19 | 19 | |
|
20 | 20 | skip_before_filter :check_if_login_required |
|
21 | 21 | before_filter :load_help_config |
|
22 | 22 | |
|
23 | 23 | # displays help page for the requested controller/action |
|
24 | 24 | def index |
|
25 | 25 | # select help page to display |
|
26 | 26 | if @params[:ctrl] and @help_config['pages'][@params[:ctrl]] |
|
27 | 27 | if @params[:page] and @help_config['pages'][@params[:ctrl]][@params[:page]] |
|
28 | 28 | template = @help_config['pages'][@params[:ctrl]][@params[:page]] |
|
29 | 29 | else |
|
30 | 30 | template = @help_config['pages'][@params[:ctrl]]['index'] |
|
31 | 31 | end |
|
32 | 32 | end |
|
33 | 33 | # choose language according to available help translations |
|
34 |
lang = (@help_config['langs'].include? |
|
|
34 | lang = (@help_config['langs'].include? current_language) ? current_language : @help_config['langs'].first | |
|
35 | 35 | |
|
36 | 36 | if template |
|
37 | 37 | redirect_to "/manual/#{lang}/#{template}" |
|
38 | 38 | else |
|
39 | 39 | redirect_to "/manual/#{lang}/" |
|
40 | 40 | end |
|
41 | 41 | end |
|
42 | 42 | |
|
43 | 43 | private |
|
44 | 44 | def load_help_config |
|
45 | 45 | @help_config = YAML::load(File.open("#{RAILS_ROOT}/config/help.yml")) |
|
46 | 46 | end |
|
47 | 47 | end |
@@ -1,292 +1,292 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class ProjectsController < ApplicationController |
|
19 | 19 | layout 'base' |
|
20 | 20 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] |
|
21 | 21 | before_filter :require_admin, :only => [ :add, :destroy ] |
|
22 | 22 | |
|
23 | 23 | helper :sort |
|
24 | 24 | include SortHelper |
|
25 | 25 | helper :search_filter |
|
26 | 26 | include SearchFilterHelper |
|
27 | 27 | helper :custom_fields |
|
28 | 28 | include CustomFieldsHelper |
|
29 | 29 | |
|
30 | 30 | def index |
|
31 | 31 | list |
|
32 | 32 | render :action => 'list' |
|
33 | 33 | end |
|
34 | 34 | |
|
35 | 35 | # Lists public projects |
|
36 | 36 | def list |
|
37 | 37 | sort_init 'name', 'asc' |
|
38 | 38 | sort_update |
|
39 | 39 | @project_count = Project.count(["is_public=?", true]) |
|
40 | 40 | @project_pages = Paginator.new self, @project_count, |
|
41 | 41 | 15, |
|
42 | 42 | @params['page'] |
|
43 | 43 | @projects = Project.find :all, :order => sort_clause, |
|
44 | 44 | :conditions => ["is_public=?", true], |
|
45 | 45 | :limit => @project_pages.items_per_page, |
|
46 | 46 | :offset => @project_pages.current.offset |
|
47 | 47 | end |
|
48 | 48 | |
|
49 | 49 | # Add a new project |
|
50 | 50 | def add |
|
51 | 51 | @custom_fields = IssueCustomField.find(:all) |
|
52 | 52 | @root_projects = Project.find(:all, :conditions => "parent_id is null") |
|
53 | 53 | @project = Project.new(params[:project]) |
|
54 | 54 | if request.get? |
|
55 | 55 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } |
|
56 | 56 | else |
|
57 | 57 | @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids] |
|
58 | 58 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
59 | 59 | @project.custom_values = @custom_values |
|
60 | 60 | if @project.save |
|
61 | 61 | flash[:notice] = 'Project was successfully created.' |
|
62 | 62 | redirect_to :controller => 'admin', :action => 'projects' |
|
63 | 63 | end |
|
64 | 64 | end |
|
65 | 65 | end |
|
66 | 66 | |
|
67 | 67 | # Show @project |
|
68 | 68 | def show |
|
69 | 69 | @custom_values = @project.custom_values.find(:all, :include => :custom_field) |
|
70 | 70 | @members = @project.members.find(:all, :include => [:user, :role]) |
|
71 | 71 | @subprojects = @project.children if @project.children_count > 0 |
|
72 | 72 | @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") |
|
73 | 73 | @trackers = Tracker.find(:all) |
|
74 | 74 | end |
|
75 | 75 | |
|
76 | 76 | def settings |
|
77 | 77 | @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) |
|
78 | 78 | @custom_fields = IssueCustomField::find_all |
|
79 | 79 | @issue_category ||= IssueCategory.new |
|
80 | 80 | @member ||= @project.members.new |
|
81 | 81 | @roles = Role.find_all |
|
82 | 82 | @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user } |
|
83 | 83 | @custom_values = ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) } |
|
84 | 84 | end |
|
85 | 85 | |
|
86 | 86 | # Edit @project |
|
87 | 87 | def edit |
|
88 | 88 | if request.post? |
|
89 | 89 | @project.custom_fields = IssueCustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids] |
|
90 | 90 | if params[:custom_fields] |
|
91 | 91 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
92 | 92 | @project.custom_values = @custom_values |
|
93 | 93 | end |
|
94 | 94 | if @project.update_attributes(params[:project]) |
|
95 | 95 | flash[:notice] = 'Project was successfully updated.' |
|
96 | 96 | redirect_to :action => 'settings', :id => @project |
|
97 | 97 | else |
|
98 | 98 | settings |
|
99 | 99 | render :action => 'settings' |
|
100 | 100 | end |
|
101 | 101 | end |
|
102 | 102 | end |
|
103 | 103 | |
|
104 | 104 | # Delete @project |
|
105 | 105 | def destroy |
|
106 | 106 | if request.post? and params[:confirm] |
|
107 | 107 | @project.destroy |
|
108 | 108 | redirect_to :controller => 'admin', :action => 'projects' |
|
109 | 109 | end |
|
110 | 110 | end |
|
111 | 111 | |
|
112 | 112 | # Add a new issue category to @project |
|
113 | 113 | def add_issue_category |
|
114 | 114 | if request.post? |
|
115 | 115 | @issue_category = @project.issue_categories.build(params[:issue_category]) |
|
116 | 116 | if @issue_category.save |
|
117 | 117 | redirect_to :action => 'settings', :id => @project |
|
118 | 118 | else |
|
119 | 119 | settings |
|
120 | 120 | render :action => 'settings' |
|
121 | 121 | end |
|
122 | 122 | end |
|
123 | 123 | end |
|
124 | 124 | |
|
125 | 125 | # Add a new version to @project |
|
126 | 126 | def add_version |
|
127 | 127 | @version = @project.versions.build(params[:version]) |
|
128 | 128 | if request.post? and @version.save |
|
129 | 129 | redirect_to :action => 'settings', :id => @project |
|
130 | 130 | end |
|
131 | 131 | end |
|
132 | 132 | |
|
133 | 133 | # Add a new member to @project |
|
134 | 134 | def add_member |
|
135 | 135 | @member = @project.members.build(params[:member]) |
|
136 | 136 | if request.post? |
|
137 | 137 | if @member.save |
|
138 | 138 | flash[:notice] = 'Member was successfully added.' |
|
139 | 139 | redirect_to :action => 'settings', :id => @project |
|
140 | 140 | else |
|
141 | 141 | settings |
|
142 | 142 | render :action => 'settings' |
|
143 | 143 | end |
|
144 | 144 | end |
|
145 | 145 | end |
|
146 | 146 | |
|
147 | 147 | # Show members list of @project |
|
148 | 148 | def list_members |
|
149 | 149 | @members = @project.members |
|
150 | 150 | end |
|
151 | 151 | |
|
152 | 152 | # Add a new document to @project |
|
153 | 153 | def add_document |
|
154 | 154 | @categories = Enumeration::get_values('DCAT') |
|
155 | 155 | @document = @project.documents.build(params[:document]) |
|
156 | 156 | if request.post? |
|
157 | 157 | # Save the attachment |
|
158 | 158 | if params[:attachment][:file].size > 0 |
|
159 | 159 | @attachment = @document.attachments.build(params[:attachment]) |
|
160 | 160 | @attachment.author_id = self.logged_in_user.id if self.logged_in_user |
|
161 | 161 | end |
|
162 | 162 | if @document.save |
|
163 | 163 | redirect_to :action => 'list_documents', :id => @project |
|
164 | 164 | end |
|
165 | 165 | end |
|
166 | 166 | end |
|
167 | 167 | |
|
168 | 168 | # Show documents list of @project |
|
169 | 169 | def list_documents |
|
170 | 170 | @documents = @project.documents |
|
171 | 171 | end |
|
172 | 172 | |
|
173 | 173 | # Add a new issue to @project |
|
174 | 174 | def add_issue |
|
175 | 175 | @tracker = Tracker.find(params[:tracker_id]) |
|
176 | 176 | @priorities = Enumeration::get_values('IPRI') |
|
177 | 177 | @issue = Issue.new(:project => @project, :tracker => @tracker) |
|
178 | 178 | if request.get? |
|
179 | 179 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } |
|
180 | 180 | else |
|
181 | 181 | @issue.attributes = params[:issue] |
|
182 | 182 | @issue.author_id = self.logged_in_user.id if self.logged_in_user |
|
183 | 183 | # Create the document if a file was sent |
|
184 | 184 | if params[:attachment][:file].size > 0 |
|
185 | 185 | @attachment = @issue.attachments.build(params[:attachment]) |
|
186 | 186 | @attachment.author_id = self.logged_in_user.id if self.logged_in_user |
|
187 | 187 | end |
|
188 | 188 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) } |
|
189 | 189 | @issue.custom_values = @custom_values |
|
190 | 190 | if @issue.save |
|
191 | 191 | flash[:notice] = "Issue was successfully added." |
|
192 | 192 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled? |
|
193 | 193 | redirect_to :action => 'list_issues', :id => @project |
|
194 | 194 | end |
|
195 | 195 | end |
|
196 | 196 | end |
|
197 | 197 | |
|
198 | 198 | # Show filtered/sorted issues list of @project |
|
199 | 199 | def list_issues |
|
200 | 200 | sort_init 'issues.id', 'desc' |
|
201 | 201 | sort_update |
|
202 | 202 | |
|
203 | 203 | search_filter_init_list_issues |
|
204 | 204 | search_filter_update if params[:set_filter] or request.post? |
|
205 | 205 | |
|
206 | 206 | @issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause) |
|
207 | 207 | @issue_pages = Paginator.new self, @issue_count, 15, @params['page'] |
|
208 | 208 | @issues = Issue.find :all, :order => sort_clause, |
|
209 | 209 | :include => [ :author, :status, :tracker, :project ], |
|
210 | 210 | :conditions => search_filter_clause, |
|
211 | 211 | :limit => @issue_pages.items_per_page, |
|
212 | 212 | :offset => @issue_pages.current.offset |
|
213 | 213 | end |
|
214 | 214 | |
|
215 | 215 | # Export filtered/sorted issues list to CSV |
|
216 | 216 | def export_issues_csv |
|
217 | 217 | sort_init 'issues.id', 'desc' |
|
218 | 218 | sort_update |
|
219 | 219 | |
|
220 | 220 | search_filter_init_list_issues |
|
221 | 221 | |
|
222 | 222 | @issues = Issue.find :all, :order => sort_clause, |
|
223 | 223 | :include => [ :author, :status, :tracker, :project ], |
|
224 | 224 | :conditions => search_filter_clause |
|
225 | 225 | |
|
226 | 226 | export = StringIO.new |
|
227 | 227 | CSV::Writer.generate(export, ',') do |csv| |
|
228 | 228 | csv << %w(Id Status Tracker Subject Author Created Updated) |
|
229 | 229 | @issues.each do |issue| |
|
230 |
csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, _( |
|
|
230 | csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)] | |
|
231 | 231 | end |
|
232 | 232 | end |
|
233 | 233 | export.rewind |
|
234 | 234 | send_data(export.read, |
|
235 | 235 | :type => 'text/csv; charset=utf-8; header=present', |
|
236 | 236 | :filename => 'export.csv') |
|
237 | 237 | end |
|
238 | 238 | |
|
239 | 239 | # Add a news to @project |
|
240 | 240 | def add_news |
|
241 | 241 | @news = News.new(:project => @project) |
|
242 | 242 | if request.post? |
|
243 | 243 | @news.attributes = params[:news] |
|
244 | 244 | @news.author_id = self.logged_in_user.id if self.logged_in_user |
|
245 | 245 | if @news.save |
|
246 | 246 | redirect_to :action => 'list_news', :id => @project |
|
247 | 247 | end |
|
248 | 248 | end |
|
249 | 249 | end |
|
250 | 250 | |
|
251 | 251 | # Show news list of @project |
|
252 | 252 | def list_news |
|
253 | 253 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC" |
|
254 | 254 | end |
|
255 | 255 | |
|
256 | 256 | def add_file |
|
257 | 257 | if request.post? |
|
258 | 258 | # Save the attachment |
|
259 | 259 | if params[:attachment][:file].size > 0 |
|
260 | 260 | @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment]) |
|
261 | 261 | @attachment.author_id = self.logged_in_user.id if self.logged_in_user |
|
262 | 262 | if @attachment.save |
|
263 | 263 | redirect_to :controller => 'projects', :action => 'list_files', :id => @project |
|
264 | 264 | end |
|
265 | 265 | end |
|
266 | 266 | end |
|
267 | 267 | @versions = @project.versions |
|
268 | 268 | end |
|
269 | 269 | |
|
270 | 270 | def list_files |
|
271 | 271 | @versions = @project.versions |
|
272 | 272 | end |
|
273 | 273 | |
|
274 | 274 | # Show changelog of @project |
|
275 | 275 | def changelog |
|
276 | 276 | @fixed_issues = @project.issues.find(:all, |
|
277 | 277 | :include => [ :fixed_version, :status, :tracker ], |
|
278 | 278 | :conditions => [ "issue_statuses.is_closed=? and trackers.is_in_chlog=? and issues.fixed_version_id is not null", true, true] |
|
279 | 279 | ) |
|
280 | 280 | end |
|
281 | 281 | |
|
282 | 282 | private |
|
283 | 283 | # Find project of id params[:id] |
|
284 | 284 | # if not found, redirect to project list |
|
285 | 285 | # used as a before_filter |
|
286 | 286 | def find_project |
|
287 | 287 | @project = Project.find(params[:id]) |
|
288 | 288 | rescue |
|
289 | 289 | flash[:notice] = 'Project not found.' |
|
290 | 290 | redirect_to :action => 'list' |
|
291 | 291 | end |
|
292 | 292 | end |
@@ -1,84 +1,83 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class RolesController < ApplicationController |
|
19 | 19 | layout 'base' |
|
20 | 20 | before_filter :require_admin |
|
21 | 21 | |
|
22 | 22 | def index |
|
23 | 23 | list |
|
24 | 24 | render :action => 'list' |
|
25 | 25 | end |
|
26 | 26 | |
|
27 | 27 | def list |
|
28 | 28 | @role_pages, @roles = paginate :roles, :per_page => 10 |
|
29 | 29 | end |
|
30 | 30 | |
|
31 | 31 | def new |
|
32 | 32 | @role = Role.new(params[:role]) |
|
33 | 33 | if request.post? |
|
34 | 34 | @role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids] |
|
35 | 35 | if @role.save |
|
36 | 36 | flash[:notice] = 'Role was successfully created.' |
|
37 | 37 | redirect_to :action => 'list' |
|
38 | 38 | end |
|
39 | 39 | end |
|
40 | @permissions = Permission.find(:all, :order => 'sort ASC') | |
|
40 | @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC') | |
|
41 | 41 | end |
|
42 | 42 | |
|
43 | 43 | def edit |
|
44 | 44 | @role = Role.find(params[:id]) |
|
45 | 45 | if request.post? and @role.update_attributes(params[:role]) |
|
46 | 46 | @role.permissions = Permission.find(@params[:permission_ids] || []) |
|
47 | 47 | Permission.allowed_to_role_expired |
|
48 | 48 | flash[:notice] = 'Role was successfully updated.' |
|
49 | 49 | redirect_to :action => 'list' |
|
50 | 50 | end |
|
51 | @permissions = Permission.find(:all, :order => 'sort ASC') | |
|
51 | @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC') | |
|
52 | 52 | end |
|
53 | 53 | |
|
54 | 54 | def destroy |
|
55 | 55 | @role = Role.find(params[:id]) |
|
56 | 56 | unless @role.members.empty? |
|
57 | 57 | flash[:notice] = 'Some members have this role. Can\'t delete it.' |
|
58 | 58 | else |
|
59 | 59 | @role.destroy |
|
60 | 60 | end |
|
61 | 61 | redirect_to :action => 'list' |
|
62 | 62 | end |
|
63 | 63 | |
|
64 | def workflow | |
|
65 | ||
|
64 | def workflow | |
|
66 | 65 | @role = Role.find_by_id(params[:role_id]) |
|
67 | 66 | @tracker = Tracker.find_by_id(params[:tracker_id]) |
|
68 | 67 | |
|
69 | 68 | if request.post? |
|
70 | 69 | Workflow.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id]) |
|
71 | 70 | (params[:issue_status] || []).each { |old, news| |
|
72 | 71 | news.each { |new| |
|
73 | 72 | @role.workflows.build(:tracker_id => @tracker.id, :old_status_id => old, :new_status_id => new) |
|
74 | 73 | } |
|
75 | 74 | } |
|
76 | 75 | if @role.save |
|
77 | 76 | flash[:notice] = 'Workflow was successfully updated.' |
|
78 | 77 | end |
|
79 | 78 | end |
|
80 | 79 | @roles = Role.find_all |
|
81 | 80 | @trackers = Tracker.find_all |
|
82 | 81 | @statuses = IssueStatus.find(:all, :include => :workflows) |
|
83 | 82 | end |
|
84 | 83 | end |
@@ -1,93 +1,97 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | module ApplicationHelper |
|
19 | 19 | |
|
20 | 20 | # return current logged in user or nil |
|
21 | 21 | def loggedin? |
|
22 | 22 | @logged_in_user |
|
23 | 23 | end |
|
24 | 24 | |
|
25 | 25 | # return true if user is loggend in and is admin, otherwise false |
|
26 | 26 | def admin_loggedin? |
|
27 | 27 | @logged_in_user and @logged_in_user.admin? |
|
28 | 28 | end |
|
29 | 29 | |
|
30 | 30 | def authorize_for(controller, action) |
|
31 | 31 | # check if action is allowed on public projects |
|
32 | 32 | if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ controller, action ] |
|
33 | 33 | return true |
|
34 | 34 | end |
|
35 | 35 | # check if user is authorized |
|
36 | 36 | if @logged_in_user and (@logged_in_user.admin? or Permission.allowed_to_role( "%s/%s" % [ controller, action ], @logged_in_user.role_for_project(@project.id) ) ) |
|
37 | 37 | return true |
|
38 | 38 | end |
|
39 | 39 | return false |
|
40 | 40 | end |
|
41 | 41 | |
|
42 | 42 | # Display a link if user is authorized |
|
43 | 43 | def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference) |
|
44 | 44 | link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action]) |
|
45 | 45 | end |
|
46 | 46 | |
|
47 | 47 | # Display a link to user's account page |
|
48 | 48 | def link_to_user(user) |
|
49 | 49 | link_to user.display_name, :controller => 'account', :action => 'show', :id => user |
|
50 | 50 | end |
|
51 | 51 | |
|
52 | 52 | def format_date(date) |
|
53 |
_( |
|
|
53 | l_date(date) if date | |
|
54 | 54 | end |
|
55 | 55 | |
|
56 | 56 | def format_time(time) |
|
57 |
_( |
|
|
57 | l_datetime(time) if time | |
|
58 | 58 | end |
|
59 | 59 | |
|
60 | 60 | def pagination_links_full(paginator, options={}, html_options={}) |
|
61 | 61 | html ='' |
|
62 |
html << link_to(('« ' + |
|
|
62 | html << link_to(('« ' + l(:label_previous) ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous | |
|
63 | 63 | html << (pagination_links(paginator, options, html_options) || '') |
|
64 |
html << ' ' + link_to(( |
|
|
64 | html << ' ' + link_to((l(:label_next) + ' »'), { :page => paginator.current.next }) if paginator.current.next | |
|
65 | 65 | html |
|
66 | 66 | end |
|
67 | 67 | |
|
68 | 68 | def error_messages_for(object_name, options = {}) |
|
69 | 69 | options = options.symbolize_keys |
|
70 | 70 | object = instance_variable_get("@#{object_name}") |
|
71 | 71 | if object && !object.errors.empty? |
|
72 | 72 | # build full_messages here with controller current language |
|
73 | 73 | full_messages = [] |
|
74 | 74 | object.errors.each do |attr, msg| |
|
75 | 75 | next if msg.nil? |
|
76 | 76 | if attr == "base" |
|
77 | 77 | full_messages << l(msg) |
|
78 | 78 | else |
|
79 | 79 | full_messages << "« " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " » " + l(msg) |
|
80 | 80 | end |
|
81 | 81 | end |
|
82 | 82 | content_tag("div", |
|
83 | 83 | content_tag( |
|
84 | 84 | options[:header_tag] || "h2", lwr(:gui_validation_error, object.errors.count) + " :" |
|
85 | 85 | ) + |
|
86 | 86 | content_tag("ul", full_messages.collect { |msg| content_tag("li", msg) }), |
|
87 | 87 | "id" => options[:id] || "errorExplanation", "class" => options[:class] || "errorExplanation" |
|
88 | 88 | ) |
|
89 | 89 | else |
|
90 | 90 | "" |
|
91 | 91 | end |
|
92 | 92 | end |
|
93 | ||
|
94 | def lang_options_for_select | |
|
95 | GLoc.valid_languages.collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]} | |
|
96 | end | |
|
93 | 97 | end |
@@ -1,100 +1,101 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | module SearchFilterHelper |
|
19 | 19 | |
|
20 | 20 | def search_filter_criteria(name, options = {}) |
|
21 | 21 | @search_filter ||= {} |
|
22 | 22 | @search_filter[name] ||= {} |
|
23 | 23 | @search_filter[name][:options] = [] |
|
24 | 24 | @search_filter[name][:conditions] = {} |
|
25 | 25 | yield.each { |c| |
|
26 | 26 | @search_filter[name][:options] << [c[0], c[1].to_s] |
|
27 | 27 | @search_filter[name][:conditions].store(c[1].to_s, c[2]) |
|
28 | 28 | } |
|
29 | 29 | end |
|
30 | 30 | |
|
31 | 31 | def search_filter_update |
|
32 | 32 | session[:search_filter] ||= {} |
|
33 | 33 | @search_filter.each_key {|field| session[:search_filter][field] = params[field] } |
|
34 | 34 | end |
|
35 | 35 | |
|
36 | 36 | def search_filter_clause |
|
37 | 37 | session[:search_filter] ||= {} |
|
38 | 38 | clause = ["1=1"] |
|
39 | 39 | @search_filter.each { |k, v| |
|
40 | 40 | filter_value = session[:search_filter][k] || v[:options][0][1] |
|
41 | 41 | if v[:conditions][filter_value] |
|
42 | 42 | clause[0] = clause[0] + " AND " + v[:conditions][filter_value].first |
|
43 | 43 | clause += v[:conditions][filter_value][1..-1] |
|
44 | 44 | end |
|
45 | 45 | } |
|
46 | 46 | clause |
|
47 | 47 | end |
|
48 | 48 | |
|
49 | 49 | def search_filter_tag(criteria, options = {}) |
|
50 | 50 | session[:search_filter] ||= {} |
|
51 | 51 | options[:name] = criteria |
|
52 | 52 | options[:class] += " active-filter" if session[:search_filter][criteria] and session[:search_filter][criteria] != @search_filter[criteria][:options][0][1] |
|
53 | 53 | content_tag("select", |
|
54 | 54 | options_for_select(@search_filter[criteria][:options], session[:search_filter][criteria]), |
|
55 | 55 | options |
|
56 | 56 | ) |
|
57 | 57 | end |
|
58 | 58 | |
|
59 | 59 | def search_filter_init_list_issues |
|
60 | 60 | search_filter_criteria('status_id') { |
|
61 |
[ [ |
|
|
62 | [_('[All]'), "A", nil] | |
|
61 | [ [('['+l(:label_open_issues_plural)+']'), "O", ["issue_statuses.is_closed=?", false]], | |
|
62 | [('['+l(:label_closed_issues_plural)+']'), "C", ["issue_statuses.is_closed=?", true]], | |
|
63 | [('['+l(:label_all)+']'), "A", nil] | |
|
63 | 64 | ] + IssueStatus.find(:all).collect {|s| [s.name, s.id, ["issues.status_id=?", s.id]] } |
|
64 | 65 | } |
|
65 | 66 | |
|
66 | 67 | search_filter_criteria('tracker_id') { |
|
67 |
[ [ |
|
|
68 | [ [('['+l(:label_all)+']'), "A", nil] | |
|
68 | 69 | ] + Tracker.find(:all).collect {|s| [s.name, s.id, ["issues.tracker_id=?", s.id]] } |
|
69 | 70 | } |
|
70 | 71 | |
|
71 | 72 | search_filter_criteria('priority_id') { |
|
72 |
[ [ |
|
|
73 | [ [('['+l(:label_all)+']'), "A", nil] | |
|
73 | 74 | ] + Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect {|s| [s.name, s.id, ["issues.priority_id=?", s.id]] } |
|
74 | 75 | } |
|
75 | 76 | |
|
76 | 77 | search_filter_criteria('category_id') { |
|
77 |
[ [ |
|
|
78 |
[ |
|
|
78 | [ [('['+l(:label_all)+']'), "A", nil], | |
|
79 | [('['+l(:label_none)+']'), "N", ["issues.category_id is null"]] | |
|
79 | 80 | ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] } |
|
80 | 81 | } |
|
81 | 82 | |
|
82 | 83 | search_filter_criteria('fixed_version_id') { |
|
83 |
[ [ |
|
|
84 |
[ |
|
|
84 | [ [('['+l(:label_all)+']'), "A", nil], | |
|
85 | [('['+l(:label_none)+']'), "N", ["issues.fixed_version_id is null"]] | |
|
85 | 86 | ] + @project.versions.collect {|s| [s.name, s.id, ["issues.fixed_version_id=?", s.id]] } |
|
86 | 87 | } |
|
87 | 88 | |
|
88 | 89 | search_filter_criteria('assigned_to_id') { |
|
89 |
[ [ |
|
|
90 |
[ |
|
|
90 | [ [('['+l(:label_all)+']'), "A", nil], | |
|
91 | [('['+l(:label_none)+']'), "N", ["issues.assigned_to_id is null"]] | |
|
91 | 92 | ] + @project.users.collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] } |
|
92 | 93 | } |
|
93 | 94 | |
|
94 | 95 | search_filter_criteria('subproject_id') { |
|
95 |
[ [ |
|
|
96 |
[ |
|
|
96 | [ [('['+l(:label_none)+']'), "N", ["issues.project_id=?", @project.id]], | |
|
97 | [('['+l(:label_all)+']'), "A", ["(issues.project_id=? or projects.parent_id=?)", @project.id, @project.id]] | |
|
97 | 98 | ] |
|
98 | 99 | } |
|
99 | 100 | end |
|
100 | 101 | end No newline at end of file |
@@ -1,79 +1,79 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | require 'net/ldap' |
|
19 | 19 | require 'iconv' |
|
20 | 20 | |
|
21 | 21 | class AuthSourceLdap < AuthSource |
|
22 | 22 | validates_presence_of :host, :port, :attr_login |
|
23 | 23 | |
|
24 | 24 | def after_initialize |
|
25 | 25 | self.port = 389 if self.port == 0 |
|
26 | 26 | end |
|
27 | 27 | |
|
28 | 28 | def authenticate(login, password) |
|
29 | 29 | attrs = [] |
|
30 | 30 | # get user's DN |
|
31 | 31 | ldap_con = initialize_ldap_con(self.account, self.account_password) |
|
32 | 32 | login_filter = Net::LDAP::Filter.eq( self.attr_login, login ) |
|
33 |
object_filter = Net::LDAP::Filter.eq( "objectClass", " |
|
|
33 | object_filter = Net::LDAP::Filter.eq( "objectClass", "*" ) | |
|
34 | 34 | dn = String.new |
|
35 | 35 | ldap_con.search( :base => self.base_dn, |
|
36 | 36 | :filter => object_filter & login_filter, |
|
37 | 37 | :attributes=> ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail]) do |entry| |
|
38 | 38 | dn = entry.dn |
|
39 | 39 | attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname), |
|
40 | 40 | :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname), |
|
41 | 41 | :mail => AuthSourceLdap.get_attr(entry, self.attr_mail), |
|
42 | 42 | :auth_source_id => self.id ] |
|
43 | 43 | end |
|
44 | 44 | return nil if dn.empty? |
|
45 | 45 | logger.debug "DN found for #{login}: #{dn}" if logger && logger.debug? |
|
46 | 46 | # authenticate user |
|
47 | 47 | ldap_con = initialize_ldap_con(dn, password) |
|
48 | 48 | return nil unless ldap_con.bind |
|
49 | 49 | # return user's attributes |
|
50 | 50 | logger.debug "Authentication successful for '#{login}'" if logger && logger.debug? |
|
51 | 51 | attrs |
|
52 | 52 | rescue Net::LDAP::LdapError => text |
|
53 | 53 | raise "LdapError: " + text |
|
54 | 54 | end |
|
55 | 55 | |
|
56 | 56 | # test the connection to the LDAP |
|
57 | 57 | def test_connection |
|
58 | 58 | ldap_con = initialize_ldap_con(self.account, self.account_password) |
|
59 | 59 | ldap_con.open { } |
|
60 | 60 | rescue Net::LDAP::LdapError => text |
|
61 | 61 | raise "LdapError: " + text |
|
62 | 62 | end |
|
63 | 63 | |
|
64 | 64 | def auth_method_name |
|
65 | 65 | "LDAP" |
|
66 | 66 | end |
|
67 | 67 | |
|
68 | 68 | private |
|
69 | 69 | def initialize_ldap_con(ldap_user, ldap_password) |
|
70 | 70 | Net::LDAP.new( {:host => self.host, |
|
71 | 71 | :port => self.port, |
|
72 | 72 | :auth => { :method => :simple, :username => Iconv.new('iso-8859-15', 'utf-8').iconv(ldap_user), :password => Iconv.new('iso-8859-15', 'utf-8').iconv(ldap_password) }} |
|
73 | 73 | ) |
|
74 | 74 | end |
|
75 | 75 | |
|
76 | 76 | def self.get_attr(entry, attr_name) |
|
77 | 77 | entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name] |
|
78 | 78 | end |
|
79 | 79 | end |
@@ -1,46 +1,42 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Enumeration < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | |
|
21 | 21 | validates_presence_of :opt, :name |
|
22 | 22 | validates_uniqueness_of :name, :scope => [:opt] |
|
23 | 23 | |
|
24 |
OPTIONS = |
|
|
25 | ["Issue priorities", "IPRI"], | |
|
26 | ["Document categories", "DCAT"] | |
|
27 |
|
|
|
24 | OPTIONS = { | |
|
25 | "IPRI" => :enumeration_issue_priorities, | |
|
26 | "DCAT" => :enumeration_doc_categories | |
|
27 | }.freeze | |
|
28 | 28 | |
|
29 | 29 | def self.get_values(option) |
|
30 | 30 | find(:all, :conditions => ['opt=?', option]) |
|
31 | 31 | end |
|
32 | ||
|
33 | def name | |
|
34 | _ self.attributes['name'] | |
|
35 | end | |
|
36 | 32 | |
|
37 | 33 | private |
|
38 | 34 | def check_integrity |
|
39 | 35 | case self.opt |
|
40 | 36 | when "IPRI" |
|
41 | 37 | raise "Can't delete enumeration" if Issue.find(:first, :conditions => ["priority_id=?", self.id]) |
|
42 | 38 | when "DCAT" |
|
43 | 39 | raise "Can't delete enumeration" if Document.find(:first, :conditions => ["category_id=?", self.id]) |
|
44 | 40 | end |
|
45 | 41 | end |
|
46 | 42 | end |
@@ -1,49 +1,45 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class IssueStatus < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_many :workflows, :foreign_key => "old_status_id" |
|
21 | 21 | |
|
22 | 22 | validates_presence_of :name |
|
23 | 23 | validates_uniqueness_of :name |
|
24 | 24 | validates_length_of :html_color, :is=>6 |
|
25 | 25 | validates_format_of :html_color, :with => /^[a-f0-9]*$/i |
|
26 | 26 | |
|
27 | 27 | # Returns the default status for new issues |
|
28 | 28 | def self.default |
|
29 | 29 | find(:first, :conditions =>["is_default=?", true]) |
|
30 | 30 | end |
|
31 | 31 | |
|
32 | 32 | # Returns an array of all statuses the given role can switch to |
|
33 | 33 | def new_statuses_allowed_to(role, tracker) |
|
34 | 34 | statuses = [] |
|
35 | 35 | for workflow in self.workflows |
|
36 | 36 | statuses << workflow.new_status if workflow.role_id == role.id and workflow.tracker_id == tracker.id |
|
37 | 37 | end unless role.nil? or tracker.nil? |
|
38 | 38 | statuses |
|
39 | 39 | end |
|
40 | 40 | |
|
41 | def name | |
|
42 | _ self.attributes['name'] | |
|
43 | end | |
|
44 | ||
|
45 | 41 | private |
|
46 | 42 | def check_integrity |
|
47 | 43 | raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id]) |
|
48 | 44 | end |
|
49 | 45 | end |
@@ -1,50 +1,49 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Mailer < ActionMailer::Base |
|
19 | 19 | |
|
20 | 20 | def issue_change_status(issue) |
|
21 | 21 | # Sends to all project members |
|
22 | 22 | @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } |
|
23 | 23 | @from = 'redmine@somenet.foo' |
|
24 | 24 | @subject = "Issue ##{issue.id} has been updated" |
|
25 | 25 | @body['issue'] = issue |
|
26 | 26 | end |
|
27 | 27 | |
|
28 | 28 | def issue_add(issue) |
|
29 | 29 | # Sends to all project members |
|
30 | 30 | @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } |
|
31 | 31 | @from = 'redmine@somenet.foo' |
|
32 | 32 | @subject = "Issue ##{issue.id} has been reported" |
|
33 | 33 | @body['issue'] = issue |
|
34 | 34 | end |
|
35 | 35 | |
|
36 | 36 | def lost_password(token) |
|
37 | 37 | @recipients = token.user.mail |
|
38 | 38 | @from = 'redmine@somenet.foo' |
|
39 | 39 | @subject = "redMine password" |
|
40 | 40 | @body['token'] = token |
|
41 | 41 | end |
|
42 | 42 | |
|
43 | 43 | def register(token) |
|
44 | 44 | @recipients = token.user.mail |
|
45 | 45 | @from = 'redmine@somenet.foo' |
|
46 | 46 | @subject = "redMine account activation" |
|
47 | 47 | @body['token'] = token |
|
48 |
end |
|
|
49 | ||
|
48 | end | |
|
50 | 49 | end |
@@ -1,29 +1,29 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Member < ActiveRecord::Base |
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 | ||
|
23 |
|
|
|
19 | belongs_to :user | |
|
20 | belongs_to :role | |
|
21 | belongs_to :project | |
|
22 | ||
|
23 | validates_presence_of :role, :user, :project | |
|
24 | 24 | validates_uniqueness_of :user_id, :scope => :project_id |
|
25 | ||
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
25 | ||
|
26 | def name | |
|
27 | self.user.display_name | |
|
28 | end | |
|
29 | 29 | end |
@@ -1,28 +1,28 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class News < ActiveRecord::Base |
|
19 |
|
|
|
20 |
|
|
|
21 | ||
|
22 |
|
|
|
23 | ||
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
19 | belongs_to :project | |
|
20 | belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' | |
|
21 | ||
|
22 | validates_presence_of :title, :description | |
|
23 | ||
|
24 | # returns last created news | |
|
25 | def self.latest | |
|
26 | find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") | |
|
27 | end | |
|
28 | 28 | end |
@@ -1,63 +1,63 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Permission < ActiveRecord::Base |
|
19 |
|
|
|
20 | ||
|
21 |
|
|
|
22 | ||
|
19 | has_and_belongs_to_many :roles | |
|
20 | ||
|
21 | validates_presence_of :controller, :action, :description | |
|
22 | ||
|
23 | 23 | GROUPS = { |
|
24 |
100 => |
|
|
25 | 200 => "Membres", | |
|
26 |
300 => |
|
|
27 |
400 => |
|
|
28 | 1000 => "Issues", | |
|
29 | 1100 => "News", | |
|
30 | 1200 => "Documents", | |
|
31 | 1300 => "Files", | |
|
32 |
|
|
|
24 | 100 => :label_project, | |
|
25 | 200 => :label_member_plural, | |
|
26 | 300 => :label_version_plural, | |
|
27 | 400 => :label_issue_category_plural, | |
|
28 | 1000 => :label_issue_plural, | |
|
29 | 1100 => :label_news_plural, | |
|
30 | 1200 => :label_document_plural, | |
|
31 | 1300 => :label_attachment_plural, | |
|
32 | }.freeze | |
|
33 | 33 | |
|
34 | 34 | @@cached_perms_for_public = nil |
|
35 | 35 | @@cached_perms_for_roles = nil |
|
36 | 36 | |
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
37 | def name | |
|
38 | self.controller + "/" + self.action | |
|
39 | end | |
|
40 | 40 | |
|
41 | 41 | def group_id |
|
42 | 42 | (self.sort / 100)*100 |
|
43 | 43 | end |
|
44 | 44 | |
|
45 | 45 | def self.allowed_to_public(action) |
|
46 | 46 | @@cached_perms_for_public ||= find(:all, :conditions => ["is_public=?", true]).collect {|p| "#{p.controller}/#{p.action}"} |
|
47 | 47 | @@cached_perms_for_public.include? action |
|
48 | 48 | end |
|
49 | 49 | |
|
50 | 50 | def self.allowed_to_role(action, role) |
|
51 | 51 | @@cached_perms_for_roles ||= |
|
52 | 52 | begin |
|
53 | 53 | perms = {} |
|
54 | 54 | find(:all, :include => :roles).each {|p| perms.store "#{p.controller}/#{p.action}", p.roles.collect {|r| r.id } } |
|
55 | 55 | perms |
|
56 | 56 | end |
|
57 | 57 | @@cached_perms_for_roles[action] and @@cached_perms_for_roles[action].include? role |
|
58 | 58 | end |
|
59 | 59 | |
|
60 | 60 | def self.allowed_to_role_expired |
|
61 | 61 | @@cached_perms_for_roles = nil |
|
62 | 62 | end |
|
63 | 63 | end |
@@ -1,31 +1,31 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Role < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 |
|
|
|
20 | has_and_belongs_to_many :permissions | |
|
21 | 21 | has_many :workflows, :dependent => true |
|
22 | 22 | has_many :members |
|
23 | ||
|
24 |
|
|
|
25 |
|
|
|
26 | ||
|
23 | ||
|
24 | validates_presence_of :name | |
|
25 | validates_uniqueness_of :name | |
|
26 | ||
|
27 | 27 | private |
|
28 | 28 | def check_integrity |
|
29 | 29 | raise "Can't delete role" if Member.find(:first, :conditions =>["role_id=?", self.id]) |
|
30 | 30 | end |
|
31 | 31 | end |
@@ -1,35 +1,31 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Tracker < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_many :issues |
|
21 | 21 | has_many :workflows, :dependent => true |
|
22 | 22 | has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_trackers', :association_foreign_key => 'custom_field_id' |
|
23 | 23 | |
|
24 | 24 | validates_presence_of :name |
|
25 | 25 | validates_uniqueness_of :name |
|
26 | 26 | |
|
27 | def name | |
|
28 | _ self.attributes['name'] | |
|
29 | end | |
|
30 | ||
|
31 | 27 | private |
|
32 | 28 | def check_integrity |
|
33 | 29 | raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id]) |
|
34 | 30 | end |
|
35 | 31 | end |
@@ -1,114 +1,115 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | require "digest/sha1" |
|
19 | 19 | |
|
20 | 20 | class User < ActiveRecord::Base |
|
21 | 21 | has_many :memberships, :class_name => 'Member', :include => [ :project, :role ], :dependent => true |
|
22 | 22 | has_many :custom_values, :dependent => true, :as => :customized |
|
23 | 23 | belongs_to :auth_source |
|
24 | 24 | |
|
25 | 25 | attr_accessor :password, :password_confirmation |
|
26 | 26 | attr_accessor :last_before_login_on |
|
27 | 27 | # Prevents unauthorized assignments |
|
28 | 28 | attr_protected :login, :admin, :password, :password_confirmation, :hashed_password |
|
29 | 29 | |
|
30 | 30 | validates_presence_of :login, :firstname, :lastname, :mail |
|
31 | 31 | validates_uniqueness_of :login, :mail |
|
32 | 32 | # Login must contain lettres, numbers, underscores only |
|
33 | 33 | validates_format_of :login, :with => /^[a-z0-9_]+$/i |
|
34 | 34 | validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i |
|
35 | 35 | # Password length between 4 and 12 |
|
36 | 36 | validates_length_of :password, :in => 4..12, :allow_nil => true |
|
37 | 37 | validates_confirmation_of :password, :allow_nil => true |
|
38 | 38 | validates_associated :custom_values, :on => :update |
|
39 | 39 | |
|
40 | 40 | # Account statuses |
|
41 | 41 | STATUS_ACTIVE = 1 |
|
42 | 42 | STATUS_REGISTERED = 2 |
|
43 | 43 | STATUS_LOCKED = 3 |
|
44 | 44 | |
|
45 | 45 | def before_save |
|
46 | 46 | # update hashed_password if password was set |
|
47 | 47 | self.hashed_password = User.hash_password(self.password) if self.password |
|
48 | 48 | end |
|
49 | 49 | |
|
50 | 50 | # Returns the user that matches provided login and password, or nil |
|
51 | 51 | def self.try_to_login(login, password) |
|
52 | 52 | user = find(:first, :conditions => ["login=?", login]) |
|
53 | 53 | if user |
|
54 | 54 | # user is already in local database |
|
55 | 55 | return nil if !user.active? |
|
56 | 56 | if user.auth_source |
|
57 | 57 | # user has an external authentication method |
|
58 | 58 | return nil unless user.auth_source.authenticate(login, password) |
|
59 | 59 | else |
|
60 |
# |
|
|
60 | # authentication with local password | |
|
61 | 61 | return nil unless User.hash_password(password) == user.hashed_password |
|
62 | 62 | end |
|
63 | 63 | else |
|
64 | 64 | # user is not yet registered, try to authenticate with available sources |
|
65 | 65 | attrs = AuthSource.authenticate(login, password) |
|
66 | 66 | if attrs |
|
67 | 67 | onthefly = new(*attrs) |
|
68 | 68 | onthefly.login = login |
|
69 | 69 | onthefly.language = $RDM_DEFAULT_LANG |
|
70 | 70 | if onthefly.save |
|
71 | 71 | user = find(:first, :conditions => ["login=?", login]) |
|
72 | logger.info("User '#{user.login}' created on the fly.") if logger | |
|
72 | 73 | end |
|
73 | 74 | end |
|
74 | 75 | end |
|
75 | 76 | user.update_attribute(:last_login_on, Time.now) if user |
|
76 | 77 | user |
|
77 | 78 | |
|
78 | 79 | rescue => text |
|
79 | 80 | raise text |
|
80 | 81 | end |
|
81 | 82 | |
|
82 | 83 | # Return user's full name for display |
|
83 | 84 | def display_name |
|
84 | 85 | firstname + " " + lastname |
|
85 | 86 | end |
|
86 | 87 | |
|
87 | 88 | def active? |
|
88 | 89 | self.status == STATUS_ACTIVE |
|
89 | 90 | end |
|
90 | 91 | |
|
91 | 92 | def locked? |
|
92 | 93 | self.status == STATUS_LOCKED |
|
93 | 94 | end |
|
94 | 95 | |
|
95 | 96 | def check_password?(clear_password) |
|
96 | 97 | User.hash_password(clear_password) == self.hashed_password |
|
97 | 98 | end |
|
98 | 99 | |
|
99 | 100 | def role_for_project(project_id) |
|
100 | 101 | @role_for_projects ||= |
|
101 | 102 | begin |
|
102 | 103 | roles = {} |
|
103 | 104 | self.memberships.each { |m| roles.store m.project_id, m.role_id } |
|
104 | 105 | roles |
|
105 | 106 | end |
|
106 | 107 | @role_for_projects[project_id] |
|
107 | 108 | end |
|
108 | 109 | |
|
109 | 110 | private |
|
110 | 111 | # Return password digest |
|
111 | 112 | def self.hash_password(clear_password) |
|
112 | 113 | Digest::SHA1.hexdigest(clear_password || "") |
|
113 | 114 | end |
|
114 | 115 | end |
@@ -1,55 +1,57 | |||
|
1 | 1 | <h2><%=l(:label_my_account)%></h2> |
|
2 | 2 | |
|
3 | 3 | <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br /> |
|
4 | 4 | <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>, |
|
5 | 5 | <%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p> |
|
6 | 6 | |
|
7 | 7 | <%= error_messages_for 'user' %> |
|
8 | 8 | |
|
9 | 9 | <div class="splitcontentleft"> |
|
10 | 10 | <div class="box"> |
|
11 | 11 | <h3><%=l(:label_information_plural)%></h3> |
|
12 | 12 | |
|
13 | 13 | <%= start_form_tag :action => 'my_account' %> |
|
14 | 14 | |
|
15 | 15 | <!--[form:user]--> |
|
16 | 16 | <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label><br/> |
|
17 | 17 | <%= text_field 'user', 'firstname' %></p> |
|
18 | 18 | |
|
19 | 19 | <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label><br/> |
|
20 | 20 | <%= text_field 'user', 'lastname' %></p> |
|
21 | 21 | |
|
22 | 22 | <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/> |
|
23 | 23 | <%= text_field 'user', 'mail' %></p> |
|
24 | 24 | |
|
25 | 25 | <p><label for="user_language"><%=l(:field_language)%></label><br/> |
|
26 |
<%= select("user", "language", |
|
|
26 | <%= select("user", "language", lang_options_for_select) %></p> | |
|
27 | 27 | <!--[eoform:user]--> |
|
28 | 28 | |
|
29 | 29 | <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p> |
|
30 | 30 | |
|
31 | 31 | <center><%= submit_tag l(:button_save) %></center> |
|
32 | 32 | <%= end_form_tag %> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | |
|
36 | 36 | |
|
37 | <div class="splitcontentright"> | |
|
37 | <div class="splitcontentright"> | |
|
38 | <% unless @user.auth_source_id %> | |
|
38 | 39 | <div class="box"> |
|
39 | 40 | <h3><%=l(:field_password)%></h3> |
|
40 | 41 | |
|
41 | 42 | <%= start_form_tag :action => 'change_password' %> |
|
42 | 43 | |
|
43 | 44 | <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/> |
|
44 | 45 | <%= password_field_tag 'password', nil, :size => 25 %></p> |
|
45 | 46 | |
|
46 | 47 | <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label><br/> |
|
47 | 48 | <%= password_field_tag 'new_password', nil, :size => 25 %></p> |
|
48 | 49 | |
|
49 | 50 | <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label><br/> |
|
50 | 51 | <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p> |
|
51 | 52 | |
|
52 | 53 | <center><%= submit_tag l(:button_save) %></center> |
|
53 | 54 | <%= end_form_tag %> |
|
54 | </div> | |
|
55 | </div> | |
|
56 | <% end %> | |
|
55 | 57 | </div> No newline at end of file |
@@ -1,46 +1,38 | |||
|
1 | 1 | <h2><%=l(:label_register)%></h2> |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag %> |
|
4 | ||
|
5 | 4 | <%= error_messages_for 'user' %> |
|
6 | 5 | |
|
7 | 6 | <div class="box"> |
|
8 | 7 | <!--[form:user]--> |
|
9 | 8 | <p><label for="user_login"><%=l(:field_login)%></label> <span class="required">*</span><br/> |
|
10 | 9 | <%= text_field 'user', 'login', :size => 25 %></p> |
|
11 | 10 | |
|
12 | 11 | <p><label for="password"><%=l(:field_password)%></label> <span class="required">*</span><br/> |
|
13 | 12 | <%= password_field_tag 'password', nil, :size => 25 %></p> |
|
14 | 13 | |
|
15 | 14 | <p><label for="password_confirmation"><%=l(:field_password_confirmation)%></label> <span class="required">*</span><br/> |
|
16 | 15 | <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p> |
|
17 | 16 | |
|
18 | 17 | <p><label for="user_firstname"><%=l(:field_firstname)%></label> <span class="required">*</span><br/> |
|
19 | 18 | <%= text_field 'user', 'firstname' %></p> |
|
20 | 19 | |
|
21 | 20 | <p><label for="user_lastname"><%=l(:field_lastname)%></label> <span class="required">*</span><br/> |
|
22 | 21 | <%= text_field 'user', 'lastname' %></p> |
|
23 | 22 | |
|
24 | 23 | <p><label for="user_mail"><%=l(:field_mail)%></label> <span class="required">*</span><br/> |
|
25 | 24 | <%= text_field 'user', 'mail' %></p> |
|
26 | 25 | |
|
27 | 26 | <p><label for="user_language"><%=l(:field_language)%></label><br/> |
|
28 |
<%= select("user", "language", |
|
|
27 | <%= select("user", "language", lang_options_for_select) %></p> | |
|
29 | 28 | |
|
30 | <% for custom_value in @custom_values %> | |
|
31 | <div style="float:left;margin-right:10px;"> | |
|
32 | <p><%= content_tag "label", custom_value.custom_field.name %> | |
|
33 | <% if custom_value.custom_field.is_required? %><span class="required">*</span><% end %> | |
|
34 | <br /> | |
|
35 | <%= custom_field_tag custom_value %></p> | |
|
36 | </div> | |
|
29 | <% for custom_value in @custom_values %> | |
|
30 | <p><%= custom_field_tag_with_label custom_value %></p> | |
|
37 | 31 | <% end %> |
|
38 | 32 | |
|
39 | <div style="clear: both;"></div> | |
|
40 | ||
|
41 | 33 | <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p> |
|
42 | 34 | <!--[eoform:user]--> |
|
43 | 35 | </div> |
|
44 | 36 | |
|
45 |
|
|
|
37 | <%= submit_tag l(:button_submit) %> | |
|
46 | 38 | <%= end_form_tag %> |
@@ -1,10 +1,10 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_information_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <p><%=l(:field_version)%>: <strong><%= RDM_APP_NAME %> <%= RDM_APP_VERSION %></strong></p> |
|
4 | 4 | |
|
5 | 5 | <%=l(:label_environment)%>: |
|
6 | 6 | <ul> |
|
7 | 7 | <% Rails::Info.properties.each do |name, value| %> |
|
8 | 8 | <li><%= name %>: <%= value %></li> |
|
9 | 9 | <% end %> |
|
10 | 10 | </ul> No newline at end of file |
@@ -1,37 +1,37 | |||
|
1 | 1 | <h2><%=l(:label_custom_field_plural)%></h2> |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 | 5 | <th><%=l(:field_name)%></th> |
|
6 | 6 | <th><%=l(:field_type)%></th> |
|
7 | 7 | <th><%=l(:field_field_format)%></th> |
|
8 | 8 | <th><%=l(:field_is_required)%></th> |
|
9 | 9 | <th><%=l(:field_is_for_all)%></th> |
|
10 |
<th><%= |
|
|
10 | <th><%=l(:label_used_by)%></th> | |
|
11 | 11 | <th></th> |
|
12 | 12 | </tr> |
|
13 | 13 | <% for custom_field in @custom_fields %> |
|
14 | 14 | <tr class="<%= cycle("odd", "even") %>"> |
|
15 | 15 | <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td> |
|
16 | 16 | <td align="center"><%= l(custom_field.type_name) %></td> |
|
17 | 17 | <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format]) %></td> |
|
18 | 18 | <td align="center"><%= image_tag 'true' if custom_field.is_required? %></td> |
|
19 | 19 | <td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td> |
|
20 | 20 | <td align="center"><%= custom_field.projects.count.to_s + ' ' + lwr(:label_project, custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td> |
|
21 | 21 | <td align="center"> |
|
22 | 22 | <%= start_form_tag :action => 'destroy', :id => custom_field %> |
|
23 | 23 | <%= submit_tag l(:button_delete), :class => "button-small" %> |
|
24 | 24 | <%= end_form_tag %> </td> |
|
25 | 25 | </tr> |
|
26 | 26 | <% end %> |
|
27 | 27 | </table> |
|
28 | 28 | |
|
29 | 29 | <%= pagination_links_full @custom_field_pages %> |
|
30 | 30 | |
|
31 | 31 | <br /> |
|
32 | 32 | <%=l(:label_custom_field_new)%>: |
|
33 | 33 | <ul> |
|
34 | 34 | <li><%= link_to l(:label_issue_plural), :action => 'new', :type => 'IssueCustomField' %></li> |
|
35 | 35 | <li><%= link_to l(:label_project_plural), :action => 'new', :type => 'ProjectCustomField' %></li> |
|
36 | 36 | <li><%= link_to l(:label_user_plural), :action => 'new', :type => 'UserCustomField' %></li> |
|
37 | 37 | </ul> |
@@ -1,15 +1,15 | |||
|
1 | 1 | <%= error_messages_for 'document' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:document]--> |
|
4 | 4 | <p><label for="document_category_id"><%=l(:field_category)%></label><br /> |
|
5 | 5 | <select name="document[category_id]"> |
|
6 | 6 | <%= options_from_collection_for_select @categories, "id", "name", @document.category_id %> |
|
7 | 7 | </select></p> |
|
8 | 8 | |
|
9 | 9 | <p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label><br /> |
|
10 | 10 | <%= text_field 'document', 'title', :size => 60 %></p> |
|
11 | 11 | |
|
12 |
<p><label for="document_description"><%=l(:field_description)%> |
|
|
12 | <p><label for="document_description"><%=l(:field_description)%></label><br /> | |
|
13 | 13 | <%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p> |
|
14 | 14 | <!--[eoform:document]--> |
|
15 | 15 |
@@ -1,8 +1,8 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_document)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @document %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 | |
|
8 | 8 |
@@ -1,47 +1,47 | |||
|
1 | 1 | <h2><%= @document.title %></h2> |
|
2 | 2 | |
|
3 |
<strong><%= |
|
|
4 |
<strong><%= |
|
|
3 | <strong><%=l(:field_description)%>:</strong> <%= @document.description %><br /> | |
|
4 | <strong><%=l(:field_category)%>:</strong> <%= @document.category.name %><br /> | |
|
5 | 5 | <br /> |
|
6 | 6 | |
|
7 | 7 | <% if authorize_for('documents', 'edit') %> |
|
8 |
<%= start_form_tag |
|
|
9 |
<%= submit_tag |
|
|
8 | <%= start_form_tag({ :controller => 'documents', :action => 'edit', :id => @document }, :method => 'get' ) %> | |
|
9 | <%= submit_tag l(:button_edit) %> | |
|
10 | 10 | <%= end_form_tag %> |
|
11 | 11 | <% end %> |
|
12 | 12 | |
|
13 | 13 | <% if authorize_for('documents', 'destroy') %> |
|
14 |
<%= start_form_tag |
|
|
15 |
<%= submit_tag |
|
|
14 | <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> | |
|
15 | <%= submit_tag l(:button_delete) %> | |
|
16 | 16 | <%= end_form_tag %> |
|
17 | 17 | <% end %> |
|
18 | 18 | |
|
19 | 19 | <br /><br /> |
|
20 | 20 | |
|
21 | 21 | <table border="0" cellspacing="1" cellpadding="2" width="100%"> |
|
22 | 22 | <% for attachment in @document.attachments %> |
|
23 | 23 | <tr style="background-color:#CEE1ED"> |
|
24 | 24 | <td><%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %></td> |
|
25 | 25 | <td align="center"><%= format_date(attachment.created_on) %></td> |
|
26 | 26 | <td align="center"><%= attachment.author.display_name %></td> |
|
27 |
<td><%= human_size(attachment.filesize) %><br /><%= attachment.downloads %> |
|
|
27 | <td><%= human_size(attachment.filesize) %><br /><%= lwr(:label_download, attachment.downloads) %></td> | |
|
28 | 28 | |
|
29 | 29 | <% if authorize_for('documents', 'destroy_attachment') %> |
|
30 | 30 | <td align="center"> |
|
31 | 31 | <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %> |
|
32 |
<%= submit_tag |
|
|
32 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
33 | 33 | <%= end_form_tag %> |
|
34 | 34 | </tr> |
|
35 | 35 | <% end %> |
|
36 | 36 | |
|
37 | 37 | <% end %> |
|
38 | 38 | </table> |
|
39 | 39 | <br /> |
|
40 | 40 | |
|
41 | 41 | <% if authorize_for('documents', 'add_attachment') %> |
|
42 | 42 | <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true) %> |
|
43 |
<%= |
|
|
44 |
<%= submit_tag |
|
|
43 | <%=l(:label_attachment_new)%><br /><%= file_field 'attachment', 'file' %> | |
|
44 | <%= submit_tag l(:button_add) %> | |
|
45 | 45 | <%= end_form_tag %> |
|
46 | 46 | <% end %> |
|
47 | 47 |
@@ -1,9 +1,9 | |||
|
1 | 1 | <%= error_messages_for 'enumeration' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:optvalue]--> |
|
4 | 4 | <%= hidden_field 'enumeration', 'opt' %> |
|
5 | 5 | |
|
6 |
<p><label for="enumeration_name"><%= |
|
|
6 | <p><label for="enumeration_name"><%=l(:field_name)%></label><br/> | |
|
7 | 7 | <%= text_field 'enumeration', 'name' %></p> |
|
8 | 8 | <!--[eoform:optvalue]--> |
|
9 | 9 |
@@ -1,10 +1,10 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_enumerations)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'update', :id => @enumeration %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 | |
|
8 | 8 | <%= start_form_tag :action => 'destroy', :id => @enumeration %> |
|
9 |
<%= submit_tag |
|
|
9 | <%= submit_tag l(:button_delete) %> | |
|
10 | 10 | <%= end_form_tag %> No newline at end of file |
@@ -1,22 +1,21 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_enumerations)%></h2> | |
|
2 | 2 | |
|
3 | <% for option in Enumeration::OPTIONS %> | |
|
3 | <% Enumeration::OPTIONS.each do |option, name| %> | |
|
4 | 4 | |
|
5 |
<% if @params[:opt]==option |
|
|
5 | <% if @params[:opt]==option %> | |
|
6 | 6 | |
|
7 |
<p><%= image_tag 'dir_open' %> <b><%= |
|
|
7 | <p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p> | |
|
8 | 8 | <ul> |
|
9 |
<% for value in Enumeration |
|
|
9 | <% for value in Enumeration.find(:all, :conditions => ["opt = ?", option]) %> | |
|
10 | 10 | <li><%= link_to value.name, :action => 'edit', :id => value %></li> |
|
11 | 11 | <% end %> |
|
12 | 12 | </ul> |
|
13 | 13 | <ul> |
|
14 |
<li><%= link_to ('» ' + |
|
|
14 | <li><%= link_to ('» ' + l(:label_new)), :action => 'new', :opt => option %></li> | |
|
15 | 15 | </ul> |
|
16 | 16 | |
|
17 | 17 | <% else %> |
|
18 |
<p><%= image_tag 'dir' %> <%= link_to |
|
|
18 | <p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p> | |
|
19 | 19 | <% end %> |
|
20 | 20 | |
|
21 | <% end %> | |
|
22 | ||
|
21 | <% end %> No newline at end of file |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_enumeration_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'create' %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,7 +1,7 | |||
|
1 | 1 | <%= error_messages_for 'issue_category' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:issue_category]--> |
|
4 |
<p><label for="issue_category_name"><% |
|
|
4 | <p><label for="issue_category_name"><%l(:field_name)%></label><br/> | |
|
5 | 5 | <%= text_field 'issue_category', 'name' %></p> |
|
6 | 6 | <!--[eoform:issue_category]--> |
|
7 | 7 |
@@ -1,6 +1,6 | |||
|
1 |
<h2> |
|
|
1 | <h2><%=l(:label_issue_category)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @category %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,17 +1,17 | |||
|
1 | 1 | <%= error_messages_for 'issue_status' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:issue_status]--> |
|
4 |
<p><label for="issue_status_name"><%= |
|
|
4 | <p><label for="issue_status_name"><%=l(:field_name)%></label> <span class="required">*</span><br/> | |
|
5 | 5 | <%= text_field 'issue_status', 'name' %></p> |
|
6 | 6 | |
|
7 | 7 | <p><%= check_box 'issue_status', 'is_closed' %> |
|
8 |
<label for="issue_status_is_closed"><%= |
|
|
8 | <label for="issue_status_is_closed"><%=l(:field_is_closed)%></label></p> | |
|
9 | 9 | |
|
10 | 10 | <p><%= check_box 'issue_status', 'is_default' %> |
|
11 |
<label for="issue_status_is_default"><%= |
|
|
11 | <label for="issue_status_is_default"><%=l(:field_is_default)%></label></p> | |
|
12 | 12 | |
|
13 |
<p><label for="issue_status_html_color"><%= |
|
|
13 | <p><label for="issue_status_html_color"><%=l(:field_html_color)%></label> | |
|
14 | 14 | #<%= text_field 'issue_status', 'html_color', :maxlength => 6 %> <span class="required">*</span></p> |
|
15 | 15 | |
|
16 | 16 | <!--[eoform:issue_status]--> |
|
17 | 17 |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue_status)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'update', :id => @issue_status %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,30 +1,30 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue_status_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 |
<th><%= |
|
|
6 |
<th><%= |
|
|
7 |
<th><%= |
|
|
8 |
<th><%= |
|
|
5 | <th><%=l(:field_status)%></th> | |
|
6 | <th><%=l(:field_is_default)%></th> | |
|
7 | <th><%=l(:field_is_closed)%></th> | |
|
8 | <th><%=l(:field_html_color)%></th> | |
|
9 | 9 | <th></th> |
|
10 | 10 | </tr> |
|
11 | 11 | |
|
12 | 12 | <% for status in @issue_statuses %> |
|
13 | 13 | <tr class="<%= cycle("odd", "even") %>"> |
|
14 | 14 | <td><%= link_to status.name, :action => 'edit', :id => status %></td> |
|
15 | 15 | <td align="center"><%= image_tag 'true' if status.is_default? %></td> |
|
16 | 16 | <td align="center"><%= image_tag 'true' if status.is_closed? %></td> |
|
17 | 17 | <td bgcolor="#<%= status.html_color %>"> </td> |
|
18 | 18 | <td align="center"> |
|
19 | 19 | <%= start_form_tag :action => 'destroy', :id => status %> |
|
20 |
<%= submit_tag |
|
|
20 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
21 | 21 | <%= end_form_tag %> |
|
22 | 22 | </td> |
|
23 | 23 | </tr> |
|
24 | 24 | <% end %> |
|
25 | 25 | </table> |
|
26 | 26 | |
|
27 | 27 | <%= pagination_links_full @issue_status_pages %> |
|
28 | 28 | <br /> |
|
29 | 29 | |
|
30 |
<%= link_to '» ' + |
|
|
30 | <%= link_to '» ' + l(:label_issue_status_new), :action => 'new' %> |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue_status_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'create' %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,28 +1,28 | |||
|
1 | 1 | <% if issues.length > 0 %> |
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 | </tr> | |
|
10 | <% for issue in issues %> | |
|
11 | <tr bgcolor="#<%= issue.status.html_color %>"> | |
|
12 | <td align="center"> | |
|
13 | <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %><br /> | |
|
14 | </td> | |
|
15 | <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br /> | |
|
16 | <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td> | |
|
17 | <td> | |
|
18 | <p class="small"><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></p> | |
|
19 | </td> | |
|
20 | </tr> | |
|
21 | <% end %> | |
|
22 | </table> | |
|
23 | </td> | |
|
2 | <table cellspacing="0" cellpadding="1" width="100%" border="0" class="listTable"> | |
|
3 | <tr><td> | |
|
4 | <table width="100%" border="0" cellspacing="1" cellpadding="2" class="listTableContent"> | |
|
5 | <tr class="ListHead"> | |
|
6 | <th>#</th> | |
|
7 | <th><%=l(:field_tracker)%></th> | |
|
8 | <th><%=l(:field_subject)%></th> | |
|
24 | 9 | </tr> |
|
25 | </table> | |
|
10 | <% for issue in issues %> | |
|
11 | <tr bgcolor="#<%= issue.status.html_color %>"> | |
|
12 | <td align="center"> | |
|
13 | <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %><br /> | |
|
14 | </td> | |
|
15 | <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br /> | |
|
16 | <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td> | |
|
17 | <td> | |
|
18 | <p class="small"><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></p> | |
|
19 | </td> | |
|
20 | </tr> | |
|
21 | <% end %> | |
|
22 | </table> | |
|
23 | </td> | |
|
24 | </tr> | |
|
25 | </table> | |
|
26 | 26 | <% else %> |
|
27 | <%=_('No issue')%> | |
|
27 | <i><%=l(:label_no_data)%></i> | |
|
28 | 28 | <% end %> No newline at end of file |
@@ -1,32 +1,31 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= error_messages_for 'history' %> |
|
4 | 4 | <%= start_form_tag :action => 'change_status', :id => @issue %> |
|
5 | 5 | |
|
6 | 6 | <%= hidden_field_tag 'confirm', 1 %> |
|
7 | 7 | <%= hidden_field 'history', 'status_id' %> |
|
8 | 8 | |
|
9 | 9 | <div class="box"> |
|
10 |
<p><%= |
|
|
10 | <p><%=l(:label_issue_status_new)%>: <b><%= @history.status.name %></b></p> | |
|
11 | 11 | |
|
12 | 12 | <div> |
|
13 |
<p><label for="issue_assigned_to_id"><%= |
|
|
13 | <p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br/> | |
|
14 | 14 | <select name="issue[assigned_to_id]"> |
|
15 | 15 | <option value=""></option> |
|
16 | 16 | <%= options_from_collection_for_select @assignable_to, "id", "display_name", @issue.assigned_to_id %></p> |
|
17 | 17 | </select></p> |
|
18 | 18 | </div> |
|
19 | 19 | |
|
20 |
<p><label for="issue_fixed_version"><%= |
|
|
20 | <p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label><br/> | |
|
21 | 21 | <select name="issue[fixed_version_id]"> |
|
22 | 22 | <option value="">--none--</option> |
|
23 | 23 | <%= options_from_collection_for_select @issue.project.versions, "id", "name", @issue.fixed_version_id %> |
|
24 | 24 | </select></p> |
|
25 | 25 | |
|
26 |
<p><label for="history_notes"><%= |
|
|
26 | <p><label for="history_notes"><%=l(:field_notes)%></label><br /> | |
|
27 | 27 | <%= text_area 'history', 'notes', :cols => 60, :rows => 10 %></p> |
|
28 | 28 | </div> |
|
29 | ||
|
30 | 29 | |
|
31 |
<%= submit_tag |
|
|
30 | <%= submit_tag l(:button_save) %> | |
|
32 | 31 | <%= end_form_tag %> |
@@ -1,53 +1,56 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= error_messages_for 'issue' %> |
|
4 | 4 | <%= start_form_tag :action => 'edit', :id => @issue %> |
|
5 | 5 | |
|
6 | 6 | <div class="box"> |
|
7 | 7 | <!--[form:issue]--> |
|
8 |
<p><%= |
|
|
8 | <p><%=l(:field_status)%>: <b><%= @issue.status.name %></b></p> | |
|
9 | 9 | |
|
10 | 10 | <div style="float:left;margin-right:10px;"> |
|
11 |
<p><label for="issue_priority_id"><%= |
|
|
11 | <p><label for="issue_priority_id"><%=l(:field_priority)%> <span class="required">*</span></label><br/> | |
|
12 | 12 | <select name="issue[priority_id]"> |
|
13 | 13 | <%= options_from_collection_for_select @priorities, "id", "name", @issue.priority_id %></p> |
|
14 | 14 | </select></p> |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div style="float:left;margin-right:10px;"> |
|
18 |
<p><label for="issue_assigned_to_id"><%= |
|
|
18 | <p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br/> | |
|
19 | 19 | <select name="issue[assigned_to_id]"> |
|
20 | 20 | <option value=""></option> |
|
21 | 21 | <%= options_from_collection_for_select @issue.project.members, "user_id", "name", @issue.assigned_to_id %></p> |
|
22 | 22 | </select></p> |
|
23 | 23 | </div> |
|
24 | 24 | |
|
25 | 25 | <div> |
|
26 |
<p><label for="issue_category_id"><%= |
|
|
26 | <p><label for="issue_category_id"><%=l(:field_category)%></label><br/> | |
|
27 | 27 | <select name="issue[category_id]"> |
|
28 | 28 | <option value=""></option> |
|
29 | 29 | <%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %></p> |
|
30 | 30 | </select></p> |
|
31 | 31 | </div> |
|
32 | 32 | |
|
33 |
<p><label for="issue_subject"><%= |
|
|
33 | <p><label for="issue_subject"><%=l(:field_subject)%></label><span class="required">*</span><br/> | |
|
34 | 34 | <%= text_field 'issue', 'subject', :size => 60 %></p> |
|
35 | 35 | |
|
36 |
<p><label for="issue_description"><%= |
|
|
36 | <p><label for="issue_description"><%=l(:field_description)%></label><span class="required">*</span><br/> | |
|
37 | 37 | <%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p> |
|
38 | ||
|
39 | <p><label for="issue_due_date"><%=l(:field_due_date)%></label><br /> | |
|
40 | <%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %></p> | |
|
38 | 41 | |
|
39 | 42 | <% for custom_value in @custom_values %> |
|
40 | 43 | <p><%= custom_field_tag_with_label custom_value %></p> |
|
41 | 44 | <% end %> |
|
42 | 45 | |
|
43 |
<p><label for="issue_fixed_version"><%= |
|
|
46 | <p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label><br/> | |
|
44 | 47 | <select name="issue[fixed_version_id]"> |
|
45 | 48 | <option value="">--none--</option> |
|
46 | 49 | <%= options_from_collection_for_select @project.versions, "id", "name", @issue.fixed_version_id %> |
|
47 | 50 | </select></p> |
|
48 | 51 | |
|
49 | 52 | <!--[eoform:issue]--> |
|
50 | 53 | </div> |
|
51 | 54 | |
|
52 |
<%= submit_tag |
|
|
55 | <%= submit_tag l(:button_save) %> | |
|
53 | 56 | <%= end_form_tag %> |
@@ -1,93 +1,94 | |||
|
1 | ||
|
2 | <h2><%=_(@issue.tracker.name)%> #<%= @issue.id %> - <%= @issue.subject %></h2> | |
|
1 | <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2> | |
|
3 | 2 | |
|
4 | 3 | <div class="box"> |
|
5 | <p><b><%=_('Status')%>:</b> <%= @issue.status.name %></p> | |
|
6 | <p><b><%=_('Priority')%>:</b> <%= @issue.priority.name %></p> | |
|
7 | <p><b><%=_('Category')%>:</b> <%= @issue.category.name unless @issue.category_id.nil? %></p> | |
|
8 | <p><b><%=_('Author')%>:</b> <%= @issue.author.display_name %></p> | |
|
9 | <p><b><%=_('Assigned to')%>:</b> <%= @issue.assigned_to.display_name unless @issue.assigned_to.nil? %></p> | |
|
10 | ||
|
11 |
<p><b><%= |
|
|
12 | <p><b><%=_('Description')%>:</b> <%= simple_format auto_link @issue.description %></p> | |
|
13 |
<p><b><%= |
|
|
4 | <p> | |
|
5 | <b><%=l(:field_status)%> :</b> <%= @issue.status.name %>     | |
|
6 | <b><%=l(:field_priority)%> :</b> <%= @issue.priority.name %>     | |
|
7 | <b><%=l(:field_assigned_to)%> :</b> <%= @issue.assigned_to ? @issue.assigned_to.display_name : "-" %>     | |
|
8 | <b><%=l(:field_category)%> :</b> <%= @issue.category ? @issue.category.name : "-" %> | |
|
9 | </p> | |
|
10 | <p><b><%=l(:field_author)%> :</b> <%= @issue.author.display_name %></p> | |
|
11 | <p><b><%=l(:field_subject)%> :</b> <%= @issue.subject %></p> | |
|
12 | <p><b><%=l(:field_description)%> :</b> <%= simple_format auto_link @issue.description %></p> | |
|
13 | <p><b><%=l(:field_due_date)%> :</b> <%= format_date(@issue.due_date) %></p> | |
|
14 | <p><b><%=l(:field_created_on)%> :</b> <%= format_date(@issue.created_on) %></p> | |
|
14 | 15 | |
|
15 | 16 | <% for custom_value in @custom_values %> |
|
16 | <p><b><%= custom_value.custom_field.name %></b>: <%= show_value custom_value %></p> | |
|
17 | <p><b><%= custom_value.custom_field.name %></b> : <%= show_value custom_value %></p> | |
|
17 | 18 | <% end %> |
|
18 | 19 | |
|
19 | 20 | <% if authorize_for('issues', 'edit') %> |
|
20 | 21 | <%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %> |
|
21 |
<%= submit_tag |
|
|
22 | <%= submit_tag l(:button_edit) %> | |
|
22 | 23 | <%= end_form_tag %> |
|
23 | 24 | |
|
24 | 25 | <% end %> |
|
25 | 26 | |
|
26 | 27 | <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %> |
|
27 | 28 | <%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %> |
|
28 |
<label for="history_status_id"><%= |
|
|
29 | <label for="history_status_id"><%=l(:label_change_status)%> :</label> | |
|
29 | 30 | <select name="history[status_id]"> |
|
30 | 31 | <%= options_from_collection_for_select @status_options, "id", "name" %> |
|
31 | 32 | </select> |
|
32 |
<%= submit_tag |
|
|
33 | <%= submit_tag l(:button_change) %> | |
|
33 | 34 | <%= end_form_tag %> |
|
34 | 35 | |
|
35 | 36 | <% end %> |
|
36 | 37 | |
|
37 | 38 | <% if authorize_for('issues', 'destroy') %> |
|
38 | 39 | <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %> |
|
39 |
<%= submit_tag |
|
|
40 | <%= submit_tag l(:button_delete) %> | |
|
40 | 41 | <%= end_form_tag %> |
|
41 | 42 | |
|
42 | 43 | <% end %> |
|
43 | 44 | |
|
44 | 45 | </div> |
|
45 | 46 | |
|
46 | 47 | |
|
47 | 48 | <div class="splitcontentleft"> |
|
48 | 49 | <div class="box"> |
|
49 |
<h3><%= |
|
|
50 | <h3><%=l(:label_history)%></h3> | |
|
50 | 51 | <table width="100%"> |
|
51 | 52 | <% for history in @issue.histories.find(:all, :include => :author) %> |
|
52 | 53 | <tr> |
|
53 | 54 | <td><%= format_date(history.created_on) %></td> |
|
54 | 55 | <td><%= history.author.display_name %></td> |
|
55 | 56 | <td><b><%= history.status.name %></b></td> |
|
56 | 57 | </tr> |
|
57 | 58 | <% if history.notes? %> |
|
58 | 59 | <tr><td colspan=3><div class="notes"><%= history.notes %></td></tr> |
|
59 | 60 | <% end %> |
|
60 | 61 | <% end %> |
|
61 | 62 | </table> |
|
62 | 63 | </div> |
|
63 | 64 | </div> |
|
64 | 65 | |
|
65 | 66 | <div class="splitcontentright"> |
|
66 | 67 | <div class="box"> |
|
67 |
<h3><%= |
|
|
68 | <h3><%=l(:label_attachment_plural)%></h3> | |
|
68 | 69 | <table width="100%"> |
|
69 | 70 | <% for attachment in @issue.attachments %> |
|
70 | 71 | <tr> |
|
71 | 72 | <td><%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.filesize) %>)</td> |
|
72 | 73 | <td><%= format_date(attachment.created_on) %></td> |
|
73 | 74 | <td><%= attachment.author.display_name %></td> |
|
74 | 75 | <% if authorize_for('issues', 'destroy_attachment') %> |
|
75 | 76 | <td> |
|
76 | 77 | <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %> |
|
77 |
<%= submit_tag |
|
|
78 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
78 | 79 | <%= end_form_tag %> |
|
79 | 80 | </td> |
|
80 | 81 | <% end %> |
|
81 | 82 | </tr> |
|
82 | 83 | <% end %> |
|
83 | 84 | </table> |
|
84 | 85 | <br /> |
|
85 | 86 | <% if authorize_for('issues', 'add_attachment') %> |
|
86 | 87 | <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true) %> |
|
87 |
<%= |
|
|
88 |
<%= submit_tag |
|
|
88 | <%=l(:label_attachment_new)%>: <%= file_field 'attachment', 'file' %> | |
|
89 | <%= submit_tag l(:button_add) %> | |
|
89 | 90 | <%= end_form_tag %> |
|
90 | 91 | <% end %> |
|
91 | 92 | </div> |
|
92 | 93 | </div> |
|
93 | 94 |
@@ -1,134 +1,134 | |||
|
1 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2 | 2 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
|
3 | 3 | <head> |
|
4 | 4 | <title><%= $RDM_HEADER_TITLE %></title> |
|
5 | 5 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|
6 | 6 | <meta name="description" content="redMine" /> |
|
7 | 7 | <meta name="keywords" content="issue,bug,tracker" /> |
|
8 | 8 | <%= stylesheet_link_tag "application" %> |
|
9 | 9 | <%= stylesheet_link_tag "menu" %> |
|
10 | 10 | <%= stylesheet_link_tag "rails" %> |
|
11 | 11 | <%= javascript_include_tag :defaults %> |
|
12 | 12 | <%= javascript_include_tag 'menu' %> |
|
13 | 13 | |
|
14 | 14 | <script type='text/javascript'> |
|
15 | 15 | var menu_contenu=' \ |
|
16 | 16 | <div id="menuAdmin" class="menu" onmouseover="menuMouseover(event)"> \ |
|
17 |
<a class="menuItem" href="\/admin\/projects" onmouseover="menuItemMouseover(event,\'menuProjects\');"><span class="menuItemText"><%= |
|
|
18 |
<a class="menuItem" href="\/users" onmouseover="menuItemMouseover(event,\'menuUsers\');"><span class="menuItemText"><%= |
|
|
19 |
<a class="menuItem" href="\/roles"><%= |
|
|
20 |
<a class="menuItem" href="\/trackers" onmouseover="menuItemMouseover(event,\'menuTrackers\');"><span class="menuItemText"><%= |
|
|
21 |
<a class="menuItem" href="\/custom_fields"><%= |
|
|
22 |
<a class="menuItem" href="\/enumerations"><%= |
|
|
23 |
<a class="menuItem" href="\/admin\/mail_options"><%= |
|
|
17 | <a class="menuItem" href="\/admin\/projects" onmouseover="menuItemMouseover(event,\'menuProjects\');"><span class="menuItemText"><%=l(:label_project_plural)%><\/span><span class="menuItemArrow">▶<\/span><\/a> \ | |
|
18 | <a class="menuItem" href="\/users" onmouseover="menuItemMouseover(event,\'menuUsers\');"><span class="menuItemText"><%=l(:label_user_plural)%><\/span><span class="menuItemArrow">▶<\/span><\/a> \ | |
|
19 | <a class="menuItem" href="\/roles"><%=l(:label_role_and_permissions)%><\/a> \ | |
|
20 | <a class="menuItem" href="\/trackers" onmouseover="menuItemMouseover(event,\'menuTrackers\');"><span class="menuItemText"><%=l(:label_tracker_plural)%><\/span><span class="menuItemArrow">▶<\/span><\/a> \ | |
|
21 | <a class="menuItem" href="\/custom_fields"><%=l(:label_custom_field_plural)%><\/a> \ | |
|
22 | <a class="menuItem" href="\/enumerations"><%=l(:label_enumerations)%><\/a> \ | |
|
23 | <a class="menuItem" href="\/admin\/mail_options"><%=l(:field_mail_notification)%><\/a> \ | |
|
24 | 24 | <a class="menuItem" href="\/auth_sources"><%=l(:label_authentication)%><\/a> \ |
|
25 |
<a class="menuItem" href="\/admin\/info"><%= |
|
|
25 | <a class="menuItem" href="\/admin\/info"><%=l(:label_information_plural)%><\/a> \ | |
|
26 | 26 | <\/div> \ |
|
27 | 27 | <div id="menuTrackers" class="menu"> \ |
|
28 |
<a class="menuItem" href="\/issue_statuses"><%= |
|
|
29 |
<a class="menuItem" href="\/roles\/workflow"><%= |
|
|
28 | <a class="menuItem" href="\/issue_statuses"><%=l(:label_issue_status_plural)%><\/a> \ | |
|
29 | <a class="menuItem" href="\/roles\/workflow"><%=l(:label_workflow)%><\/a> \ | |
|
30 | 30 | <\/div> \ |
|
31 |
<div id="menuProjects" class="menu"><a class="menuItem" href="\/projects\/add"><%= |
|
|
32 |
<div id="menuUsers" class="menu"><a class="menuItem" href="\/users\/add"><%= |
|
|
31 | <div id="menuProjects" class="menu"><a class="menuItem" href="\/projects\/add"><%=l(:label_new)%><\/a><\/div> \ | |
|
32 | <div id="menuUsers" class="menu"><a class="menuItem" href="\/users\/add"><%=l(:label_new)%><\/a><\/div> \ | |
|
33 | 33 | \ |
|
34 | 34 | <% unless @project.nil? || @project.id.nil? %> \ |
|
35 | 35 | <div id="menuProject" class="menu" onmouseover="menuMouseover(event)"> \ |
|
36 |
<%= link_to |
|
|
37 |
<%= link_to |
|
|
38 |
<%= link_to |
|
|
39 |
<%= link_to |
|
|
40 |
<%= link_to |
|
|
41 |
<%= link_to |
|
|
42 |
<%= link_to |
|
|
43 |
<%= link_to_if_authorized |
|
|
36 | <%= link_to l(:label_issue_plural), {:controller => 'projects', :action => 'list_issues', :id => @project }, :class => "menuItem" %> \ | |
|
37 | <%= link_to l(:label_report_plural), {:controller => 'reports', :action => 'issue_report', :id => @project }, :class => "menuItem" %> \ | |
|
38 | <%= link_to l(:label_news_plural), {:controller => 'projects', :action => 'list_news', :id => @project }, :class => "menuItem" %> \ | |
|
39 | <%= link_to l(:label_change_log), {:controller => 'projects', :action => 'changelog', :id => @project }, :class => "menuItem" %> \ | |
|
40 | <%= link_to l(:label_document_plural), {:controller => 'projects', :action => 'list_documents', :id => @project }, :class => "menuItem" %> \ | |
|
41 | <%= link_to l(:label_member_plural), {:controller => 'projects', :action => 'list_members', :id => @project }, :class => "menuItem" %> \ | |
|
42 | <%= link_to l(:label_attachment_plural), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %> \ | |
|
43 | <%= link_to_if_authorized l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project }, :class => "menuItem" %> \ | |
|
44 | 44 | <\/div> \ |
|
45 | 45 | <% end %> \ |
|
46 | 46 | '; |
|
47 | 47 | </script> |
|
48 | 48 | |
|
49 | 49 | </head> |
|
50 | 50 | |
|
51 | 51 | <body> |
|
52 | 52 | <div id="container" > |
|
53 | 53 | |
|
54 | 54 | <div id="header"> |
|
55 | 55 | <div style="float: left;"> |
|
56 | 56 | <h1><%= $RDM_HEADER_TITLE %></h1> |
|
57 | 57 | <h2><%= $RDM_HEADER_SUBTITLE %></h2> |
|
58 | 58 | </div> |
|
59 | 59 | <div style="float: right; padding-right: 1em; padding-top: 0.2em;"> |
|
60 | 60 | <% if loggedin? %><small><%=l(:label_logged_as)%> <b><%= @logged_in_user.login %></b></small><% end %> |
|
61 | 61 | </div> |
|
62 | 62 | </div> |
|
63 | 63 | |
|
64 | 64 | <div id="navigation"> |
|
65 | 65 | <ul> |
|
66 | 66 | <li class="selected"><%= link_to l(:label_home), { :controller => '' }, :class => "picHome" %></li> |
|
67 | 67 | <li><%= link_to l(:label_my_page), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li> |
|
68 | 68 | <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "picProject" %></li> |
|
69 | 69 | |
|
70 | 70 | <% unless @project.nil? || @project.id.nil? %> |
|
71 | 71 | <li><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "picProject", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li> |
|
72 | 72 | <% end %> |
|
73 | 73 | |
|
74 | 74 | <% if loggedin? %> |
|
75 | 75 | <li><%= link_to l(:label_my_account), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li> |
|
76 | 76 | <% end %> |
|
77 | 77 | |
|
78 | 78 | <% if admin_loggedin? %> |
|
79 | 79 | <li><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "picAdmin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li> |
|
80 | 80 | <% end %> |
|
81 | 81 | |
|
82 | 82 | <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li> |
|
83 | 83 | |
|
84 | 84 | <% if loggedin? %> |
|
85 | 85 | <li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li> |
|
86 | 86 | <% else %> |
|
87 | 87 | <li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li> |
|
88 | 88 | <% end %> |
|
89 | 89 | </ul> |
|
90 | 90 | </div> |
|
91 | 91 | <script type='text/javascript'>if(document.getElementById) {document.write(menu_contenu);}</script> |
|
92 | 92 | |
|
93 | 93 | <div id="subcontent"> |
|
94 | 94 | |
|
95 | 95 | <% unless @project.nil? || @project.id.nil? %> |
|
96 | 96 | <h2><%= @project.name %></h2> |
|
97 | 97 | <ul class="menublock"> |
|
98 |
<li><%= link_to |
|
|
99 |
<li><%= link_to |
|
|
100 |
<li><%= link_to |
|
|
101 |
<li><%= link_to |
|
|
102 |
<li><%= link_to |
|
|
103 |
<li><%= link_to |
|
|
104 |
<li><%= link_to |
|
|
105 |
<li><%= link_to |
|
|
106 |
<li><%= link_to_if_authorized |
|
|
98 | <li><%= link_to l(:label_overview), :controller => 'projects', :action => 'show', :id => @project %></li> | |
|
99 | <li><%= link_to l(:label_issue_plural), :controller => 'projects', :action => 'list_issues', :id => @project %></li> | |
|
100 | <li><%= link_to l(:label_report_plural), :controller => 'reports', :action => 'issue_report', :id => @project %></li> | |
|
101 | <li><%= link_to l(:label_news_plural), :controller => 'projects', :action => 'list_news', :id => @project %></li> | |
|
102 | <li><%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %></li> | |
|
103 | <li><%= link_to l(:label_document_plural), :controller => 'projects', :action => 'list_documents', :id => @project %></li> | |
|
104 | <li><%= link_to l(:label_member_plural), :controller => 'projects', :action => 'list_members', :id => @project %></li> | |
|
105 | <li><%= link_to l(:label_attachment_plural), :controller => 'projects', :action => 'list_files', :id => @project %></li> | |
|
106 | <li><%= link_to_if_authorized l(:label_settings), :controller => 'projects', :action => 'settings', :id => @project %></li> | |
|
107 | 107 | </ul> |
|
108 | 108 | <% end %> |
|
109 | 109 | |
|
110 | 110 | <% if loggedin? and @logged_in_user.memberships.length > 0 %> |
|
111 |
<h2><%= |
|
|
111 | <h2><%=l(:label_my_projects) %></h2> | |
|
112 | 112 | <ul class="menublock"> |
|
113 | 113 | <% for membership in @logged_in_user.memberships %> |
|
114 | 114 | <li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li> |
|
115 | 115 | <% end %> |
|
116 | 116 | </ul> |
|
117 | 117 | <% end %> |
|
118 | 118 | </div> |
|
119 | 119 | |
|
120 | 120 | <div id="content"> |
|
121 | 121 | <% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %> |
|
122 | 122 | <%= @content_for_layout %> |
|
123 | 123 | </div> |
|
124 | 124 | |
|
125 | 125 | <div id="footer"> |
|
126 | 126 | <p> |
|
127 | 127 | <%= auto_link $RDM_FOOTER_SIG %> | |
|
128 | 128 | <a href="http://redmine.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %> |
|
129 | 129 | </p> |
|
130 | 130 | </div> |
|
131 | 131 | |
|
132 | 132 | </div> |
|
133 | 133 | </body> |
|
134 | 134 | </html> No newline at end of file |
@@ -1,6 +1,6 | |||
|
1 |
<%= |
|
|
2 |
<%= |
|
|
1 | <%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %> | |
|
2 | <%=l(:field_author)%>: <%= issue.author.display_name %> | |
|
3 | 3 | |
|
4 | 4 | <%= issue.description %> |
|
5 | 5 | |
|
6 | 6 | http://<%= $RDM_HOST_NAME %>/issues/show/<%= issue.id %> No newline at end of file |
@@ -1,13 +1,13 | |||
|
1 | 1 | <%= error_messages_for 'news' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:news]--> |
|
4 |
<p><label for="news_title"><%= |
|
|
4 | <p><label for="news_title"><%=l(:field_title)%></label> <span class="required">*</span><br/> | |
|
5 | 5 | <%= text_field 'news', 'title', :size => 60 %></p> |
|
6 | 6 | |
|
7 |
<p><label for="news_summary"><%= |
|
|
7 | <p><label for="news_summary"><%=l(:field_summary)%></label><br/> | |
|
8 | 8 | <%= text_area 'news', 'summary', :cols => 60, :rows => 2 %></p> |
|
9 | 9 | |
|
10 |
<p><label for="news_description"><%= |
|
|
10 | <p><label for="news_description"><%=l(:field_description)%> <span class="required">*</span></label><br/> | |
|
11 | 11 | <%= text_area 'news', 'description', :cols => 60, :rows => 10 %></p> |
|
12 | 12 | <!--[eoform:news]--> |
|
13 | 13 |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_news)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @news %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,10 +1,10 | |||
|
1 | 1 | <h2><%= @news.title %></h2> |
|
2 | 2 | |
|
3 | 3 | <p> |
|
4 |
<b><%= |
|
|
5 |
<b><%= |
|
|
6 |
<b><%= |
|
|
4 | <b><%=l(:field_summary)%></b>: <%= @news.summary %><br /> | |
|
5 | <b><%=l(:field_author)%></b>: <%= @news.author.display_name %><br /> | |
|
6 | <b><%=l(:field_created_on)%></b>: <%= format_time(@news.created_on) %> | |
|
7 | 7 | </p> |
|
8 | 8 | |
|
9 | 9 | <%= simple_format auto_link @news.description %> |
|
10 | 10 |
@@ -1,41 +1,41 | |||
|
1 | 1 | <%= error_messages_for 'project' %> |
|
2 | 2 | |
|
3 | 3 | <div class="box"> |
|
4 | 4 | <!--[form:project]--> |
|
5 |
<p><label for="project_name"><%= |
|
|
5 | <p><label for="project_name"><%=l(:field_name)%> <span class="required">*</span></label><br/> | |
|
6 | 6 | <%= text_field 'project', 'name' %></p> |
|
7 | 7 | |
|
8 | 8 | <% if admin_loggedin? %> |
|
9 |
<p><label for="project_parent_id"><%= |
|
|
9 | <p><label for="project_parent_id"><%=l(:field_parent)%></label><br/> | |
|
10 | 10 | <select name="project[parent_id]"> |
|
11 | 11 | <option value=""></option> |
|
12 | 12 | <%= options_from_collection_for_select @root_projects, "id", "name", @project.parent_id %> |
|
13 | 13 | </select></p> |
|
14 | 14 | <% end %> |
|
15 | 15 | |
|
16 |
<p><label for="project_description"><%= |
|
|
16 | <p><label for="project_description"><%=l(:field_description)%> <span class="required">*</span></label><br/> | |
|
17 | 17 | <%= text_area 'project', 'description', :cols => 60, :rows => 3 %></p> |
|
18 | 18 | |
|
19 |
<p><label for="project_homepage"><%= |
|
|
19 | <p><label for="project_homepage"><%=l(:field_homepage)%></label><br/> | |
|
20 | 20 | <%= text_field 'project', 'homepage', :size => 40 %></p> |
|
21 | 21 | |
|
22 | 22 | <p><%= check_box 'project', 'is_public' %> |
|
23 |
<label for="project_is_public"><%= |
|
|
23 | <label for="project_is_public"><%=l(:field_is_public)%></label></p> | |
|
24 | 24 | |
|
25 | 25 | <% for custom_value in @custom_values %> |
|
26 | 26 | <p><%= custom_field_tag_with_label custom_value %></p> |
|
27 | 27 | <% end %> |
|
28 | 28 | |
|
29 |
<fieldset><legend><%= |
|
|
29 | <fieldset><legend><%=l(:label_custom_field_plural)%></legend> | |
|
30 | 30 | <% for custom_field in @custom_fields %> |
|
31 | 31 | <input type="checkbox" |
|
32 | 32 | |
|
33 | 33 | name="custom_field_ids[]" |
|
34 | 34 | value="<%= custom_field.id %>" |
|
35 | 35 | <%if @project.custom_fields.include? custom_field%>checked="checked"<%end%> |
|
36 | 36 | > <%= custom_field.name %> |
|
37 | 37 | |
|
38 | 38 | <% end %></fieldset> |
|
39 | 39 | |
|
40 | 40 | </div> |
|
41 | 41 | <!--[eoform:project]--> |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_project_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'add' %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,26 +1,12 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_document_new)%></h2> | |
|
2 | 2 | |
|
3 | <%= error_messages_for 'document' %> | |
|
4 | 3 | <%= start_form_tag( { :action => 'add_document', :id => @project }, :multipart => true) %> |
|
5 | ||
|
6 | <!--[form:document]--> | |
|
7 | <p><label for="document_category_id"><%=_('Category')%></label><br /> | |
|
8 | <select name="document[category_id]"> | |
|
9 | <%= options_from_collection_for_select @categories, "id", "name",@document.category_id %> | |
|
10 | </select></p> | |
|
11 | ||
|
12 | <p><label for="document_title"><%=_('Title')%> <span class="required">*</span></label><br /> | |
|
13 | <%= text_field 'document', 'title', :size => 60 %></p> | |
|
14 | ||
|
15 | <p><label for="document_description"><%=_('Description')%> <span class="required">*</span></label><br /> | |
|
16 | <%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p> | |
|
4 | <%= render :partial => 'documents/form' %> | |
|
17 | 5 | |
|
18 |
<p><label for="attachment_file"><%= |
|
|
6 | <p><label for="attachment_file"><%=l(:label_attachment)%></label><br/> | |
|
19 | 7 | <%= file_field 'attachment', 'file' %></p> |
|
20 | 8 | |
|
21 | <!--[eoform:document]--> | |
|
22 | ||
|
23 | <%= submit_tag _('Create') %> | |
|
9 | <%= submit_tag l(:button_create) %> | |
|
24 | 10 | <%= end_form_tag %> |
|
25 | 11 | |
|
26 | 12 |
@@ -1,13 +1,14 | |||
|
1 | <h2><%=_('New file')%></h2> | |
|
1 | <h2><%=l(:label_attachment_new)%></h2> | |
|
2 | 2 | |
|
3 | <%= error_messages_for 'attachment' %> | |
|
3 | 4 | <%= start_form_tag ({ :action => 'add_file', :project => @project }, :multipart => true) %> |
|
4 | 5 | |
|
5 |
<p><label for="version_id"><%= |
|
|
6 | <p><label for="version_id"><%=l(:field_version)%></label><br /> | |
|
6 | 7 | <select name="version_id"> |
|
7 | 8 | <%= options_from_collection_for_select @versions, "id", "name" %> |
|
8 | 9 | </select></p> |
|
9 | 10 | |
|
10 |
<p><b><%= |
|
|
11 | <p><b><%=l(:label_attachment)%><b><br /><%= file_field 'attachment', 'file' %></p> | |
|
11 | 12 | <br/> |
|
12 |
<%= submit_tag |
|
|
13 | <%= submit_tag l(:button_add) %> | |
|
13 | 14 | <%= end_form_tag %> No newline at end of file |
@@ -1,51 +1,52 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue_new)%>: <%= @tracker.name %></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag( { :action => 'add_issue', :id => @project }, :multipart => true) %> |
|
4 | 4 | <%= error_messages_for 'issue' %> |
|
5 | 5 | |
|
6 | 6 | <div class="box"> |
|
7 | 7 | <!--[form:issue]--> |
|
8 | 8 | |
|
9 | 9 | <%= hidden_field_tag 'tracker_id', @tracker.id %> |
|
10 | 10 | |
|
11 | 11 | <div style="float:left;margin-right:10px;"> |
|
12 |
<p><label for="issue_priority_id"><%= |
|
|
12 | <p><label for="issue_priority_id"><%=l(:field_priority)%> <span class="required">*</span></label><br /> | |
|
13 | 13 | <select name="issue[priority_id]"> |
|
14 | 14 | <%= options_from_collection_for_select @priorities, "id", "name", @issue.priority_id %></p> |
|
15 | 15 | </select></p> |
|
16 | 16 | </div> |
|
17 | 17 | |
|
18 | 18 | <div style="float:left;margin-right:10px;"> |
|
19 |
<p><label for="issue_assigned_to_id"><%= |
|
|
19 | <p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br /> | |
|
20 | 20 | <select name="issue[assigned_to_id]"> |
|
21 | 21 | <option value=""></option> |
|
22 | 22 | <%= options_from_collection_for_select @issue.project.members, "user_id", "name", @issue.assigned_to_id %></p> |
|
23 | 23 | </select></p> |
|
24 | 24 | </div> |
|
25 | 25 | |
|
26 | 26 | <div> |
|
27 |
<p><label for="issue_category_id"><%= |
|
|
27 | <p><label for="issue_category_id"><%=l(:field_category)%></label><br /> | |
|
28 | 28 | <select name="issue[category_id]"> |
|
29 | 29 | <option value=""></option><%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %> |
|
30 | 30 | </select></p> |
|
31 | 31 | </div> |
|
32 | 32 | |
|
33 |
<p><label for="issue_subject"><%= |
|
|
33 | <p><label for="issue_subject"><%=l(:field_subject)%> <span class="required">*</span></label><br /> | |
|
34 | 34 | <%= text_field 'issue', 'subject', :size => 80 %></p> |
|
35 | 35 | |
|
36 |
<p><label for="issue_description"><%= |
|
|
36 | <p><label for="issue_description"><%=l(:field_description)%> <span class="required">*</span></label><br /> | |
|
37 | 37 | <%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p> |
|
38 | ||
|
39 | <p><label for="issue_due_date"><%=l(:field_due_date)%></label><br /> | |
|
40 | <%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %></p> | |
|
38 | 41 | |
|
39 | 42 | <% for custom_value in @custom_values %> |
|
40 | 43 | <p><%= custom_field_tag_with_label custom_value %></p> |
|
41 | 44 | <% end %> |
|
42 | 45 | |
|
43 |
<p><label for="attachment_file"><%= |
|
|
46 | <p><label for="attachment_file"><%=l(:label_attachment)%></label><br /> | |
|
44 | 47 | <%= file_field 'attachment', 'file' %></p> |
|
45 | ||
|
46 | 48 | <!--[eoform:issue]--> |
|
47 | 49 | </div> |
|
48 | 50 | |
|
49 | ||
|
50 | <%= submit_tag _('Create') %> | |
|
51 | <%= submit_tag l(:button_create) %> | |
|
51 | 52 | <%= end_form_tag %> No newline at end of file |
@@ -1,7 +1,7 | |||
|
1 |
<h2><%=( |
|
|
1 | <h2><%=l(:label_news_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'add_news', :id => @project %> |
|
4 | 4 | <%= render :partial => 'news/form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 |
@@ -1,7 +1,7 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_version_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'add_version', :id => @project %> |
|
4 | 4 | <%= render :partial => 'versions/form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 |
@@ -1,12 +1,12 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_change_log)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% fixed_issues = @fixed_issues.group_by {|i| i.fixed_version } %> |
|
4 | 4 | <% fixed_issues.each do |version, issues| %> |
|
5 | 5 | <p><strong><%= version.name %></strong> - <%= format_date(version.effective_date) %><br /> |
|
6 | 6 | <%=h version.description %></p> |
|
7 | 7 | <ul> |
|
8 | 8 | <% issues.each do |i| %> |
|
9 | 9 | <li><%= link_to i.long_id, :controller => 'issues', :action => 'show', :id => i %> [<%= i.tracker.name %>]: <%= i.subject %></li> |
|
10 | 10 | <% end %> |
|
11 | 11 | </ul> |
|
12 | 12 | <% end %> |
@@ -1,12 +1,14 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_confirmation)%></h2> | |
|
2 | 2 | <div class="box"> |
|
3 | 3 | <center> |
|
4 |
<p> |
|
|
4 | <p><strong><%= @project.name %></strong><br /> | |
|
5 | <%=l(:text_project_destroy_confirmation)%></p> | |
|
6 | ||
|
5 | 7 | <p> |
|
6 | 8 | <%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => @project}) %> |
|
7 | 9 | <%= hidden_field_tag "confirm", 1 %> |
|
8 |
<%= submit_tag |
|
|
10 | <%= submit_tag l(:button_delete) %> | |
|
9 | 11 | <%= end_form_tag %> |
|
10 | 12 | </p> |
|
11 | 13 | </center> |
|
12 | 14 | </div> No newline at end of file |
@@ -1,20 +1,20 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_public_projects)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <table width="100%" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 |
<%= sort_header_tag('name', :caption => |
|
|
6 |
<th> |
|
|
7 |
<%= sort_header_tag('created_on', :caption => |
|
|
5 | <%= sort_header_tag('name', :caption => l(:label_project)) %> | |
|
6 | <th><%=l(:field_description)%></th> | |
|
7 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> | |
|
8 | 8 | </tr> |
|
9 | 9 | |
|
10 | 10 | <% for project in @projects %> |
|
11 | 11 | <tr class="<%= cycle("odd", "even") %>"> |
|
12 | 12 | <td><%= link_to project.name, :action => 'show', :id => project %> |
|
13 | 13 | <td><%= project.description %> |
|
14 | 14 | <td align="center"><%= format_date(project.created_on) %> |
|
15 | 15 | </tr> |
|
16 | 16 | <% end %> |
|
17 | 17 | </table> |
|
18 | 18 | |
|
19 | 19 | <%= pagination_links_full @project_pages %> |
|
20 | 20 | [ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ] No newline at end of file |
@@ -1,21 +1,21 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_document_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% documents = @documents.group_by {|d| d.category } %> |
|
4 | 4 | <% documents.each do |category, docs| %> |
|
5 | 5 | <h3><%= category.name %></h3> |
|
6 | 6 | <ul> |
|
7 | 7 | <% docs.each do |d| %> |
|
8 | 8 | <li> |
|
9 | 9 | <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> |
|
10 | 10 | <br /> |
|
11 |
<%= |
|
|
11 | <%=l(:field_description)%>: <%= d.description %><br /> | |
|
12 | 12 | <%= format_time(d.created_on) %> |
|
13 | 13 | </li> |
|
14 | 14 | |
|
15 | 15 | <% end %> |
|
16 | 16 | </ul> |
|
17 | 17 | <% end %> |
|
18 | 18 | |
|
19 | 19 | <p> |
|
20 |
<%= link_to_if_authorized '» ' + |
|
|
20 | <%= link_to_if_authorized '» ' + l(:label_document_new), :controller => 'projects', :action => 'add_document', :id => @project %> | |
|
21 | 21 | </p> |
@@ -1,46 +1,46 | |||
|
1 | <h2><%=_('Files')%></h2> | |
|
1 | <h2><%=l(:label_attachment_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% delete_allowed = authorize_for('versions', 'destroy_file') %> |
|
4 | 4 | |
|
5 | 5 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
6 | 6 | <tr class="ListHead"> |
|
7 |
<th><%= |
|
|
8 |
<th><%= |
|
|
9 |
<th><%= |
|
|
10 |
<th><%= |
|
|
7 | <th><%=l(:field_version)%></th> | |
|
8 | <th><%=l(:field_filename)%></th> | |
|
9 | <th><%=l(:label_date)%></th> | |
|
10 | <th><%=l(:field_filesize)%></th> | |
|
11 | 11 | <th>D/L</th> |
|
12 | 12 | <th>MD5</th> |
|
13 | 13 | <% if delete_allowed %><th></th><% end %> |
|
14 | 14 | </tr> |
|
15 | 15 | |
|
16 | 16 | <% for version in @versions %> |
|
17 | 17 | <tr> |
|
18 | 18 | <td colspan="7"><%= image_tag 'package' %> <b><%= version.name %></b></td> |
|
19 | 19 | </tr> |
|
20 | 20 | <% for file in version.attachments %> |
|
21 | 21 | <tr class="<%= cycle("odd", "even") %>"> |
|
22 | 22 | <td></td> |
|
23 | 23 | <td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td> |
|
24 | 24 | <td align="center"><%= format_date(file.created_on) %></td> |
|
25 | 25 | <td align="center"><%= human_size(file.filesize) %></td> |
|
26 | 26 | <td align="center"><%= file.downloads %></td> |
|
27 | 27 | <td align="center"><small><%= file.digest %></small></td> |
|
28 | 28 | <% if delete_allowed %> |
|
29 | 29 | <td align="center"> |
|
30 | 30 | <%= start_form_tag :controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file %> |
|
31 |
<%= submit_tag |
|
|
31 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
32 | 32 | <%= end_form_tag %> |
|
33 | 33 | </td> |
|
34 | 34 | <% end %> |
|
35 | 35 | </tr> |
|
36 | 36 | <% end |
|
37 | 37 | reset_cycle %> |
|
38 | 38 | <% end %> |
|
39 | 39 | </table> |
|
40 | 40 | |
|
41 | 41 | <br /> |
|
42 | 42 | <p> |
|
43 |
<%= link_to_if_authorized '» ' + |
|
|
43 | <%= link_to_if_authorized '» ' + l(:label_attachment_new), :controller => 'projects', :action => 'add_file', :id => @project %> | |
|
44 | 44 | </p> |
|
45 | 45 | |
|
46 | 46 |
@@ -1,56 +1,53 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_issue_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <form method="post" class="noborder"> |
|
4 |
|
|
|
4 | <table cellpadding=2> | |
|
5 | 5 | <tr> |
|
6 |
<td><small><%= |
|
|
7 |
<td><small><%= |
|
|
8 |
<td><small><%= |
|
|
9 |
<td><small><%= |
|
|
10 |
<td><small><%= |
|
|
11 |
<td><small><%= |
|
|
12 |
<td><small><%= |
|
|
6 | <td><small><%=l(:field_status)%>:</small><br /><%= search_filter_tag 'status_id', :class => 'select-small' %></td> | |
|
7 | <td><small><%=l(:field_tracker)%>:</small><br /><%= search_filter_tag 'tracker_id', :class => 'select-small' %></td> | |
|
8 | <td><small><%=l(:field_priority)%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td> | |
|
9 | <td><small><%=l(:field_category)%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td> | |
|
10 | <td><small><%=l(:field_fixed_version)%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td> | |
|
11 | <td><small><%=l(:field_assigned_to)%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td> | |
|
12 | <td><small><%=l(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td> | |
|
13 | 13 | |
|
14 | 14 | <td valign="bottom"> |
|
15 |
<%= submit_tag |
|
|
15 | <%= submit_tag l(:button_apply), :class => 'button-small' %> | |
|
16 | 16 | <%= end_form_tag %> |
|
17 | 17 | |
|
18 | 18 | <%= start_form_tag %> |
|
19 |
<%= submit_tag |
|
|
19 | <%= submit_tag l(:button_clear), :class => 'button-small' %> | |
|
20 | 20 | <%= end_form_tag %> |
|
21 | 21 | </td> |
|
22 | 22 | </tr> |
|
23 | 23 | </table> |
|
24 | 24 | |
|
25 |
|
|
|
26 | ||
|
27 | <tr><td colspan="7" align="right"> | |
|
28 | <small><%= link_to 'Export to CSV', :action => 'export_issues_csv', :id => @project.id %></small> | |
|
29 | </td></tr> | |
|
30 | ||
|
31 | <tr class="ListHead"> | |
|
32 |
|
|
|
33 | <%= sort_header_tag('issue_statuses.name', :caption => _('Status')) %> | |
|
34 |
|
|
|
35 | <th><%=_('Subject')%></th> | |
|
36 |
|
|
|
37 | <%= sort_header_tag('issues.created_on', :caption => _('Created on')) %> | |
|
38 | <%= sort_header_tag('issues.updated_on', :caption => _('Last update')) %> | |
|
39 | </tr> | |
|
40 | ||
|
41 | <% for issue in @issues %> | |
|
42 | <tr bgcolor="#<%= issue.status.html_color %>"> | |
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 | <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td> | |
|
47 | <td align="center"><%= issue.author.display_name %></td> | |
|
48 | <td align="center"><%= format_time(issue.created_on) %></td> | |
|
49 | <td align="center"><%= format_time(issue.updated_on) %></td> | |
|
50 | </tr> | |
|
51 | <% end %> | |
|
52 | </table> | |
|
53 |
|
|
|
54 | <%= pagination_links_full @issue_pages %> | |
|
55 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] | |
|
56 | </p> No newline at end of file | |
|
25 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> | |
|
26 | <tr><td colspan="7" align="right"> | |
|
27 | <small><%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %></small> | |
|
28 | </td></tr> | |
|
29 | <tr class="ListHead"> | |
|
30 | <%= sort_header_tag('issues.id', :caption => '#') %> | |
|
31 | <%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %> | |
|
32 | <%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %> | |
|
33 | <th><%=l(:field_subject)%></th> | |
|
34 | <%= sort_header_tag('users.lastname', :caption => l(:field_author)) %> | |
|
35 | <%= sort_header_tag('issues.created_on', :caption => l(:field_created_on)) %> | |
|
36 | <%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %> | |
|
37 | </tr> | |
|
38 | <% for issue in @issues %> | |
|
39 | <tr bgcolor="#<%= issue.status.html_color %>"> | |
|
40 | <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td> | |
|
41 | <td align="center"><%= issue.status.name %></td> | |
|
42 | <td align="center"><%= issue.tracker.name %></td> | |
|
43 | <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td> | |
|
44 | <td align="center"><%= issue.author.display_name %></td> | |
|
45 | <td align="center"><%= format_time(issue.created_on) %></td> | |
|
46 | <td align="center"><%= format_time(issue.updated_on) %></td> | |
|
47 | </tr> | |
|
48 | <% end %> | |
|
49 | </table> | |
|
50 | <p> | |
|
51 | <%= pagination_links_full @issue_pages %> | |
|
52 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] | |
|
53 | </p> No newline at end of file |
@@ -1,11 +1,11 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_member_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% members = @members.group_by {|m| m.role } %> |
|
4 | 4 | <% members.each do |role, member| %> |
|
5 | 5 | <h3><%= role.name %></h3> |
|
6 | 6 | <ul> |
|
7 | 7 | <% member.each do |m| %> |
|
8 | 8 | <li><%= link_to m.user.display_name, :controller => 'account', :action => 'show', :id => m.user %> (<%= format_date m.created_on %>)</li> |
|
9 | 9 | <% end %> |
|
10 | 10 | </ul> |
|
11 | 11 | <% end %> |
@@ -1,17 +1,17 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_news_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% for news in @news %> |
|
4 | 4 | <p> |
|
5 | 5 | <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small> |
|
6 | 6 | <%= link_to_if_authorized image_tag('edit_small'), :controller => 'news', :action => 'edit', :id => news %> |
|
7 | 7 | <%= link_to_if_authorized image_tag('delete'), { :controller => 'news', :action => 'destroy', :id => news }, :confirm => 'Are you sure?' %> |
|
8 | 8 | <br /> |
|
9 | 9 | <%= news.summary %> |
|
10 |
<small>[<%= link_to |
|
|
10 | <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small> | |
|
11 | 11 | </p> |
|
12 | 12 | <% end %> |
|
13 | 13 | |
|
14 | 14 | <%= pagination_links_full @news_pages %> |
|
15 | 15 | <p> |
|
16 |
<%= link_to_if_authorized '» ' + |
|
|
16 | <%= link_to_if_authorized '» ' + l(:label_news_new), :controller => 'projects', :action => 'add_news', :id => @project %> | |
|
17 | 17 | </p> |
@@ -1,105 +1,105 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_settings)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @project %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<center><%= submit_tag |
|
|
5 | <center><%= submit_tag l(:button_save) %></center> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | |
|
10 | 10 | <div class="box"> |
|
11 |
<h3><%= |
|
|
11 | <h3><%=l(:label_member_plural)%></h3> | |
|
12 | 12 | <%= error_messages_for 'member' %> |
|
13 | 13 | <table> |
|
14 | 14 | <% for member in @project.members.find(:all, :include => :user) %> |
|
15 | 15 | <% unless member.new_record? %> |
|
16 | 16 | <tr> |
|
17 | 17 | <td><%= member.user.display_name %></td> |
|
18 | 18 | <td> |
|
19 | 19 | <%= start_form_tag :controller => 'members', :action => 'edit', :id => member %> |
|
20 | 20 | <select name="member[role_id]"> |
|
21 | 21 | <%= options_from_collection_for_select @roles, "id", "name", member.role_id %> |
|
22 | 22 | </select> |
|
23 | 23 | </td> |
|
24 | 24 | <td> |
|
25 |
<%= submit_tag |
|
|
25 | <%= submit_tag l(:button_change), :class => "button-small" %> | |
|
26 | 26 | <%= end_form_tag %> |
|
27 | 27 | </td> |
|
28 | 28 | <td> |
|
29 | 29 | <%= start_form_tag :controller => 'members', :action => 'destroy', :id => member %> |
|
30 |
<%= submit_tag |
|
|
30 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
31 | 31 | <%= end_form_tag %> |
|
32 | 32 | </td> |
|
33 | 33 | </tr> |
|
34 | 34 | <% end %> |
|
35 | 35 | <% end %> |
|
36 | 36 | </table> |
|
37 | 37 | <hr /> |
|
38 |
<label><%= |
|
|
38 | <label><%=l(:label_member_new)%></label><br/> | |
|
39 | 39 | <%= start_form_tag :controller => 'projects', :action => 'add_member', :id => @project %> |
|
40 | 40 | <select name="member[user_id]"> |
|
41 | 41 | <%= options_from_collection_for_select @users, "id", "display_name", @member.user_id %> |
|
42 | 42 | </select> |
|
43 | 43 | <select name="member[role_id]"> |
|
44 | 44 | <%= options_from_collection_for_select @roles, "id", "name", @member.role_id %> |
|
45 | 45 | </select> |
|
46 |
<%= submit_tag |
|
|
46 | <%= submit_tag l(:button_add) %> | |
|
47 | 47 | <%= end_form_tag %> |
|
48 | 48 | </div> |
|
49 | 49 | |
|
50 | 50 | <div class="box"> |
|
51 |
<h3><%= |
|
|
51 | <h3><%=l(:label_version_plural)%></h3> | |
|
52 | 52 | |
|
53 | 53 | <table> |
|
54 | 54 | <% for version in @project.versions %> |
|
55 | 55 | <tr> |
|
56 | 56 | <td><%= link_to version.name, :controller => 'versions', :action => 'edit', :id => version %></td> |
|
57 | 57 | <td><%=h version.description %></td> |
|
58 | 58 | <td> |
|
59 | 59 | <%= start_form_tag :controller => 'versions', :action => 'destroy', :id => version %> |
|
60 |
<%= submit_tag |
|
|
60 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
61 | 61 | <%= end_form_tag %> |
|
62 | 62 | </td> |
|
63 | 63 | </tr> |
|
64 | 64 | <% end %> |
|
65 | 65 | </table> |
|
66 | 66 | <hr /> |
|
67 | 67 | <%= start_form_tag ({ :controller => 'projects', :action => 'add_version', :id => @project }, :method => 'get' ) %> |
|
68 |
<%= submit_tag |
|
|
68 | <%= submit_tag l(:label_version_new) %> | |
|
69 | 69 | <%= end_form_tag %> |
|
70 | 70 | </div> |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | <div class="box"> |
|
74 |
<h3><%= |
|
|
74 | <h3><%=l(:label_issue_category_plural)%></h3> | |
|
75 | 75 | <table> |
|
76 | 76 | <% for @category in @project.issue_categories %> |
|
77 | 77 | <% unless @category.new_record? %> |
|
78 | 78 | <tr> |
|
79 | 79 | <td> |
|
80 | 80 | <%= start_form_tag :controller => 'issue_categories', :action => 'edit', :id => @category %> |
|
81 | 81 | <%= text_field 'category', 'name', :size => 25 %> |
|
82 | 82 | </td> |
|
83 | 83 | <td> |
|
84 |
<%= submit_tag |
|
|
84 | <%= submit_tag l(:button_save), :class => "button-small" %> | |
|
85 | 85 | <%= end_form_tag %> |
|
86 | 86 | </td> |
|
87 | 87 | <td> |
|
88 | 88 | <%= start_form_tag :controller => 'issue_categories', :action => 'destroy', :id => @category %> |
|
89 |
<%= submit_tag |
|
|
89 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
90 | 90 | <%= end_form_tag %> |
|
91 | 91 | </td> |
|
92 | 92 | </tr> |
|
93 | 93 | <% end %> |
|
94 | 94 | <% end %> |
|
95 | 95 | </table> |
|
96 | 96 | <hr /> |
|
97 | 97 | |
|
98 | 98 | <%= start_form_tag :action => 'add_issue_category', :id => @project %> |
|
99 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> | |
|
99 | 100 | <%= error_messages_for 'issue_category' %> |
|
100 | <label for="issue_category_name"><%=_('New category')%></label><br/> | |
|
101 | 101 | <%= text_field 'issue_category', 'name', :size => 25 %> |
|
102 |
<%= submit_tag |
|
|
102 | <%= submit_tag l(:button_create) %> | |
|
103 | 103 | <%= end_form_tag %> |
|
104 | 104 | |
|
105 | 105 | </div> |
@@ -1,73 +1,74 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_overview)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <div class="splitcontentleft"> |
|
4 | 4 | <%= @project.description %> |
|
5 | 5 | <ul> |
|
6 |
<li><%= |
|
|
7 |
<li><%= |
|
|
6 | <li><%=l(:field_homepage)%>: <%= link_to @project.homepage, @project.homepage %></li> | |
|
7 | <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li> | |
|
8 | 8 | <% for custom_value in @custom_values %> |
|
9 | 9 | <% if !custom_value.value.empty? %> |
|
10 | 10 | <li><%= custom_value.custom_field.name%>: <%= custom_value.value%></li> |
|
11 | 11 | <% end %> |
|
12 | 12 | <% end %> |
|
13 | 13 | </ul> |
|
14 | 14 | |
|
15 | 15 | <div class="box"> |
|
16 |
<h3><%= image_tag "tracker" %> <%= |
|
|
16 | <h3><%= image_tag "tracker" %> <%=l(:label_tracker_plural)%></h3> | |
|
17 | 17 | <ul> |
|
18 | 18 | <% for tracker in @trackers %> |
|
19 | 19 | <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project, |
|
20 | 20 | :set_filter => 1, |
|
21 | 21 | "tracker_id" => tracker.id %>: |
|
22 |
<%= Issue.count(:conditions => ["project_id=? and tracker_id=? and issue_statuses.is_closed=?", @project.id, tracker.id, false], :include => :status) %> |
|
|
22 | <%= issue_count = Issue.count(:conditions => ["project_id=? and tracker_id=? and issue_statuses.is_closed=?", @project.id, tracker.id, false], :include => :status) %> | |
|
23 | <%= lwr(:label_open_issues, issue_count) %> | |
|
23 | 24 | </li> |
|
24 | 25 | <% end %> |
|
25 | 26 | </ul> |
|
26 | 27 | <% if authorize_for 'projects', 'add_issue' %> |
|
27 |
» <%= |
|
|
28 | » <%=l(:label_issue_new)%>: | |
|
28 | 29 | <ul> |
|
29 | 30 | <% @trackers.each do |tracker| %> |
|
30 |
<li><%= link_to |
|
|
31 | <li><%= link_to tracker.name, :controller => 'projects', :action => 'add_issue', :id => @project, :tracker_id => tracker %></li> | |
|
31 | 32 | <% end %> |
|
32 | 33 | </ul> |
|
33 | 34 | <% end %> |
|
34 |
<center><small>[ <%= link_to |
|
|
35 | <center><small>[ <%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %> ]</small></center> | |
|
35 | 36 | </div> |
|
36 | 37 | </div> |
|
37 | 38 | |
|
38 | 39 | <div class="splitcontentright"> |
|
39 | 40 | <div class="box"> |
|
40 |
<h3><%= image_tag "users" %> <%= |
|
|
41 | <h3><%= image_tag "users" %> <%=l(:label_member_plural)%></h3> | |
|
41 | 42 | <% for member in @members %> |
|
42 | 43 | <%= link_to_user member.user %> (<%= member.role.name %>)<br /> |
|
43 | 44 | <% end %> |
|
44 | 45 | </div> |
|
45 | 46 | |
|
46 | 47 | <% if @subprojects %> |
|
47 | 48 | <div class="box"> |
|
48 |
<h3><%= image_tag "projects" %> <%= |
|
|
49 | <h3><%= image_tag "projects" %> <%=l(:label_subproject_plural)%></h3> | |
|
49 | 50 | <% for subproject in @subprojects %> |
|
50 | 51 | <%= link_to subproject.name, :action => 'show', :id => subproject %><br /> |
|
51 | 52 | <% end %> |
|
52 | 53 | </div> |
|
53 | 54 | <% end %> |
|
54 | 55 | |
|
55 | 56 | <div class="box"> |
|
56 |
<h3><%= |
|
|
57 | <h3><%=l(:label_news_latest)%></h3> | |
|
57 | 58 | <% for news in @news %> |
|
58 | 59 | <p> |
|
59 | 60 | <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br /> |
|
60 | 61 | <%= news.summary %> |
|
61 |
<small>[<%= link_to |
|
|
62 | <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small> | |
|
62 | 63 | </p> |
|
63 | 64 | <hr /> |
|
64 | 65 | <% end %> |
|
65 |
<center><small>[ <%= link_to |
|
|
66 | <center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center> | |
|
66 | 67 | </div> |
|
67 | 68 | </div> |
|
68 | 69 | |
|
69 | 70 | |
|
70 | 71 | |
|
71 | 72 | |
|
72 | 73 | |
|
73 | 74 |
@@ -1,39 +1,39 | |||
|
1 | 1 | <% col_width = 70 / (@statuses.length+3) %> |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" width="100%"> |
|
4 | 4 | <tr> |
|
5 | 5 | <td width="25%"></td> |
|
6 | 6 | <% for status in @statuses %> |
|
7 | 7 | <td align="center" width="<%= col_width %>%" bgcolor="#<%= status.html_color %>"><small><%= status.name %></small></td> |
|
8 | 8 | <% end %> |
|
9 |
<td align="center" width="<%= col_width %>%"><strong><%= |
|
|
10 |
<td align="center" width="<%= col_width %>%"><strong><%= |
|
|
11 |
<td align="center" width="<%= col_width %>%"><strong><%= |
|
|
9 | <td align="center" width="<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></td> | |
|
10 | <td align="center" width="<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></td> | |
|
11 | <td align="center" width="<%= col_width %>%"><strong><%=l(:label_total)%></strong></td> | |
|
12 | 12 | </tr> |
|
13 | 13 | |
|
14 | 14 | <% for row in rows %> |
|
15 | 15 | <tr style="background-color:#CEE1ED"> |
|
16 | 16 | <td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project, |
|
17 | 17 | :set_filter => 1, |
|
18 | 18 | "#{field_name}" => row.id %></td> |
|
19 | 19 | <% for status in @statuses %> |
|
20 | 20 | <td align="center"><%= link_to (aggregate data, { field_name => row.id, "status_id" => status.id }), |
|
21 | 21 | :controller => 'projects', :action => 'list_issues', :id => @project, |
|
22 | 22 | :set_filter => 1, |
|
23 | 23 | "status_id" => status.id, |
|
24 | 24 | "#{field_name}" => row.id %></td> |
|
25 | 25 | <% end %> |
|
26 | 26 | <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }), |
|
27 | 27 | :controller => 'projects', :action => 'list_issues', :id => @project, |
|
28 | 28 | :set_filter => 1, |
|
29 | 29 | "#{field_name}" => row.id, |
|
30 | 30 | "status_id" => "O" %></td> |
|
31 | 31 | <td align="center"><%= aggregate data, { field_name => row.id, "closed" => 1 } %></td> |
|
32 | 32 | <td align="center"><%= link_to (aggregate data, { field_name => row.id }), |
|
33 | 33 | :controller => 'projects', :action => 'list_issues', :id => @project, |
|
34 | 34 | :set_filter => 1, |
|
35 | 35 | "#{field_name}" => row.id, |
|
36 | 36 | "status_id" => "A" %></td> |
|
37 | 37 | <% end %> |
|
38 | 38 | </tr> |
|
39 | 39 | </table> No newline at end of file |
@@ -1,13 +1,13 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_report_plural)%></h2> | |
|
2 | 2 | |
|
3 |
<strong><%= |
|
|
3 | <strong><%=l(:field_tracker)%></strong> | |
|
4 | 4 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> |
|
5 | 5 | <br /> |
|
6 | 6 | |
|
7 |
<strong><%= |
|
|
7 | <strong><%=l(:field_priority)%></strong> | |
|
8 | 8 | <%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %> |
|
9 | 9 | <br /> |
|
10 | 10 | |
|
11 |
<strong><%= |
|
|
11 | <strong><%=l(:field_category)%></strong> | |
|
12 | 12 | <%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %> |
|
13 | 13 |
@@ -1,23 +1,23 | |||
|
1 | 1 | <%= error_messages_for 'role' %> |
|
2 | 2 | |
|
3 | 3 | <div class="box"> |
|
4 | 4 | <!--[form:role]--> |
|
5 |
<p><label for="role_name"><%= |
|
|
5 | <p><label for="role_name"><%=l(:field_name)%> <span class="required">*</span></label><br /> | |
|
6 | 6 | <%= text_field 'role', 'name' %></p> |
|
7 | 7 | |
|
8 |
<strong><%= |
|
|
8 | <strong><%=l(:label_permissions)%>:</strong> | |
|
9 | 9 | <% permissions = @permissions.group_by {|p| p.group_id } %> |
|
10 | <% permissions.keys.sort.each do |group_id| %> | |
|
11 |
<fieldset><legend><%= |
|
|
10 | <% permissions.keys.sort.each do |group_id| %> | |
|
11 | <fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend> | |
|
12 | 12 | <% permissions[group_id].each do |p| %> |
|
13 |
<div style="width: |
|
|
14 |
<%= |
|
|
13 | <div style="width:170px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %> | |
|
14 | <%= l(p.description.to_sym) %> | |
|
15 | 15 | </div> |
|
16 | 16 | <% end %> |
|
17 | 17 | </fieldset> |
|
18 | 18 | <% end %> |
|
19 | 19 | <br /> |
|
20 |
<a href="javascript:checkAll('role_form', true)"><%= |
|
|
21 |
<a href="javascript:checkAll('role_form', false)"><%= |
|
|
20 | <a href="javascript:checkAll('role_form', true)"><%=l(:button_check_all)%></a> | | |
|
21 | <a href="javascript:checkAll('role_form', false)"><%=l(:button_uncheck_all)%></a><br /> | |
|
22 | 22 | <!--[eoform:role]--> |
|
23 | 23 | </div> |
@@ -1,10 +1,8 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_role)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag ({ :action => 'edit', :id => @role }, :id => 'role_form') %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 | ||
|
6 | <br /> | |
|
7 | <%= submit_tag _('Save') %> | |
|
5 | <%= submit_tag l(:button_save) %> | |
|
8 | 6 | <%= end_form_tag %> |
|
9 | 7 | |
|
10 | 8 |
@@ -1,23 +1,23 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_role_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 |
<th><%= |
|
|
5 | <th><%=l(:label_role)%></th> | |
|
6 | 6 | <th></th> |
|
7 | 7 | </tr> |
|
8 | 8 | |
|
9 | 9 | <% for role in @roles %> |
|
10 | 10 | <tr class="<%= cycle("odd", "even") %>"> |
|
11 | 11 | <td><%= link_to role.name, :action => 'edit', :id => role %></td> |
|
12 | 12 | <td align="center"> |
|
13 | 13 | <%= start_form_tag :action => 'destroy', :id => role %> |
|
14 |
<%= submit_tag |
|
|
14 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
15 | 15 | <%= end_form_tag %> |
|
16 | 16 | </tr> |
|
17 | 17 | <% end %> |
|
18 | 18 | </table> |
|
19 | 19 | |
|
20 | 20 | <%= pagination_links_full @role_pages %> |
|
21 | 21 | <br /> |
|
22 | 22 | |
|
23 |
<%= link_to '» ' + |
|
|
23 | <%= link_to '» ' + l(:label_role_new), :action => 'new' %> |
@@ -1,8 +1,7 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_role_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag ({ :action => 'new' }, :id => 'role_form') %> |
|
4 | <%= render :partial => 'form' %> | |
|
5 | ||
|
6 | <br /><%= submit_tag _('Create') %> | |
|
4 | <%= render :partial => 'form' %> | |
|
5 | <%= submit_tag l(:button_create) %> | |
|
7 | 6 | <%= end_form_tag %> |
|
8 | 7 |
@@ -1,70 +1,70 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_workflow)%></h2> | |
|
2 | 2 | |
|
3 |
<p><%= |
|
|
3 | <p><%=l(:text_workflow_edit)%>:</p> | |
|
4 | 4 | |
|
5 | 5 | <%= start_form_tag ({:action => 'workflow'}, :method => 'get') %> |
|
6 | 6 | <div style="float:left;margin-right:10px;"> |
|
7 |
<p><label for="role_id"><%= |
|
|
7 | <p><label for="role_id"><%=l(:label_role)%></label><br/> | |
|
8 | 8 | <select id="role_id" name="role_id"> |
|
9 | 9 | <%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %> |
|
10 | 10 | </select></p> |
|
11 | 11 | </div> |
|
12 | 12 | |
|
13 | 13 | <div> |
|
14 |
<p><label for="tracker_id"><%= |
|
|
14 | <p><label for="tracker_id"><%=l(:label_tracker)%></label><br/> | |
|
15 | 15 | <select id="tracker_id" name="tracker_id"> |
|
16 | 16 | <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %> |
|
17 | 17 | </select> |
|
18 | 18 | |
|
19 |
<%= submit_tag |
|
|
19 | <%= submit_tag l(:button_edit) %> | |
|
20 | 20 | </p> |
|
21 | 21 | </div> |
|
22 | 22 | <%= end_form_tag %> |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | <% unless @tracker.nil? or @role.nil? %> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <%= form_tag ({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) %> |
|
29 | 29 | <table> |
|
30 | 30 | <tr> |
|
31 |
<td align="center"><strong><%= |
|
|
32 |
<td align="center" colspan="<%= @statuses.length %>"><strong><%= |
|
|
31 | <td align="center"><strong><%=l(:label_current_status)%></strong></td> | |
|
32 | <td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td> | |
|
33 | 33 | </tr> |
|
34 | 34 | <tr> |
|
35 | 35 | <td></td> |
|
36 | 36 | <% for new_status in @statuses %> |
|
37 | 37 | <td width="60" align="center"><%= new_status.name %></td> |
|
38 | 38 | <% end %> |
|
39 | 39 | </tr> |
|
40 | 40 | |
|
41 | 41 | <% for old_status in @statuses %> |
|
42 | 42 | <tr> |
|
43 | 43 | <td><%= old_status.name %></td> |
|
44 | 44 | |
|
45 | 45 | <% for new_status in @statuses %> |
|
46 | 46 | <td align="center"> |
|
47 | 47 | |
|
48 | 48 | <input type="checkbox" |
|
49 | 49 | name="issue_status[<%= old_status.id %>][]" |
|
50 | 50 | value="<%= new_status.id %>" |
|
51 | 51 | <%if old_status.new_statuses_allowed_to(@role, @tracker).include? new_status%>checked="checked"<%end%> |
|
52 | 52 | <%if old_status==new_status%>disabled<%end%> |
|
53 | 53 | > |
|
54 | 54 | </td> |
|
55 | 55 | <% end %> |
|
56 | 56 | |
|
57 | 57 | </tr> |
|
58 | 58 | <% end %> |
|
59 | 59 | </table> |
|
60 | 60 | <br /> |
|
61 | 61 | <p> |
|
62 |
<a href="javascript:checkAll('workflow_form', true)"><%= |
|
|
63 |
<a href="javascript:checkAll('workflow_form', false)"><%= |
|
|
62 | <a href="javascript:checkAll('workflow_form', true)"><%=l(:button_check_all)%></a> | | |
|
63 | <a href="javascript:checkAll('workflow_form', false)"><%=l(:button_uncheck_all)%></a> | |
|
64 | 64 | </p> |
|
65 | 65 | <br /> |
|
66 |
<%= submit_tag |
|
|
66 | <%= submit_tag l(:button_save) %> | |
|
67 | 67 | <%= end_form_tag %> |
|
68 | 68 | |
|
69 | 69 | <% end %> |
|
70 | 70 | </div> No newline at end of file |
@@ -1,10 +1,10 | |||
|
1 | 1 | <%= error_messages_for 'tracker' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:tracker]--> |
|
4 |
<p><label for="tracker_name"><%= |
|
|
4 | <p><label for="tracker_name"><%=l(:field_name)%></label> <span class="required">*</span><br/> | |
|
5 | 5 | <%= text_field 'tracker', 'name' %></p> |
|
6 | 6 | |
|
7 | 7 | <p><%= check_box 'tracker', 'is_in_chlog' %> |
|
8 |
<label for="tracker_is_in_chlog"><%= |
|
|
8 | <label for="tracker_is_in_chlog"><%=l(:field_is_in_chlog)%></label></p> | |
|
9 | 9 | <!--[eoform:tracker]--> |
|
10 | 10 |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_tracker)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @tracker %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,24 +1,24 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_tracker_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 |
<th><%= |
|
|
5 | <th><%=l(:label_tracker)%></th> | |
|
6 | 6 | <th></th> |
|
7 | 7 | </tr> |
|
8 | 8 | |
|
9 | 9 | <% for tracker in @trackers %> |
|
10 | 10 | <tr class="<%= cycle("odd", "even") %>"> |
|
11 | 11 | <td><%= link_to tracker.name, :action => 'edit', :id => tracker %></td> |
|
12 | 12 | <td align="center"> |
|
13 | 13 | <%= start_form_tag :action => 'destroy', :id => tracker %> |
|
14 |
<%= submit_tag |
|
|
14 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
15 | 15 | <%= end_form_tag %> |
|
16 | 16 | </td> |
|
17 | 17 | </tr> |
|
18 | 18 | <% end %> |
|
19 | 19 | </table> |
|
20 | 20 | |
|
21 | 21 | <%= pagination_links_full @tracker_pages %> |
|
22 | 22 | <br /> |
|
23 | 23 | |
|
24 |
<%= link_to '» ' + |
|
|
24 | <%= link_to '» ' + l(:label_tracker_new), :action => 'new' %> |
@@ -1,7 +1,7 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_tracker_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'new' %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 |
@@ -1,37 +1,37 | |||
|
1 | 1 | <%= error_messages_for 'user' %> |
|
2 | 2 | |
|
3 | 3 | <div class="box"> |
|
4 | 4 | <!--[form:user]--> |
|
5 |
<p><label for="user_login"><%= |
|
|
5 | <p><label for="user_login"><%=l(:field_login)%></label> <span class="required">*</span><br/> | |
|
6 | 6 | <%= text_field 'user', 'login', :size => 25 %></p> |
|
7 | 7 | |
|
8 |
<p><label for="password"><%= |
|
|
8 | <p><label for="password"><%=l(:field_password)%></label> <span class="required">*</span><br/> | |
|
9 | 9 | <%= password_field_tag 'password', nil, :size => 25 %></p> |
|
10 | 10 | |
|
11 |
<p><label for="password_confirmation"><%= |
|
|
11 | <p><label for="password_confirmation"><%=l(:field_password_confirmation)%></label> <span class="required">*</span><br/> | |
|
12 | 12 | <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p> |
|
13 | 13 | |
|
14 |
<p><label for="user_firstname"><%= |
|
|
14 | <p><label for="user_firstname"><%=l(:field_firstname)%></label> <span class="required">*</span><br/> | |
|
15 | 15 | <%= text_field 'user', 'firstname' %></p> |
|
16 | 16 | |
|
17 |
<p><label for="user_lastname"><%= |
|
|
17 | <p><label for="user_lastname"><%=l(:field_lastname)%></label> <span class="required">*</span><br/> | |
|
18 | 18 | <%= text_field 'user', 'lastname' %></p> |
|
19 | 19 | |
|
20 |
<p><label for="user_mail"><%= |
|
|
20 | <p><label for="user_mail"><%=l(:field_mail)%></label> <span class="required">*</span><br/> | |
|
21 | 21 | <%= text_field 'user', 'mail' %></p> |
|
22 | 22 | |
|
23 |
<p><label for="user_language"><%= |
|
|
24 |
<%= select("user", "language", |
|
|
23 | <p><label for="user_language"><%=l(:field_language)%></label><br/> | |
|
24 | <%= select("user", "language", lang_options_for_select) %></p> | |
|
25 | 25 | |
|
26 | 26 | <% for custom_value in @custom_values %> |
|
27 | 27 | <p><%= custom_field_tag_with_label custom_value %></p> |
|
28 | 28 | <% end %> |
|
29 | 29 | |
|
30 | 30 | <div style="clear: both;"></div> |
|
31 | 31 | |
|
32 |
<p><%= check_box 'user', 'admin' %> <label for="user_admin"><%= |
|
|
32 | <p><%= check_box 'user', 'admin' %> <label for="user_admin"><%=l(:field_admin)%></label></p> | |
|
33 | 33 | |
|
34 |
<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%= |
|
|
34 | <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p> | |
|
35 | 35 | |
|
36 | 36 | <!--[eoform:user]--> |
|
37 | 37 | </div> |
@@ -1,6 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_user_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'add' %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_create) %> | |
|
6 | 6 | <%= end_form_tag %> |
@@ -1,7 +1,6 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_user)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @user %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
6 | ||
|
5 | <%= submit_tag l(:button_save) %> | |
|
7 | 6 | <%= end_form_tag %> |
@@ -1,46 +1,46 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_user_plural)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 |
<%= sort_header_tag('login', :caption => |
|
|
6 |
<%= sort_header_tag('firstname', :caption => |
|
|
7 |
<%= sort_header_tag('lastname', :caption => |
|
|
8 |
<th><%= |
|
|
9 |
<%= sort_header_tag('admin', :caption => |
|
|
10 |
<%= sort_header_tag('status', :caption => |
|
|
11 |
<%= sort_header_tag('created_on', :caption => |
|
|
12 |
<%= sort_header_tag('last_login_on', :caption => |
|
|
5 | <%= sort_header_tag('login', :caption => l(:field_login)) %> | |
|
6 | <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> | |
|
7 | <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> | |
|
8 | <th><%=l(:field_mail)%></th> | |
|
9 | <%= sort_header_tag('admin', :caption => l(:field_admin)) %> | |
|
10 | <%= sort_header_tag('status', :caption => l(:field_status)) %> | |
|
11 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> | |
|
12 | <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on)) %> | |
|
13 | 13 | <th></th> |
|
14 | 14 | </tr> |
|
15 | 15 | <% for user in @users %> |
|
16 | 16 | <tr class="<%= cycle("odd", "even") %>"> |
|
17 | 17 | <td><%= link_to user.login, :action => 'edit', :id => user %></td> |
|
18 | 18 | <td><%= user.firstname %></td> |
|
19 | 19 | <td><%= user.lastname %></td> |
|
20 | 20 | <td><%= user.mail %></td> |
|
21 | 21 | <td align="center"><%= image_tag 'true' if user.admin? %></td> |
|
22 | 22 | <td align="center"><%= image_tag 'locked' if user.locked? %></td> |
|
23 | 23 | <td align="center"><%= format_time(user.created_on) %></td> |
|
24 | 24 | <td align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> |
|
25 | 25 | <td align="center"> |
|
26 | 26 | <%= start_form_tag :action => 'edit', :id => user %> |
|
27 | 27 | <% if user.locked? %> |
|
28 | 28 | <%= hidden_field_tag 'user[status]', User::STATUS_ACTIVE %> |
|
29 |
<%= submit_tag |
|
|
29 | <%= submit_tag l(:button_unlock), :class => "button-small" %> | |
|
30 | 30 | <% else %> |
|
31 | 31 | <%= hidden_field_tag 'user[status]', User::STATUS_LOCKED %> |
|
32 |
<%= submit_tag |
|
|
32 | <%= submit_tag l(:button_lock), :class => "button-small" %> | |
|
33 | 33 | <% end %> |
|
34 | 34 | <%= end_form_tag %> |
|
35 | 35 | </td> |
|
36 | 36 | </tr> |
|
37 | 37 | <% end %> |
|
38 | 38 | </table> |
|
39 | 39 | |
|
40 | 40 | <p><%= pagination_links_full @user_pages %> |
|
41 | 41 | [ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ] |
|
42 | 42 | </p> |
|
43 | 43 | |
|
44 | 44 | <p> |
|
45 |
<%= link_to '» ' + |
|
|
45 | <%= link_to '» ' + l(:label_user_new), :action => 'add' %> | |
|
46 | 46 | </p> No newline at end of file |
@@ -1,13 +1,13 | |||
|
1 | 1 | <%= error_messages_for 'version' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:version]--> |
|
4 |
<p><label for="version_name"><%= |
|
|
4 | <p><label for="version_name"><%=l(:field_name)%></label> <span class="required">*</span><br/> | |
|
5 | 5 | <%= text_field 'version', 'name', :size => 20 %></p> |
|
6 | 6 | |
|
7 |
<p><label for="version_description"><%= |
|
|
7 | <p><label for="version_description"><%=l(:field_description)%></label><br/> | |
|
8 | 8 | <%= text_field 'version', 'description', :size => 60 %></p> |
|
9 | 9 | |
|
10 |
<p><label for="version_effective_date"><%= |
|
|
10 | <p><label for="version_effective_date"><%=l(:field_effective_date)%></label><br/> | |
|
11 | 11 | <%= date_select 'version', 'effective_date' %></p> |
|
12 | 12 | <!--[eoform:version]--> |
|
13 | 13 |
@@ -1,8 +1,8 | |||
|
1 |
<h2><%= |
|
|
1 | <h2><%=l(:label_version)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= start_form_tag :action => 'edit', :id => @version %> |
|
4 | 4 | <%= render :partial => 'form' %> |
|
5 |
<%= submit_tag |
|
|
5 | <%= submit_tag l(:button_save) %> | |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 | |
|
8 | 8 |
@@ -1,31 +1,30 | |||
|
1 | 1 | <div class="splitcontentleft"> |
|
2 |
<h2><%= $RDM_WELCOME_TITLE || |
|
|
2 | <h2><%= $RDM_WELCOME_TITLE || l(:label_home) %></h2> | |
|
3 | 3 | <p><%= $RDM_WELCOME_TEXT %></p> |
|
4 | 4 | |
|
5 | 5 | <div class="box"> |
|
6 |
<h3><%= |
|
|
6 | <h3><%=l(:label_news_latest)%></h3> | |
|
7 | 7 | <% for news in @news %> |
|
8 | 8 | <p> |
|
9 | 9 | <b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br /> |
|
10 | 10 | <%= news.summary %><br /> |
|
11 |
[<%= link_to |
|
|
11 | [<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>] | |
|
12 | 12 | </p> |
|
13 | 13 | <hr /> |
|
14 | 14 | <% end %> |
|
15 | 15 | </div> |
|
16 | 16 | </div> |
|
17 | 17 | |
|
18 | 18 | <div class="splitcontentright"> |
|
19 | 19 | <div class="box"> |
|
20 |
<h3><%= |
|
|
20 | <h3><%=l(:label_project_latest)%></h3> | |
|
21 | 21 | <ul> |
|
22 | 22 | <% for project in @projects %> |
|
23 | 23 | <li> |
|
24 |
<%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> ( |
|
|
24 | <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)<br /> | |
|
25 | 25 | <%= project.description %> |
|
26 | 26 | </li> |
|
27 | 27 | <% end %> |
|
28 | 28 | </ul> |
|
29 | </div> | |
|
30 | ||
|
29 | </div> | |
|
31 | 30 | </div> |
@@ -1,307 +1,308 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Setup < ActiveRecord::Migration |
|
19 | 19 | def self.up |
|
20 | 20 | create_table "attachments", :force => true do |t| |
|
21 | 21 | t.column "container_id", :integer, :default => 0, :null => false |
|
22 | 22 | t.column "container_type", :string, :limit => 30, :default => "", :null => false |
|
23 | 23 | t.column "filename", :string, :default => "", :null => false |
|
24 | 24 | t.column "disk_filename", :string, :default => "", :null => false |
|
25 | 25 | t.column "filesize", :integer, :default => 0, :null => false |
|
26 | 26 | t.column "content_type", :string, :limit => 60, :default => "" |
|
27 | 27 | t.column "digest", :string, :limit => 40, :default => "", :null => false |
|
28 | 28 | t.column "downloads", :integer, :default => 0, :null => false |
|
29 | 29 | t.column "author_id", :integer, :default => 0, :null => false |
|
30 | 30 | t.column "created_on", :timestamp |
|
31 | 31 | end |
|
32 | 32 | |
|
33 | 33 | create_table "auth_sources", :force => true do |t| |
|
34 | 34 | t.column "type", :string, :limit => 30, :default => "", :null => false |
|
35 | 35 | t.column "name", :string, :limit => 60, :default => "", :null => false |
|
36 | 36 | t.column "host", :string, :limit => 60 |
|
37 | 37 | t.column "port", :integer |
|
38 | 38 | t.column "account", :string, :limit => 60 |
|
39 | 39 | t.column "account_password", :string, :limit => 60 |
|
40 | 40 | t.column "base_dn", :string, :limit => 255 |
|
41 | 41 | t.column "attr_login", :string, :limit => 30 |
|
42 | 42 | t.column "attr_firstname", :string, :limit => 30 |
|
43 | 43 | t.column "attr_lastname", :string, :limit => 30 |
|
44 | 44 | t.column "attr_mail", :string, :limit => 30 |
|
45 | 45 | t.column "onthefly_register", :boolean, :default => false, :null => false |
|
46 | 46 | end |
|
47 | 47 | |
|
48 | 48 | create_table "custom_fields", :force => true do |t| |
|
49 | 49 | t.column "type", :string, :limit => 30, :default => "", :null => false |
|
50 | 50 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
51 | 51 | t.column "field_format", :string, :limit => 30, :default => "", :null => false |
|
52 | 52 | t.column "possible_values", :text, :default => "" |
|
53 | 53 | t.column "regexp", :string, :default => "" |
|
54 | 54 | t.column "min_length", :integer, :default => 0, :null => false |
|
55 | 55 | t.column "max_length", :integer, :default => 0, :null => false |
|
56 | 56 | t.column "is_required", :boolean, :default => false, :null => false |
|
57 | 57 | t.column "is_for_all", :boolean, :default => false, :null => false |
|
58 | 58 | end |
|
59 | 59 | |
|
60 | 60 | create_table "custom_fields_projects", :id => false, :force => true do |t| |
|
61 | 61 | t.column "custom_field_id", :integer, :default => 0, :null => false |
|
62 | 62 | t.column "project_id", :integer, :default => 0, :null => false |
|
63 | 63 | end |
|
64 | 64 | |
|
65 | 65 | create_table "custom_fields_trackers", :id => false, :force => true do |t| |
|
66 | 66 | t.column "custom_field_id", :integer, :default => 0, :null => false |
|
67 | 67 | t.column "tracker_id", :integer, :default => 0, :null => false |
|
68 | 68 | end |
|
69 | 69 | |
|
70 | 70 | create_table "custom_values", :force => true do |t| |
|
71 | 71 | t.column "customized_type", :string, :limit => 30, :default => "", :null => false |
|
72 | 72 | t.column "customized_id", :integer, :default => 0, :null => false |
|
73 | 73 | t.column "custom_field_id", :integer, :default => 0, :null => false |
|
74 | 74 | t.column "value", :text, :default => "", :null => false |
|
75 | 75 | end |
|
76 | 76 | |
|
77 | 77 | create_table "documents", :force => true do |t| |
|
78 | 78 | t.column "project_id", :integer, :default => 0, :null => false |
|
79 | 79 | t.column "category_id", :integer, :default => 0, :null => false |
|
80 | 80 | t.column "title", :string, :limit => 60, :default => "", :null => false |
|
81 |
t.column "description", :text, :default => "" |
|
|
81 | t.column "description", :text, :default => "" | |
|
82 | 82 | t.column "created_on", :timestamp |
|
83 | 83 | end |
|
84 | 84 | |
|
85 | 85 | create_table "enumerations", :force => true do |t| |
|
86 | 86 | t.column "opt", :string, :limit => 4, :default => "", :null => false |
|
87 | 87 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
88 | 88 | end |
|
89 | 89 | |
|
90 | 90 | create_table "issue_categories", :force => true do |t| |
|
91 | 91 | t.column "project_id", :integer, :default => 0, :null => false |
|
92 | 92 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
93 | 93 | end |
|
94 | 94 | |
|
95 | 95 | create_table "issue_histories", :force => true do |t| |
|
96 | 96 | t.column "issue_id", :integer, :default => 0, :null => false |
|
97 | 97 | t.column "status_id", :integer, :default => 0, :null => false |
|
98 | 98 | t.column "author_id", :integer, :default => 0, :null => false |
|
99 | 99 | t.column "notes", :text, :default => "" |
|
100 | 100 | t.column "created_on", :timestamp |
|
101 | 101 | end |
|
102 | 102 | |
|
103 | 103 | add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id" |
|
104 | 104 | |
|
105 | 105 | create_table "issue_statuses", :force => true do |t| |
|
106 | 106 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
107 | 107 | t.column "is_closed", :boolean, :default => false, :null => false |
|
108 | 108 | t.column "is_default", :boolean, :default => false, :null => false |
|
109 | 109 | t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false |
|
110 | 110 | end |
|
111 | 111 | |
|
112 | 112 | create_table "issues", :force => true do |t| |
|
113 | 113 | t.column "tracker_id", :integer, :default => 0, :null => false |
|
114 | 114 | t.column "project_id", :integer, :default => 0, :null => false |
|
115 | 115 | t.column "subject", :string, :default => "", :null => false |
|
116 | t.column "description", :text, :default => "", :null => false | |
|
116 | t.column "description", :text, :default => "", :null => false | |
|
117 | t.column "due_date", :date | |
|
117 | 118 | t.column "category_id", :integer |
|
118 | 119 | t.column "status_id", :integer, :default => 0, :null => false |
|
119 | 120 | t.column "assigned_to_id", :integer |
|
120 | 121 | t.column "priority_id", :integer, :default => 0, :null => false |
|
121 | 122 | t.column "fixed_version_id", :integer |
|
122 | 123 | t.column "author_id", :integer, :default => 0, :null => false |
|
123 | 124 | t.column "created_on", :timestamp |
|
124 | 125 | t.column "updated_on", :timestamp |
|
125 | 126 | end |
|
126 | 127 | |
|
127 | 128 | add_index "issues", ["project_id"], :name => "issues_project_id" |
|
128 | 129 | |
|
129 | 130 | create_table "members", :force => true do |t| |
|
130 | 131 | t.column "user_id", :integer, :default => 0, :null => false |
|
131 | 132 | t.column "project_id", :integer, :default => 0, :null => false |
|
132 | 133 | t.column "role_id", :integer, :default => 0, :null => false |
|
133 | 134 | t.column "created_on", :timestamp |
|
134 | 135 | end |
|
135 | 136 | |
|
136 | 137 | create_table "news", :force => true do |t| |
|
137 | 138 | t.column "project_id", :integer |
|
138 | 139 | t.column "title", :string, :limit => 60, :default => "", :null => false |
|
139 | 140 | t.column "summary", :string, :limit => 255, :default => "" |
|
140 | 141 | t.column "description", :text, :default => "", :null => false |
|
141 | 142 | t.column "author_id", :integer, :default => 0, :null => false |
|
142 | 143 | t.column "created_on", :timestamp |
|
143 | 144 | end |
|
144 | 145 | |
|
145 | 146 | create_table "permissions", :force => true do |t| |
|
146 | 147 | t.column "controller", :string, :limit => 30, :default => "", :null => false |
|
147 | 148 | t.column "action", :string, :limit => 30, :default => "", :null => false |
|
148 | 149 | t.column "description", :string, :limit => 60, :default => "", :null => false |
|
149 | 150 | t.column "is_public", :boolean, :default => false, :null => false |
|
150 | 151 | t.column "sort", :integer, :default => 0, :null => false |
|
151 | 152 | t.column "mail_option", :boolean, :default => false, :null => false |
|
152 | 153 | t.column "mail_enabled", :boolean, :default => false, :null => false |
|
153 | 154 | end |
|
154 | 155 | |
|
155 | 156 | create_table "permissions_roles", :id => false, :force => true do |t| |
|
156 | 157 | t.column "permission_id", :integer, :default => 0, :null => false |
|
157 | 158 | t.column "role_id", :integer, :default => 0, :null => false |
|
158 | 159 | end |
|
159 | 160 | |
|
160 | 161 | add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" |
|
161 | 162 | |
|
162 | 163 | create_table "projects", :force => true do |t| |
|
163 | 164 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
164 | 165 | t.column "description", :string, :default => "", :null => false |
|
165 | 166 | t.column "homepage", :string, :limit => 60, :default => "" |
|
166 | 167 | t.column "is_public", :boolean, :default => true, :null => false |
|
167 | 168 | t.column "parent_id", :integer |
|
168 | 169 | t.column "projects_count", :integer, :default => 0 |
|
169 | 170 | t.column "created_on", :timestamp |
|
170 | 171 | t.column "updated_on", :timestamp |
|
171 | 172 | end |
|
172 | 173 | |
|
173 | 174 | create_table "roles", :force => true do |t| |
|
174 | 175 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
175 | 176 | end |
|
176 | 177 | |
|
177 | 178 | create_table "tokens", :force => true do |t| |
|
178 | 179 | t.column "user_id", :integer, :default => 0, :null => false |
|
179 | 180 | t.column "action", :string, :limit => 30, :default => "", :null => false |
|
180 | 181 | t.column "value", :string, :limit => 40, :default => "", :null => false |
|
181 | 182 | t.column "created_on", :datetime, :null => false |
|
182 | 183 | end |
|
183 | 184 | |
|
184 | 185 | create_table "trackers", :force => true do |t| |
|
185 | 186 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
186 | 187 | t.column "is_in_chlog", :boolean, :default => false, :null => false |
|
187 | 188 | end |
|
188 | 189 | |
|
189 | 190 | create_table "users", :force => true do |t| |
|
190 | 191 | t.column "login", :string, :limit => 30, :default => "", :null => false |
|
191 | 192 | t.column "hashed_password", :string, :limit => 40, :default => "", :null => false |
|
192 | 193 | t.column "firstname", :string, :limit => 30, :default => "", :null => false |
|
193 | 194 | t.column "lastname", :string, :limit => 30, :default => "", :null => false |
|
194 | 195 | t.column "mail", :string, :limit => 60, :default => "", :null => false |
|
195 | 196 | t.column "mail_notification", :boolean, :default => true, :null => false |
|
196 | 197 | t.column "admin", :boolean, :default => false, :null => false |
|
197 | 198 | t.column "status", :integer, :default => 1, :null => false |
|
198 | 199 | t.column "last_login_on", :datetime |
|
199 | 200 | t.column "language", :string, :limit => 2, :default => "" |
|
200 | 201 | t.column "auth_source_id", :integer |
|
201 | 202 | t.column "created_on", :timestamp |
|
202 | 203 | t.column "updated_on", :timestamp |
|
203 | 204 | end |
|
204 | 205 | |
|
205 | 206 | create_table "versions", :force => true do |t| |
|
206 | 207 | t.column "project_id", :integer, :default => 0, :null => false |
|
207 | 208 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
208 | 209 | t.column "description", :string, :default => "" |
|
209 | 210 | t.column "effective_date", :date, :null => false |
|
210 | 211 | t.column "created_on", :timestamp |
|
211 | 212 | t.column "updated_on", :timestamp |
|
212 | 213 | end |
|
213 | 214 | |
|
214 | 215 | create_table "workflows", :force => true do |t| |
|
215 | 216 | t.column "tracker_id", :integer, :default => 0, :null => false |
|
216 | 217 | t.column "old_status_id", :integer, :default => 0, :null => false |
|
217 | 218 | t.column "new_status_id", :integer, :default => 0, :null => false |
|
218 | 219 | t.column "role_id", :integer, :default => 0, :null => false |
|
219 | 220 | end |
|
220 | 221 | |
|
221 | 222 | # project |
|
222 |
Permission.create :controller => "projects", :action => "show", :description => " |
|
|
223 |
Permission.create :controller => "projects", :action => "changelog", :description => " |
|
|
224 |
Permission.create :controller => "reports", :action => "issue_report", :description => " |
|
|
225 |
Permission.create :controller => "projects", :action => "settings", :description => " |
|
|
226 |
Permission.create :controller => "projects", :action => "edit", :description => " |
|
|
223 | Permission.create :controller => "projects", :action => "show", :description => "label_overview", :sort => 100, :is_public => true | |
|
224 | Permission.create :controller => "projects", :action => "changelog", :description => "label_change_log", :sort => 105, :is_public => true | |
|
225 | Permission.create :controller => "reports", :action => "issue_report", :description => "label_report_plural", :sort => 110, :is_public => true | |
|
226 | Permission.create :controller => "projects", :action => "settings", :description => "label_settings", :sort => 150 | |
|
227 | Permission.create :controller => "projects", :action => "edit", :description => "button_edit", :sort => 151 | |
|
227 | 228 | # members |
|
228 |
Permission.create :controller => "projects", :action => "list_members", :description => " |
|
|
229 |
Permission.create :controller => "projects", :action => "add_member", :description => " |
|
|
230 |
Permission.create :controller => "members", :action => "edit", :description => " |
|
|
231 |
Permission.create :controller => "members", :action => "destroy", :description => " |
|
|
229 | Permission.create :controller => "projects", :action => "list_members", :description => "button_list", :sort => 200, :is_public => true | |
|
230 | Permission.create :controller => "projects", :action => "add_member", :description => "button_add", :sort => 220 | |
|
231 | Permission.create :controller => "members", :action => "edit", :description => "button_edit", :sort => 221 | |
|
232 | Permission.create :controller => "members", :action => "destroy", :description => "button_delete", :sort => 222 | |
|
232 | 233 | # versions |
|
233 |
Permission.create :controller => "projects", :action => "add_version", :description => " |
|
|
234 |
Permission.create :controller => "versions", :action => "edit", :description => " |
|
|
235 |
Permission.create :controller => "versions", :action => "destroy", :description => " |
|
|
234 | Permission.create :controller => "projects", :action => "add_version", :description => "button_add", :sort => 320 | |
|
235 | Permission.create :controller => "versions", :action => "edit", :description => "button_edit", :sort => 321 | |
|
236 | Permission.create :controller => "versions", :action => "destroy", :description => "button_delete", :sort => 322 | |
|
236 | 237 | # issue categories |
|
237 |
Permission.create :controller => "projects", :action => "add_issue_category", :description => " |
|
|
238 |
Permission.create :controller => "issue_categories", :action => "edit", :description => " |
|
|
239 |
Permission.create :controller => "issue_categories", :action => "destroy", :description => " |
|
|
238 | Permission.create :controller => "projects", :action => "add_issue_category", :description => "button_add", :sort => 420 | |
|
239 | Permission.create :controller => "issue_categories", :action => "edit", :description => "button_edit", :sort => 421 | |
|
240 | Permission.create :controller => "issue_categories", :action => "destroy", :description => "button_delete", :sort => 422 | |
|
240 | 241 | # issues |
|
241 |
Permission.create :controller => "projects", :action => "list_issues", :description => " |
|
|
242 |
Permission.create :controller => "projects", :action => "export_issues_csv", :description => " |
|
|
243 |
Permission.create :controller => "issues", :action => "show", :description => " |
|
|
244 |
Permission.create :controller => "issues", :action => "download", :description => " |
|
|
245 |
Permission.create :controller => "projects", :action => "add_issue", :description => " |
|
|
246 |
Permission.create :controller => "issues", :action => "edit", :description => " |
|
|
247 |
Permission.create :controller => "issues", :action => "change_status", :description => " |
|
|
248 |
Permission.create :controller => "issues", :action => "destroy", :description => " |
|
|
249 |
Permission.create :controller => "issues", :action => "add_attachment", :description => " |
|
|
250 |
Permission.create :controller => "issues", :action => "destroy_attachment", :description => " |
|
|
242 | Permission.create :controller => "projects", :action => "list_issues", :description => "button_list", :sort => 1000, :is_public => true | |
|
243 | Permission.create :controller => "projects", :action => "export_issues_csv", :description => "label_export_csv", :sort => 1001, :is_public => true | |
|
244 | Permission.create :controller => "issues", :action => "show", :description => "button_view", :sort => 1005, :is_public => true | |
|
245 | Permission.create :controller => "issues", :action => "download", :description => "button_download", :sort => 1010, :is_public => true | |
|
246 | Permission.create :controller => "projects", :action => "add_issue", :description => "button_add", :sort => 1050, :mail_option => 1, :mail_enabled => 1 | |
|
247 | Permission.create :controller => "issues", :action => "edit", :description => "button_edit", :sort => 1055 | |
|
248 | Permission.create :controller => "issues", :action => "change_status", :description => "label_change_status", :sort => 1060, :mail_option => 1, :mail_enabled => 1 | |
|
249 | Permission.create :controller => "issues", :action => "destroy", :description => "button_delete", :sort => 1065 | |
|
250 | Permission.create :controller => "issues", :action => "add_attachment", :description => "label_attachment_new", :sort => 1070 | |
|
251 | Permission.create :controller => "issues", :action => "destroy_attachment", :description => "label_attachment_delete", :sort => 1075 | |
|
251 | 252 | # news |
|
252 |
Permission.create :controller => "projects", :action => "list_news", :description => " |
|
|
253 |
Permission.create :controller => "news", :action => "show", :description => " |
|
|
254 |
Permission.create :controller => "projects", :action => "add_news", :description => " |
|
|
255 |
Permission.create :controller => "news", :action => "edit", :description => " |
|
|
256 |
Permission.create :controller => "news", :action => "destroy", :description => " |
|
|
253 | Permission.create :controller => "projects", :action => "list_news", :description => "button_list", :sort => 1100, :is_public => true | |
|
254 | Permission.create :controller => "news", :action => "show", :description => "button_view", :sort => 1101, :is_public => true | |
|
255 | Permission.create :controller => "projects", :action => "add_news", :description => "button_add", :sort => 1120 | |
|
256 | Permission.create :controller => "news", :action => "edit", :description => "button_edit", :sort => 1121 | |
|
257 | Permission.create :controller => "news", :action => "destroy", :description => "button_delete", :sort => 1122 | |
|
257 | 258 | # documents |
|
258 |
Permission.create :controller => "projects", :action => "list_documents", :description => " |
|
|
259 |
Permission.create :controller => "documents", :action => "show", :description => " |
|
|
260 |
Permission.create :controller => "documents", :action => "download", :description => " |
|
|
261 |
Permission.create :controller => "projects", :action => "add_document", :description => " |
|
|
262 |
Permission.create :controller => "documents", :action => "edit", :description => " |
|
|
263 |
Permission.create :controller => "documents", :action => "destroy", :description => " |
|
|
264 |
Permission.create :controller => "documents", :action => "add_attachment", :description => " |
|
|
265 |
Permission.create :controller => "documents", :action => "destroy_attachment", :description => " |
|
|
259 | Permission.create :controller => "projects", :action => "list_documents", :description => "button_list", :sort => 1200, :is_public => true | |
|
260 | Permission.create :controller => "documents", :action => "show", :description => "button_view", :sort => 1201, :is_public => true | |
|
261 | Permission.create :controller => "documents", :action => "download", :description => "button_download", :sort => 1202, :is_public => true | |
|
262 | Permission.create :controller => "projects", :action => "add_document", :description => "button_add", :sort => 1220 | |
|
263 | Permission.create :controller => "documents", :action => "edit", :description => "button_edit", :sort => 1221 | |
|
264 | Permission.create :controller => "documents", :action => "destroy", :description => "button_delete", :sort => 1222 | |
|
265 | Permission.create :controller => "documents", :action => "add_attachment", :description => "label_attachment_new", :sort => 1223 | |
|
266 | Permission.create :controller => "documents", :action => "destroy_attachment", :description => "label_attachment_delete", :sort => 1224 | |
|
266 | 267 | # files |
|
267 |
Permission.create :controller => "projects", :action => "list_files", :description => " |
|
|
268 |
Permission.create :controller => "versions", :action => "download", :description => " |
|
|
269 |
Permission.create :controller => "projects", :action => "add_file", :description => " |
|
|
270 |
Permission.create :controller => "versions", :action => "destroy_file", :description => " |
|
|
268 | Permission.create :controller => "projects", :action => "list_files", :description => "button_list", :sort => 1300, :is_public => true | |
|
269 | Permission.create :controller => "versions", :action => "download", :description => "button_download", :sort => 1301, :is_public => true | |
|
270 | Permission.create :controller => "projects", :action => "add_file", :description => "button_add", :sort => 1320 | |
|
271 | Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322 | |
|
271 | 272 | |
|
272 | 273 | # create default administrator account |
|
273 | 274 | user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en" |
|
274 | 275 | user.login = "admin" |
|
275 | 276 | user.password = "admin" |
|
276 | 277 | user.admin = true |
|
277 | 278 | user.save |
|
278 | 279 | |
|
279 | 280 | |
|
280 | 281 | end |
|
281 | 282 | |
|
282 | 283 | def self.down |
|
283 | 284 | drop_table :attachments |
|
284 | 285 | drop_table :auth_sources |
|
285 | 286 | drop_table :custom_fields |
|
286 | 287 | drop_table :custom_fields_projects |
|
287 | 288 | drop_table :custom_fields_trackers |
|
288 | 289 | drop_table :custom_values |
|
289 | 290 | drop_table :documents |
|
290 | 291 | drop_table :enumerations |
|
291 | 292 | drop_table :issue_categories |
|
292 | 293 | drop_table :issue_histories |
|
293 | 294 | drop_table :issue_statuses |
|
294 | 295 | drop_table :issues |
|
295 | 296 | drop_table :members |
|
296 | 297 | drop_table :news |
|
297 | 298 | drop_table :permissions |
|
298 | 299 | drop_table :permissions_roles |
|
299 | 300 | drop_table :projects |
|
300 | 301 | drop_table :roles |
|
301 | 302 | drop_table :trackers |
|
302 | 303 | drop_table :tokens |
|
303 | 304 | drop_table :users |
|
304 | 305 | drop_table :versions |
|
305 | 306 | drop_table :workflows |
|
306 | 307 | end |
|
307 | 308 | end |
@@ -1,62 +1,63 | |||
|
1 | 1 | == redMine changelog |
|
2 | 2 | |
|
3 | 3 | redMine - project management software |
|
4 | 4 | Copyright (C) 2006 Jean-Philippe Lang |
|
5 | 5 | http://redmine.org/ |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | == xx/xx/2006 v0.3.0 |
|
9 | 9 | |
|
10 | 10 | * user authentication against multiple LDAP |
|
11 | 11 | * token based "lost password" functionality |
|
12 | 12 | * user self-registration functionality (optional) |
|
13 | 13 | * custom fields now available for issues, users and projects |
|
14 | * new custom field format "text" (textarea) | |
|
15 | * project & administration drop down menus in navigation bar | |
|
14 | * new custom field format "text" (displayed as a textarea field) | |
|
15 | * project & administration drop down menus in navigation bar for quicker access | |
|
16 | * "due date" field added on issues | |
|
16 | 17 | * error messages internationalization |
|
17 | 18 | * Localization plugin replaced with GLoc 1.1.0 |
|
18 | 19 | * new filter in issues list: "Fixed version" |
|
19 | * colored background for active filters on issues list | |
|
20 | * active filters are displayed with colored background on issues list | |
|
20 | 21 | * custom configuration is now defined in config/config_custom.rb |
|
21 | 22 | * user object no more stored in session (only user_id) |
|
22 | 23 | * news summary field is no longer required |
|
23 | 24 | * Fixed: boolean custom field not working |
|
24 | 25 | * Fixed: error messages for custom fields are not displayed |
|
25 | 26 | * Fixed: custom fields values are not validated on issue update |
|
26 |
* Fixed: u |
|
|
27 | * Fixed: unable to choose an empty value for 'List' custom fields | |
|
27 | 28 | * Fixed: no issue categories sorting |
|
28 | 29 | * Fixed: incorrect versions sorting |
|
29 | 30 | |
|
30 | 31 | |
|
31 | 32 | == 07/12/2006 - v0.2.2 |
|
32 | 33 | |
|
33 | 34 | * Fixed: bug in "issues list" |
|
34 | 35 | |
|
35 | 36 | |
|
36 | 37 | == 07/09/2006 - v0.2.1 |
|
37 | 38 | |
|
38 | 39 | * new databases supported: Oracle, PostgreSQL, SQL Server |
|
39 | 40 | * projects/subprojects hierarchy (1 level of subprojects only) |
|
40 | 41 | * environment information display in admin/info |
|
41 | 42 | * more filter options in issues list (rev6) |
|
42 | 43 | * default language based on browser settings (Accept-Language HTTP header) |
|
43 | 44 | * issues list exportable to CSV (rev6) |
|
44 | 45 | * simple_format and auto_link on long text fields |
|
45 | 46 | * more data validations |
|
46 | 47 | * Fixed: error when all mail notifications are unchecked in admin/mail_options |
|
47 | 48 | * Fixed: all project news are displayed on project summary |
|
48 | 49 | * Fixed: Can't change user password in users/edit |
|
49 | 50 | * Fixed: Error on tables creation with PostgreSQL (rev5) |
|
50 | 51 | * Fixed: SQL error in "issue reports" view with PostgreSQL (rev5) |
|
51 | 52 | |
|
52 | 53 | |
|
53 | 54 | == 06/25/2006 - v0.1.0 |
|
54 | 55 | |
|
55 | 56 | * multiple users/multiple projects |
|
56 | 57 | * role based access control |
|
57 | 58 | * issue tracking system |
|
58 | 59 | * fully customizable workflow |
|
59 | 60 | * documents/files repository |
|
60 | 61 | * email notifications on issue creation and update |
|
61 | 62 | * multilanguage support (except for error messages):english, french, spanish |
|
62 | 63 | * online manual in french (unfinished) No newline at end of file |
@@ -1,113 +1,114 | |||
|
1 | 1 | _gloc_rule_default: '|n| n==1 ? "" : "_plural" ' |
|
2 | 2 | |
|
3 | 3 | actionview_datehelper_select_day_prefix: |
|
4 | 4 | actionview_datehelper_select_month_names: January,February,March,April,May,June,July,August,September,October,November,December |
|
5 | 5 | actionview_datehelper_select_month_names_abbr: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec |
|
6 | 6 | actionview_datehelper_select_month_prefix: |
|
7 | 7 | actionview_datehelper_select_year_prefix: |
|
8 | 8 | actionview_datehelper_time_in_words_day: 1 day |
|
9 | 9 | actionview_datehelper_time_in_words_day_plural: %d days |
|
10 | 10 | actionview_datehelper_time_in_words_hour_about: about an hour |
|
11 | 11 | actionview_datehelper_time_in_words_hour_about_plural: about %d hours |
|
12 | 12 | actionview_datehelper_time_in_words_hour_about_single: about an hour |
|
13 | 13 | actionview_datehelper_time_in_words_minute: 1 minute |
|
14 | 14 | actionview_datehelper_time_in_words_minute_half: half a minute |
|
15 | 15 | actionview_datehelper_time_in_words_minute_less_than: less than a minute |
|
16 | 16 | actionview_datehelper_time_in_words_minute_plural: %d minutes |
|
17 | 17 | actionview_datehelper_time_in_words_minute_single: 1 minute |
|
18 | 18 | actionview_datehelper_time_in_words_second_less_than: less than a second |
|
19 | 19 | actionview_datehelper_time_in_words_second_less_than_plural: less than %d seconds |
|
20 | 20 | actionview_instancetag_blank_option: Please select |
|
21 | 21 | |
|
22 | 22 | activerecord_error_inclusion: is not included in the list |
|
23 | 23 | activerecord_error_exclusion: is reserved |
|
24 | 24 | activerecord_error_invalid: is invalid |
|
25 | 25 | activerecord_error_confirmation: doesn't match confirmation |
|
26 | 26 | activerecord_error_accepted: must be accepted |
|
27 | 27 | activerecord_error_empty: can't be empty |
|
28 | 28 | activerecord_error_blank: can't be blank |
|
29 | 29 | activerecord_error_too_long: is too long |
|
30 | 30 | activerecord_error_too_short: is too short |
|
31 | 31 | activerecord_error_wrong_length: is the wrong length |
|
32 | 32 | activerecord_error_taken: has already been taken |
|
33 | 33 | activerecord_error_not_a_number: is not a number |
|
34 | 34 | |
|
35 | 35 | general_fmt_age: %d yr |
|
36 | 36 | general_fmt_age_plural: %d yrs |
|
37 | 37 | general_fmt_date: %%b %%d, %%Y (%%a) |
|
38 | 38 | general_fmt_datetime: %%b %%d, %%Y (%%a), %%I:%%M %%p |
|
39 | 39 | general_fmt_datetime_short: %%b %%d, %%I:%%M %%p |
|
40 | 40 | general_fmt_time: %%I:%%M %%p |
|
41 | 41 | general_text_No: 'No' |
|
42 | 42 | general_text_Yes: 'Yes' |
|
43 | 43 | general_text_no: 'no' |
|
44 | 44 | general_text_yes: 'yes' |
|
45 | general_lang_en: 'English' | |
|
45 | 46 | |
|
46 | 47 | notice_account_updated: Account was successfully updated. |
|
47 | 48 | notice_account_invalid_creditentials: Invalid user or password |
|
48 | 49 | notice_account_password_updated: Password was successfully updated. |
|
49 | 50 | notice_account_wrong_password: Wrong password |
|
50 | 51 | notice_account_register_done: Account was successfully created. |
|
51 | 52 | notice_account_unknown_email: Unknown user. |
|
52 | 53 | notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you. |
|
53 | 54 | |
|
54 | 55 | gui_menu_home: Home |
|
55 | 56 | gui_menu_my_page: My page |
|
56 | 57 | gui_menu_projects: Projects |
|
57 | 58 | gui_menu_my_account: My account |
|
58 | 59 | gui_menu_admin: Administration |
|
59 | 60 | gui_menu_login: Login |
|
60 | 61 | gui_menu_logout: Logout |
|
61 | 62 | gui_menu_help: Help |
|
62 | 63 | gui_validation_error: 1 error |
|
63 | 64 | gui_validation_error_plural: %d errors |
|
64 | 65 | |
|
65 | 66 | field_name: Name |
|
66 | 67 | field_description: Description |
|
67 | 68 | field_summary: Summary |
|
68 | 69 | field_is_required: Required |
|
69 | 70 | field_firstname: Firstname |
|
70 | 71 | field_lastname: Lastname |
|
71 | 72 | field_mail: Email |
|
72 | 73 | field_filename: File |
|
73 | 74 | field_filesize: Size |
|
74 | 75 | field_downloads: Downloads |
|
75 | 76 | field_author: Author |
|
76 | 77 | field_created_on: Created |
|
77 | 78 | field_updated_on: Updated |
|
78 | 79 | field_field_format: Format |
|
79 | 80 | field_is_for_all: For all projects |
|
80 | 81 | field_possible_values: Possible values |
|
81 | 82 | field_regexp: Regular expression |
|
82 | 83 | field_min_length: Minimum length |
|
83 | 84 | field_max_length: Maximum length |
|
84 | 85 | field_value: Value |
|
85 | 86 | field_category: Catogory |
|
86 | 87 | field_title: Title |
|
87 | 88 | field_project: Project |
|
88 | 89 | field_issue: Issue |
|
89 | 90 | field_status: Status |
|
90 | 91 | field_notes: Notes |
|
91 | 92 | field_is_closed: Issue closed |
|
92 | 93 | field_is_default: Default status |
|
93 | 94 | field_html_color: Color |
|
94 | 95 | field_tracker: Tracker |
|
95 | 96 | field_subject: Subject |
|
96 | 97 | field_assigned_to: Assigned to |
|
97 | 98 | field_priority: Priority |
|
98 | 99 | field_fixed_version: Fixed version |
|
99 | 100 | field_user: User |
|
100 | 101 | field_role: Role |
|
101 | 102 | field_homepage: Homepage |
|
102 | 103 | field_is_public: Public |
|
103 | 104 | field_parent: Subproject de |
|
104 | 105 | field_is_in_chlog: Issues displayed in changelog |
|
105 | 106 | field_login: Login |
|
106 | 107 | field_mail_notification: Mail notifications |
|
107 | 108 | field_admin: Administrator |
|
108 | 109 | field_locked: Locked |
|
109 | 110 | field_last_login_on: Last connection |
|
110 | 111 | field_language: Language |
|
111 | 112 | field_effective_date: Date |
|
112 | 113 | field_password: Password |
|
113 | 114 | field_password_confirmation: Confirmation No newline at end of file |
@@ -1,199 +1,288 | |||
|
1 |
_gloc_rule_default: '|n| n |
|
|
1 | _gloc_rule_default: '|n| n<=1 ? "" : "_plural" ' | |
|
2 | 2 | |
|
3 | 3 | actionview_datehelper_select_day_prefix: |
|
4 | 4 | actionview_datehelper_select_month_names: Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre |
|
5 | 5 | actionview_datehelper_select_month_names_abbr: Jan,Fév,Mars,Avril,Mai,Juin,Juil,Août,Sept,Oct,Nov,Déc |
|
6 | 6 | actionview_datehelper_select_month_prefix: |
|
7 | 7 | actionview_datehelper_select_year_prefix: |
|
8 | 8 | actionview_datehelper_time_in_words_day: 1 jour |
|
9 | 9 | actionview_datehelper_time_in_words_day_plural: %d jours |
|
10 | 10 | actionview_datehelper_time_in_words_hour_about: about an hour |
|
11 | 11 | actionview_datehelper_time_in_words_hour_about_plural: about %d hours |
|
12 | 12 | actionview_datehelper_time_in_words_hour_about_single: about an hour |
|
13 | 13 | actionview_datehelper_time_in_words_minute: 1 minute |
|
14 | 14 | actionview_datehelper_time_in_words_minute_half: 30 secondes |
|
15 | 15 | actionview_datehelper_time_in_words_minute_less_than: moins d'une minute |
|
16 | 16 | actionview_datehelper_time_in_words_minute_plural: %d minutes |
|
17 | 17 | actionview_datehelper_time_in_words_minute_single: 1 minute |
|
18 | 18 | actionview_datehelper_time_in_words_second_less_than: moins d'une seconde |
|
19 | 19 | actionview_datehelper_time_in_words_second_less_than_plural: moins de %d secondes |
|
20 | 20 | actionview_instancetag_blank_option: Choisir |
|
21 | 21 | |
|
22 | 22 | activerecord_error_inclusion: n'est pas inclus dans la liste |
|
23 | 23 | activerecord_error_exclusion: est reservé |
|
24 | 24 | activerecord_error_invalid: est invalide |
|
25 | 25 | activerecord_error_confirmation: ne correspond pas à la confirmation |
|
26 | 26 | activerecord_error_accepted: doit être accepté |
|
27 | 27 | activerecord_error_empty: doit être renseigné |
|
28 | 28 | activerecord_error_blank: doit être renseigné |
|
29 | 29 | activerecord_error_too_long: est trop long |
|
30 | 30 | activerecord_error_too_short: est trop court |
|
31 | 31 | activerecord_error_wrong_length: n'est pas de la bonne longueur |
|
32 | 32 | activerecord_error_taken: est déjà utilisé |
|
33 | 33 | activerecord_error_not_a_number: n'est pas un nombre |
|
34 | 34 | |
|
35 | 35 | general_fmt_age: %d an |
|
36 | 36 | general_fmt_age_plural: %d ans |
|
37 | 37 | general_fmt_date: %%d/%%m/%%Y |
|
38 | 38 | general_fmt_datetime: %%d/%%m/%%Y %%H:%%M |
|
39 | 39 | general_fmt_datetime_short: %%d/%%m %%H:%%M |
|
40 | 40 | general_fmt_time: %%H:%%M |
|
41 | 41 | general_text_No: 'Non' |
|
42 | 42 | general_text_Yes: 'Oui' |
|
43 | 43 | general_text_no: 'non' |
|
44 | 44 | general_text_yes: 'oui' |
|
45 | general_lang_fr: 'Français' | |
|
45 | 46 | |
|
46 | 47 | notice_account_updated: Le compte a été mis à jour avec succès. |
|
47 | 48 | notice_account_invalid_creditentials: Identifiant ou mot de passe invalide. |
|
48 | 49 | notice_account_password_updated: Mot de passe mis à jour avec succès. |
|
49 | 50 | notice_account_wrong_password: Mot de passe incorrect |
|
50 | 51 | notice_account_register_done: Un message contenant les instructions pour activer votre compte vous a été envoyé. |
|
51 | 52 | notice_account_unknown_email: Aucun compte ne correspond à cette adresse. |
|
53 | notice_can_t_change_password: Ce compte utilise une authentification externe. Impossible de changer le mot de passe. | |
|
52 | 54 | notice_account_lost_email_sent: Un message contenant les instructions pour choisir un nouveau mot de passe vous a été envoyé. |
|
53 | 55 | notice_account_activated: Votre compte a été activé. Vous pouvez à présent vous connecter. |
|
54 | notice_successful_update: Mise à jour effectuée avec succès. | |
|
55 | 56 | notice_successful_create: Création effectuée avec succès. |
|
57 | notice_successful_update: Mise à jour effectuée avec succès. | |
|
56 | 58 | notice_successful_delete: Suppression effectuée avec succès. |
|
57 | 59 | notice_successful_connection: Connection réussie. |
|
58 | 60 | |
|
59 | 61 | gui_validation_error: 1 erreur |
|
60 | 62 | gui_validation_error_plural: %d erreurs |
|
61 | 63 | |
|
62 | 64 | field_name: Nom |
|
63 | 65 | field_description: Description |
|
64 | 66 | field_summary: Résumé |
|
65 | 67 | field_is_required: Obligatoire |
|
66 | 68 | field_firstname: Prénom |
|
67 | 69 | field_lastname: Nom |
|
68 | 70 | field_mail: Email |
|
69 | 71 | field_filename: Fichier |
|
70 | 72 | field_filesize: Taille |
|
71 | 73 | field_downloads: Téléchargements |
|
72 | 74 | field_author: Auteur |
|
73 | 75 | field_created_on: Créé |
|
74 | 76 | field_updated_on: Mis à jour |
|
75 | 77 | field_field_format: Format |
|
76 | 78 | field_is_for_all: Pour tous les projets |
|
77 | 79 | field_possible_values: Valeurs possibles |
|
78 | 80 | field_regexp: Expression régulière |
|
79 | 81 | field_min_length: Longueur minimum |
|
80 | 82 | field_max_length: Longueur maximum |
|
81 | 83 | field_value: Valeur |
|
82 | 84 | field_category: Catégorie |
|
83 | 85 | field_title: Titre |
|
84 | 86 | field_project: Projet |
|
85 | 87 | field_issue: Demande |
|
86 | 88 | field_status: Statut |
|
87 | 89 | field_notes: Notes |
|
88 | 90 | field_is_closed: Demande fermée |
|
89 | 91 | field_is_default: Statut par défaut |
|
90 | 92 | field_html_color: Couleur |
|
91 | 93 | field_tracker: Tracker |
|
92 | 94 | field_subject: Sujet |
|
95 | field_due_date: Date d'échéance | |
|
93 | 96 | field_assigned_to: Assigné à |
|
94 | 97 | field_priority: Priorité |
|
95 | 98 | field_fixed_version: Version corrigée |
|
96 | 99 | field_user: Utilisateur |
|
97 | 100 | field_role: Rôle |
|
98 | 101 | field_homepage: Site web |
|
99 | 102 | field_is_public: Public |
|
100 | 103 | field_parent: Sous-projet de |
|
101 | 104 | field_is_in_chlog: Demandes affichées dans l'historique |
|
102 | 105 | field_login: Identifiant |
|
103 | 106 | field_mail_notification: Notifications par mail |
|
104 | 107 | field_admin: Administrateur |
|
105 | 108 | field_locked: Verrouillé |
|
106 | 109 | field_last_login_on: Dernière connexion |
|
107 | 110 | field_language: Langue |
|
108 | 111 | field_effective_date: Date |
|
109 | 112 | field_password: Mot de passe |
|
110 | 113 | field_new_password: Nouveau mot de passe |
|
111 | 114 | field_password_confirmation: Confirmation |
|
112 | 115 | field_version: Version |
|
113 | 116 | field_type: Type |
|
114 | 117 | field_host: Hôte |
|
115 | 118 | field_port: Port |
|
116 | 119 | field_account: Compte |
|
117 | 120 | field_base_dn: Base DN |
|
118 | 121 | field_attr_login: Attribut Identifiant |
|
119 | 122 | field_attr_firstname: Attribut Prénom |
|
120 | 123 | field_attr_lastname: Attribut Nom |
|
121 | 124 | field_attr_mail: Attribut Email |
|
122 | 125 | field_onthefly: Création des utilisateurs à la volée |
|
123 | 126 | |
|
124 | 127 | label_user: Utilisateur |
|
125 | 128 | label_user_plural: Utilisateurs |
|
126 | 129 | label_user_new: Nouvel utilisateur |
|
127 | 130 | label_project: Projet |
|
128 | 131 | label_project_new: Nouveau projet |
|
129 | 132 | label_project_plural: Projets |
|
133 | label_project_latest: Derniers projets | |
|
130 | 134 | label_issue: Demande |
|
131 | 135 | label_issue_new: Nouvelle demande |
|
132 | 136 | label_issue_plural: Demandes |
|
137 | label_issue_view_all: Voir toutes les demandes | |
|
138 | label_document: Document | |
|
139 | label_document_new: Nouveau document | |
|
140 | label_document_plural: Documents | |
|
133 | 141 | label_role: Rôle |
|
134 | 142 | label_role_plural: Rôles |
|
135 |
label_role_ |
|
|
143 | label_role_new: Nouveau rôle | |
|
136 | 144 | label_role_and_permissions: Rôles et permissions |
|
145 | label_member: Membre | |
|
146 | label_member_new: Nouveau membre | |
|
147 | label_member_plural: Membres | |
|
137 | 148 | label_tracker: Tracker |
|
138 | 149 | label_tracker_plural: Trackers |
|
139 |
label_tracker_ |
|
|
150 | label_tracker_new: Nouveau tracker | |
|
140 | 151 | label_workflow: Workflow |
|
141 | 152 | label_issue_status: Statut de demandes |
|
142 | 153 | label_issue_status_plural: Statuts de demandes |
|
143 |
label_issue_status_ |
|
|
154 | label_issue_status_new: Nouveau statut | |
|
155 | label_issue_category: Catégorie de demandes | |
|
156 | label_issue_category_plural: Catégories de demandes | |
|
157 | label_issue_category_new: Nouvelle catégorie | |
|
144 | 158 | label_custom_field: Champ personnalisé |
|
145 | 159 | label_custom_field_plural: Champs personnalisés |
|
146 | 160 | label_custom_field_new: Nouveau champ personnalisé |
|
147 | 161 | label_enumerations: Listes de valeurs |
|
162 | label_enumeration_new: Nouvelle valeur | |
|
148 | 163 | label_information: Information |
|
149 | 164 | label_information_plural: Informations |
|
150 | 165 | label_please_login: Identification |
|
151 | 166 | label_register: S'enregistrer |
|
152 | 167 | label_password_lost: Mot de passe perdu |
|
153 | 168 | label_home: Accueil |
|
154 | 169 | label_my_page: Ma page |
|
155 | 170 | label_my_account: Mon compte |
|
171 | label_my_projects: Mes projets | |
|
156 | 172 | label_administration: Administration |
|
157 | 173 | label_login: Connexion |
|
158 | 174 | label_logout: Déconnexion |
|
159 | 175 | label_help: Aide |
|
160 | 176 | label_reported_issues: Demandes soumises |
|
161 | 177 | label_assigned_to_me_issues: Demandes qui me sont assignées |
|
162 | 178 | label_last_login: Dernière connexion |
|
163 | 179 | label_last_updates: Dernière mise à jour |
|
164 | 180 | label_last_updates_plural: %d dernières mises à jour |
|
165 | 181 | label_registered_on: Inscrit le |
|
166 | 182 | label_activity: Activité |
|
167 | 183 | label_new: Nouveau |
|
168 | 184 | label_logged_as: Connecté en tant que |
|
169 | 185 | label_environment: Environnement |
|
170 | 186 | label_authentication: Authentification |
|
171 | 187 | label_auth_source: Mode d'authentification |
|
172 | 188 | label_auth_source_new: Nouveau mode d'authentification |
|
173 | 189 | label_auth_source_plural: Modes d'authentification |
|
174 | 190 | label_subproject: Sous-projet |
|
175 | 191 | label_subproject_plural: Sous-projets |
|
176 | 192 | label_min_max_length: Longueurs mini - maxi |
|
177 | 193 | label_list: Liste |
|
178 | 194 | label_date: Date |
|
179 | 195 | label_integer: Entier |
|
180 | 196 | label_boolean: Booléen |
|
181 | 197 | label_string: Chaîne |
|
182 | 198 | label_text: Texte |
|
183 | 199 | label_attribute: Attribut |
|
184 | 200 | label_attribute_plural: Attributs |
|
185 | ||
|
201 | label_download: %d Téléchargement | |
|
202 | label_download_plural: %d Téléchargements | |
|
203 | label_no_data: Aucune donnée à afficher | |
|
204 | label_change_status: Changer le statut | |
|
205 | label_history: Historique | |
|
206 | label_attachment: Fichier | |
|
207 | label_attachment_new: Nouveau fichier | |
|
208 | label_attachment_delete: Supprimer le fichier | |
|
209 | label_attachment_plural: Fichiers | |
|
210 | label_report: Rapport | |
|
211 | label_report_plural: Rapports | |
|
212 | label_news: Annonce | |
|
213 | label_news_new: Nouvelle annonce | |
|
214 | label_news_plural: Annonces | |
|
215 | label_news_latest: Dernières annonces | |
|
216 | label_news_view_all: Voir toutes les annonces | |
|
217 | label_change_log: Historique | |
|
218 | label_settings: Configuration | |
|
219 | label_overview: Aperçu | |
|
220 | label_version: Version | |
|
221 | label_version_new: Nouvelle version | |
|
222 | label_version_plural: Versions | |
|
223 | label_confirmation: Confirmation | |
|
224 | label_export_csv: Exporter en CSV | |
|
225 | label_read: Lire... | |
|
226 | label_public_projects: Projets publics | |
|
227 | label_open_issues: Ouverte | |
|
228 | label_open_issues_plural: Ouvertes | |
|
229 | label_closed_issues: Fermée | |
|
230 | label_closed_issues_plural: Fermées | |
|
231 | label_total: Total | |
|
232 | label_permissions: Permissions | |
|
233 | label_current_status: Statut actuel | |
|
234 | label_new_statuses_allowed: Nouveaux statuts autorisés | |
|
235 | label_all: Tous | |
|
236 | label_none: Aucun | |
|
237 | label_next: Suivant | |
|
238 | label_previous: Précédent | |
|
239 | label_used_by: Utilisé par | |
|
186 | 240 | |
|
187 | 241 | button_login: Connexion |
|
188 | 242 | button_submit: Soumettre |
|
189 | 243 | button_save: Valider |
|
190 | 244 | button_check_all: Tout cocher |
|
191 | 245 | button_uncheck_all: Tout décocher |
|
192 | 246 | button_delete: Supprimer |
|
193 | 247 | button_create: Créer |
|
194 | 248 | button_test: Tester |
|
249 | button_edit: Modifier | |
|
250 | button_add: Ajouter | |
|
251 | button_change: Changer | |
|
252 | button_apply: Appliquer | |
|
253 | button_clear: Effacer | |
|
254 | button_lock: Verrouiller | |
|
255 | button_unlock: Déverrouiller | |
|
256 | button_download: Télécharger | |
|
257 | button_list: Lister | |
|
258 | button_view: Voir | |
|
195 | 259 | |
|
196 | 260 | text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée. |
|
197 | 261 | text_regexp_info: eg. ^[A-Z0-9]+$ |
|
198 | 262 | text_min_max_length_info: 0 pour aucune restriction |
|
199 | text_possible_values_info: valeurs séparées par | No newline at end of file | |
|
263 | text_possible_values_info: valeurs séparées par | | |
|
264 | text_project_destroy_confirmation: Etes-vous sûr de vouloir supprimer ce projet et tout ce qui lui est rattaché ? | |
|
265 | text_workflow_edit: Sélectionner un tracker et un rôle pour éditer le workflow | |
|
266 | ||
|
267 | default_role_manager: Manager | |
|
268 | default_role_developper: Développeur | |
|
269 | default_role_reporter: Rapporteur | |
|
270 | default_tracker_bug: Anomalie | |
|
271 | default_tracker_feature: Evolution | |
|
272 | default_tracker_support: Assistance | |
|
273 | default_issue_status_new: Nouveau | |
|
274 | default_issue_status_assigned: Assigné | |
|
275 | default_issue_status_resolved: Résolu | |
|
276 | default_issue_status_feedback: Commentaire | |
|
277 | default_issue_status_closed: Fermé | |
|
278 | default_issue_status_rejected: Rejeté | |
|
279 | default_doc_category_user: Documentation utilisateur | |
|
280 | default_doc_category_tech: Documentation technique | |
|
281 | default_priority_low: Bas | |
|
282 | default_priority_normal: Normal | |
|
283 | default_priority_high: Haut | |
|
284 | default_priority_urgent: Urgent | |
|
285 | default_priority_immediate: Immédiat | |
|
286 | ||
|
287 | enumeration_issue_priorities: Priorités des demandes | |
|
288 | enumeration_doc_categories: Catégories des documents |
@@ -1,379 +1,379 | |||
|
1 | 1 | --- |
|
2 | 2 | permissions_041: |
|
3 | 3 | action: add_file |
|
4 | 4 | id: 41 |
|
5 |
description: |
|
|
5 | description: button_add | |
|
6 | 6 | controller: projects |
|
7 | 7 | mail_enabled: false |
|
8 | 8 | mail_option: false |
|
9 | 9 | sort: 1320 |
|
10 | 10 | is_public: false |
|
11 | 11 | permissions_030: |
|
12 | 12 | action: destroy |
|
13 | 13 | id: 30 |
|
14 |
description: |
|
|
14 | description: button_delete | |
|
15 | 15 | controller: news |
|
16 | 16 | mail_enabled: false |
|
17 | 17 | mail_option: false |
|
18 | 18 | sort: 1122 |
|
19 | 19 | is_public: false |
|
20 | 20 | permissions_019: |
|
21 | 21 | action: download |
|
22 | 22 | id: 19 |
|
23 |
description: |
|
|
23 | description: button_download | |
|
24 | 24 | controller: issues |
|
25 | 25 | mail_enabled: false |
|
26 | 26 | mail_option: false |
|
27 | 27 | sort: 1010 |
|
28 | 28 | is_public: true |
|
29 | 29 | permissions_008: |
|
30 | 30 | action: edit |
|
31 | 31 | id: 8 |
|
32 |
description: |
|
|
32 | description: button_edit | |
|
33 | 33 | controller: members |
|
34 | 34 | mail_enabled: false |
|
35 | 35 | mail_option: false |
|
36 | 36 | sort: 221 |
|
37 | 37 | is_public: false |
|
38 | 38 | permissions_042: |
|
39 | 39 | action: destroy_file |
|
40 | 40 | id: 42 |
|
41 |
description: |
|
|
41 | description: button_delete | |
|
42 | 42 | controller: versions |
|
43 | 43 | mail_enabled: false |
|
44 | 44 | mail_option: false |
|
45 | 45 | sort: 1322 |
|
46 | 46 | is_public: false |
|
47 | 47 | permissions_031: |
|
48 | 48 | action: list_documents |
|
49 | 49 | id: 31 |
|
50 |
description: |
|
|
50 | description: button_list | |
|
51 | 51 | controller: projects |
|
52 | 52 | mail_enabled: false |
|
53 | 53 | mail_option: false |
|
54 | 54 | sort: 1200 |
|
55 | 55 | is_public: true |
|
56 | 56 | permissions_020: |
|
57 | 57 | action: add_issue |
|
58 | 58 | id: 20 |
|
59 |
description: |
|
|
59 | description: button_add | |
|
60 | 60 | controller: projects |
|
61 | 61 | mail_enabled: true |
|
62 | 62 | mail_option: true |
|
63 | 63 | sort: 1050 |
|
64 | 64 | is_public: false |
|
65 | 65 | permissions_009: |
|
66 | 66 | action: destroy |
|
67 | 67 | id: 9 |
|
68 |
description: |
|
|
68 | description: button_delete | |
|
69 | 69 | controller: members |
|
70 | 70 | mail_enabled: false |
|
71 | 71 | mail_option: false |
|
72 | 72 | sort: 222 |
|
73 | 73 | is_public: false |
|
74 | 74 | permissions_032: |
|
75 | 75 | action: show |
|
76 | 76 | id: 32 |
|
77 |
description: |
|
|
77 | description: button_view | |
|
78 | 78 | controller: documents |
|
79 | 79 | mail_enabled: false |
|
80 | 80 | mail_option: false |
|
81 | 81 | sort: 1201 |
|
82 | 82 | is_public: true |
|
83 | 83 | permissions_021: |
|
84 | 84 | action: edit |
|
85 | 85 | id: 21 |
|
86 |
description: |
|
|
86 | description: button_edit | |
|
87 | 87 | controller: issues |
|
88 | 88 | mail_enabled: false |
|
89 | 89 | mail_option: false |
|
90 | 90 | sort: 1055 |
|
91 | 91 | is_public: false |
|
92 | 92 | permissions_010: |
|
93 | 93 | action: add_version |
|
94 | 94 | id: 10 |
|
95 |
description: |
|
|
95 | description: button_add | |
|
96 | 96 | controller: projects |
|
97 | 97 | mail_enabled: false |
|
98 | 98 | mail_option: false |
|
99 | 99 | sort: 320 |
|
100 | 100 | is_public: false |
|
101 | 101 | permissions_033: |
|
102 | 102 | action: download |
|
103 | 103 | id: 33 |
|
104 |
description: |
|
|
104 | description: button_download | |
|
105 | 105 | controller: documents |
|
106 | 106 | mail_enabled: false |
|
107 | 107 | mail_option: false |
|
108 | 108 | sort: 1202 |
|
109 | 109 | is_public: true |
|
110 | 110 | permissions_022: |
|
111 | 111 | action: change_status |
|
112 | 112 | id: 22 |
|
113 |
description: |
|
|
113 | description: label_change_status | |
|
114 | 114 | controller: issues |
|
115 | 115 | mail_enabled: true |
|
116 | 116 | mail_option: true |
|
117 | 117 | sort: 1060 |
|
118 | 118 | is_public: false |
|
119 | 119 | permissions_011: |
|
120 | 120 | action: edit |
|
121 | 121 | id: 11 |
|
122 |
description: |
|
|
122 | description: button_edit | |
|
123 | 123 | controller: versions |
|
124 | 124 | mail_enabled: false |
|
125 | 125 | mail_option: false |
|
126 | 126 | sort: 321 |
|
127 | 127 | is_public: false |
|
128 | 128 | permissions_034: |
|
129 | 129 | action: add_document |
|
130 | 130 | id: 34 |
|
131 |
description: |
|
|
131 | description: button_add | |
|
132 | 132 | controller: projects |
|
133 | 133 | mail_enabled: false |
|
134 | 134 | mail_option: false |
|
135 | 135 | sort: 1220 |
|
136 | 136 | is_public: false |
|
137 | 137 | permissions_023: |
|
138 | 138 | action: destroy |
|
139 | 139 | id: 23 |
|
140 |
description: |
|
|
140 | description: button_delete | |
|
141 | 141 | controller: issues |
|
142 | 142 | mail_enabled: false |
|
143 | 143 | mail_option: false |
|
144 | 144 | sort: 1065 |
|
145 | 145 | is_public: false |
|
146 | 146 | permissions_012: |
|
147 | 147 | action: destroy |
|
148 | 148 | id: 12 |
|
149 |
description: |
|
|
149 | description: button_delete | |
|
150 | 150 | controller: versions |
|
151 | 151 | mail_enabled: false |
|
152 | 152 | mail_option: false |
|
153 | 153 | sort: 322 |
|
154 | 154 | is_public: false |
|
155 | 155 | permissions_001: |
|
156 | 156 | action: show |
|
157 | 157 | id: 1 |
|
158 |
description: |
|
|
158 | description: label_overview | |
|
159 | 159 | controller: projects |
|
160 | 160 | mail_enabled: false |
|
161 | 161 | mail_option: false |
|
162 | 162 | sort: 100 |
|
163 | 163 | is_public: true |
|
164 | 164 | permissions_035: |
|
165 | 165 | action: edit |
|
166 | 166 | id: 35 |
|
167 |
description: |
|
|
167 | description: button_edit | |
|
168 | 168 | controller: documents |
|
169 | 169 | mail_enabled: false |
|
170 | 170 | mail_option: false |
|
171 | 171 | sort: 1221 |
|
172 | 172 | is_public: false |
|
173 | 173 | permissions_024: |
|
174 | 174 | action: add_attachment |
|
175 | 175 | id: 24 |
|
176 | description: Add file | |
|
176 | description: label_attachment_new | |
|
177 | 177 | controller: issues |
|
178 | 178 | mail_enabled: false |
|
179 | 179 | mail_option: false |
|
180 | 180 | sort: 1070 |
|
181 | 181 | is_public: false |
|
182 | 182 | permissions_013: |
|
183 | 183 | action: add_issue_category |
|
184 | 184 | id: 13 |
|
185 | description: New issue category | |
|
185 | description: button_add | |
|
186 | 186 | controller: projects |
|
187 | 187 | mail_enabled: false |
|
188 | 188 | mail_option: false |
|
189 | 189 | sort: 420 |
|
190 | 190 | is_public: false |
|
191 | 191 | permissions_002: |
|
192 | 192 | action: changelog |
|
193 | 193 | id: 2 |
|
194 |
description: |
|
|
194 | description: label_change_log | |
|
195 | 195 | controller: projects |
|
196 | 196 | mail_enabled: false |
|
197 | 197 | mail_option: false |
|
198 | 198 | sort: 105 |
|
199 | 199 | is_public: true |
|
200 | 200 | permissions_036: |
|
201 | 201 | action: destroy |
|
202 | 202 | id: 36 |
|
203 |
description: |
|
|
203 | description: button_delete | |
|
204 | 204 | controller: documents |
|
205 | 205 | mail_enabled: false |
|
206 | 206 | mail_option: false |
|
207 | 207 | sort: 1222 |
|
208 | 208 | is_public: false |
|
209 | 209 | permissions_025: |
|
210 | 210 | action: destroy_attachment |
|
211 | 211 | id: 25 |
|
212 |
description: |
|
|
212 | description: label_attachment_delete | |
|
213 | 213 | controller: issues |
|
214 | 214 | mail_enabled: false |
|
215 | 215 | mail_option: false |
|
216 | 216 | sort: 1075 |
|
217 | 217 | is_public: false |
|
218 | 218 | permissions_014: |
|
219 | 219 | action: edit |
|
220 | 220 | id: 14 |
|
221 |
description: |
|
|
221 | description: button_edit | |
|
222 | 222 | controller: issue_categories |
|
223 | 223 | mail_enabled: false |
|
224 | 224 | mail_option: false |
|
225 | 225 | sort: 421 |
|
226 | 226 | is_public: false |
|
227 | 227 | permissions_003: |
|
228 | 228 | action: issue_report |
|
229 | 229 | id: 3 |
|
230 |
description: |
|
|
230 | description: label_report_plural | |
|
231 | 231 | controller: reports |
|
232 | 232 | mail_enabled: false |
|
233 | 233 | mail_option: false |
|
234 | 234 | sort: 110 |
|
235 | 235 | is_public: true |
|
236 | 236 | permissions_037: |
|
237 | 237 | action: add_attachment |
|
238 | 238 | id: 37 |
|
239 | description: Add file | |
|
239 | description: label_attachment_new | |
|
240 | 240 | controller: documents |
|
241 | 241 | mail_enabled: false |
|
242 | 242 | mail_option: false |
|
243 | 243 | sort: 1223 |
|
244 | 244 | is_public: false |
|
245 | 245 | permissions_026: |
|
246 | 246 | action: list_news |
|
247 | 247 | id: 26 |
|
248 |
description: |
|
|
248 | description: button_list | |
|
249 | 249 | controller: projects |
|
250 | 250 | mail_enabled: false |
|
251 | 251 | mail_option: false |
|
252 | 252 | sort: 1100 |
|
253 | 253 | is_public: true |
|
254 | 254 | permissions_015: |
|
255 | 255 | action: destroy |
|
256 | 256 | id: 15 |
|
257 |
description: |
|
|
257 | description: button_delete | |
|
258 | 258 | controller: issue_categories |
|
259 | 259 | mail_enabled: false |
|
260 | 260 | mail_option: false |
|
261 | 261 | sort: 422 |
|
262 | 262 | is_public: false |
|
263 | 263 | permissions_004: |
|
264 | 264 | action: settings |
|
265 | 265 | id: 4 |
|
266 |
description: |
|
|
266 | description: label_settings | |
|
267 | 267 | controller: projects |
|
268 | 268 | mail_enabled: false |
|
269 | 269 | mail_option: false |
|
270 | 270 | sort: 150 |
|
271 | 271 | is_public: false |
|
272 | 272 | permissions_038: |
|
273 | 273 | action: destroy_attachment |
|
274 | 274 | id: 38 |
|
275 |
description: |
|
|
275 | description: label_attachment_delete | |
|
276 | 276 | controller: documents |
|
277 | 277 | mail_enabled: false |
|
278 | 278 | mail_option: false |
|
279 | 279 | sort: 1224 |
|
280 | 280 | is_public: false |
|
281 | 281 | permissions_027: |
|
282 | 282 | action: show |
|
283 | 283 | id: 27 |
|
284 |
description: |
|
|
284 | description: button_view | |
|
285 | 285 | controller: news |
|
286 | 286 | mail_enabled: false |
|
287 | 287 | mail_option: false |
|
288 | 288 | sort: 1101 |
|
289 | 289 | is_public: true |
|
290 | 290 | permissions_016: |
|
291 | 291 | action: list_issues |
|
292 | 292 | id: 16 |
|
293 |
description: |
|
|
293 | description: button_list | |
|
294 | 294 | controller: projects |
|
295 | 295 | mail_enabled: false |
|
296 | 296 | mail_option: false |
|
297 | 297 | sort: 1000 |
|
298 | 298 | is_public: true |
|
299 | 299 | permissions_005: |
|
300 | 300 | action: edit |
|
301 | 301 | id: 5 |
|
302 |
description: |
|
|
302 | description: button_edit | |
|
303 | 303 | controller: projects |
|
304 | 304 | mail_enabled: false |
|
305 | 305 | mail_option: false |
|
306 | 306 | sort: 151 |
|
307 | 307 | is_public: false |
|
308 | 308 | permissions_039: |
|
309 | 309 | action: list_files |
|
310 | 310 | id: 39 |
|
311 |
description: |
|
|
311 | description: button_list | |
|
312 | 312 | controller: projects |
|
313 | 313 | mail_enabled: false |
|
314 | 314 | mail_option: false |
|
315 | 315 | sort: 1300 |
|
316 | 316 | is_public: true |
|
317 | 317 | permissions_028: |
|
318 | 318 | action: add_news |
|
319 | 319 | id: 28 |
|
320 |
description: |
|
|
320 | description: button_add | |
|
321 | 321 | controller: projects |
|
322 | 322 | mail_enabled: false |
|
323 | 323 | mail_option: false |
|
324 | 324 | sort: 1120 |
|
325 | 325 | is_public: false |
|
326 | 326 | permissions_017: |
|
327 | 327 | action: export_issues_csv |
|
328 | 328 | id: 17 |
|
329 |
description: |
|
|
329 | description: label_export_csv | |
|
330 | 330 | controller: projects |
|
331 | 331 | mail_enabled: false |
|
332 | 332 | mail_option: false |
|
333 | 333 | sort: 1001 |
|
334 | 334 | is_public: true |
|
335 | 335 | permissions_006: |
|
336 | 336 | action: list_members |
|
337 | 337 | id: 6 |
|
338 |
description: |
|
|
338 | description: button_list | |
|
339 | 339 | controller: projects |
|
340 | 340 | mail_enabled: false |
|
341 | 341 | mail_option: false |
|
342 | 342 | sort: 200 |
|
343 | 343 | is_public: true |
|
344 | 344 | permissions_040: |
|
345 | 345 | action: download |
|
346 | 346 | id: 40 |
|
347 |
description: |
|
|
347 | description: button_download | |
|
348 | 348 | controller: versions |
|
349 | 349 | mail_enabled: false |
|
350 | 350 | mail_option: false |
|
351 | 351 | sort: 1301 |
|
352 | 352 | is_public: true |
|
353 | 353 | permissions_029: |
|
354 | 354 | action: edit |
|
355 | 355 | id: 29 |
|
356 |
description: |
|
|
356 | description: button_edit | |
|
357 | 357 | controller: news |
|
358 | 358 | mail_enabled: false |
|
359 | 359 | mail_option: false |
|
360 | 360 | sort: 1121 |
|
361 | 361 | is_public: false |
|
362 | 362 | permissions_018: |
|
363 | 363 | action: show |
|
364 | 364 | id: 18 |
|
365 |
description: |
|
|
365 | description: button_view | |
|
366 | 366 | controller: issues |
|
367 | 367 | mail_enabled: false |
|
368 | 368 | mail_option: false |
|
369 | 369 | sort: 1005 |
|
370 | 370 | is_public: true |
|
371 | 371 | permissions_007: |
|
372 | 372 | action: add_member |
|
373 | 373 | id: 7 |
|
374 |
description: |
|
|
374 | description: button_add | |
|
375 | 375 | controller: projects |
|
376 | 376 | mail_enabled: false |
|
377 | 377 | mail_option: false |
|
378 | 378 | sort: 220 |
|
379 | 379 | is_public: false |
@@ -1,99 +1,95 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | require "#{File.dirname(__FILE__)}/../test_helper" |
|
19 | 19 | |
|
20 | 20 | class AccountTest < ActionController::IntegrationTest |
|
21 | 21 | fixtures :users |
|
22 | 22 | |
|
23 | 23 | # Replace this with your real tests. |
|
24 | 24 | def test_login |
|
25 | 25 | get "account/my_page" |
|
26 | 26 | assert_redirected_to "account/login" |
|
27 | 27 | log_user('jsmith', 'jsmith') |
|
28 | 28 | |
|
29 | 29 | get "account/my_account" |
|
30 | 30 | assert_response :success |
|
31 | 31 | assert_template "account/my_account" |
|
32 | 32 | end |
|
33 | 33 | |
|
34 | 34 | def test_change_password |
|
35 | 35 | log_user('jsmith', 'jsmith') |
|
36 | 36 | get "account/my_account" |
|
37 | 37 | assert_response :success |
|
38 | 38 | assert_template "account/my_account" |
|
39 | 39 | |
|
40 | 40 | post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2" |
|
41 | 41 | assert_response :success |
|
42 | 42 | assert_tag :tag => "div", :attributes => { :class => "errorExplanation" } |
|
43 | 43 | |
|
44 | post "account/change_password", :password => 'admiN', :new_password => "hello", :new_password_confirmation => "hello" | |
|
45 | assert_response :success | |
|
46 | assert_equal 'Wrong password', flash[:notice] | |
|
47 | ||
|
48 | 44 | post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello" |
|
49 | 45 | assert_response :success |
|
50 | 46 | log_user('jsmith', 'hello') |
|
51 | 47 | end |
|
52 | 48 | |
|
53 | 49 | def test_my_account |
|
54 | 50 | log_user('jsmith', 'jsmith') |
|
55 | 51 | get "account/my_account" |
|
56 | 52 | assert_response :success |
|
57 | 53 | assert_template "account/my_account" |
|
58 | 54 | |
|
59 | 55 | post "account/my_account", :user => {:firstname => "Joe", :login => "root", :admin => 1} |
|
60 | 56 | assert_response :success |
|
61 | 57 | assert_template "account/my_account" |
|
62 | 58 | user = User.find(2) |
|
63 | 59 | assert_equal "Joe", user.firstname |
|
64 | 60 | assert_equal "jsmith", user.login |
|
65 | 61 | assert_equal false, user.admin? |
|
66 | 62 | end |
|
67 | 63 | |
|
68 | 64 | def test_my_page |
|
69 | 65 | log_user('jsmith', 'jsmith') |
|
70 | 66 | get "account/my_page" |
|
71 | 67 | assert_response :success |
|
72 | 68 | assert_template "account/my_page" |
|
73 | 69 | end |
|
74 | 70 | |
|
75 | 71 | def test_lost_password |
|
76 | 72 | get "account/lost_password" |
|
77 | 73 | assert_response :success |
|
78 | 74 | assert_template "account/lost_password" |
|
79 | 75 | |
|
80 | 76 | post "account/lost_password", :mail => 'jsmith@somenet.foo' |
|
81 | 77 | assert_redirected_to "account/login" |
|
82 | 78 | |
|
83 | 79 | token = Token.find(:first) |
|
84 | 80 | assert_equal 'recovery', token.action |
|
85 | 81 | assert_equal 'jsmith@somenet.foo', token.user.mail |
|
86 | 82 | assert !token.expired? |
|
87 | 83 | |
|
88 | 84 | get "account/lost_password", :token => token.value |
|
89 | 85 | assert_response :success |
|
90 | 86 | assert_template "account/password_recovery" |
|
91 | 87 | |
|
92 | 88 | post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass' |
|
93 | 89 | assert_redirected_to "account/login" |
|
94 | 90 | assert_equal 'Password was successfully updated.', flash[:notice] |
|
95 | 91 | |
|
96 | 92 | log_user('jsmith', 'newpass') |
|
97 | 93 | assert_equal 0, Token.count |
|
98 | 94 | end |
|
99 | 95 | end |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed, binary diff hidden |
General Comments 0
You need to be logged in to leave comments.
Login now