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