##// END OF EJS Templates
v0.2.0...
Jean-Philippe Lang -
r5:f37089f54784
parent child
Show More
@@ -0,0 +1,19
1 # Settings specified here will take precedence over those in config/environment.rb
2
3 # In the development environment your application's code is reloaded on
4 # every request. This slows down response time but is perfect for development
5 # since you don't have to restart the webserver when you make code changes.
6 config.cache_classes = false
7
8 # Log error messages when you accidentally call methods on nil.
9 config.whiny_nils = true
10
11 # Enable the breakpoint server that script/breakpointer connects to
12 config.breakpoint_server = true
13
14 # Show full error reports and disable caching
15 config.action_controller.consider_all_requests_local = true
16 config.action_controller.perform_caching = false
17
18 # Don't care if the mailer can't send
19 config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,19
1 # Settings specified here will take precedence over those in config/environment.rb
2
3 # In the development environment your application's code is reloaded on
4 # every request. This slows down response time but is perfect for development
5 # since you don't have to restart the webserver when you make code changes.
6 config.cache_classes = false
7
8 # Log error messages when you accidentally call methods on nil.
9 config.whiny_nils = true
10
11 # Enable the breakpoint server that script/breakpointer connects to
12 config.breakpoint_server = true
13
14 # Show full error reports and disable caching
15 config.action_controller.consider_all_requests_local = true
16 config.action_controller.perform_caching = false
17
18 # Don't care if the mailer can't send
19 config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,15
1 # Settings specified here will take precedence over those in config/environment.rb
2
3 # The test environment is used exclusively to run your application's
4 # test suite. You never need to work with it otherwise. Remember that
5 # your test database is "scratch space" for the test suite and is wiped
6 # and recreated between test runs. Don't rely on the data there!
7 config.cache_classes = true
8
9 # Log error messages when you accidentally call methods on nil.
10 config.whiny_nils = true
11
12 # Show full error reports and disable caching
13 config.action_controller.consider_all_requests_local = true
14 config.action_controller.perform_caching = false
15
@@ -0,0 +1,15
1 # Settings specified here will take precedence over those in config/environment.rb
2
3 # The test environment is used exclusively to run your application's
4 # test suite. You never need to work with it otherwise. Remember that
5 # your test database is "scratch space" for the test suite and is wiped
6 # and recreated between test runs. Don't rely on the data there!
7 config.cache_classes = true
8
9 # Log error messages when you accidentally call methods on nil.
10 config.whiny_nils = true
11
12 # Show full error reports and disable caching
13 config.action_controller.consider_all_requests_local = true
14 config.action_controller.perform_caching = false
15
@@ -0,0 +1,15
1 # Settings specified here will take precedence over those in config/environment.rb
2
3 # The test environment is used exclusively to run your application's
4 # test suite. You never need to work with it otherwise. Remember that
5 # your test database is "scratch space" for the test suite and is wiped
6 # and recreated between test runs. Don't rely on the data there!
7 config.cache_classes = true
8
9 # Log error messages when you accidentally call methods on nil.
10 config.whiny_nils = true
11
12 # Show full error reports and disable caching
13 config.action_controller.consider_all_requests_local = true
14 config.action_controller.perform_caching = false
15
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>Chapter&nbsp;1.&nbsp;Administration</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="index.html" title="Documentation redMine"><link rel="prev" href="index.html" title="Documentation redMine"><link rel="next" href="ch01s01.html" title="1.&nbsp;Utilisateurs"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;1.&nbsp;Administration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s01.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e4"></a>Chapter&nbsp;1.&nbsp;Administration</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch01s01.html">1. Utilisateurs</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s01.html#d0e12">1.1. Liste des utilisateurs</a></span></dt><dt><span class="section"><a href="ch01s01.html#d0e26">1.2. Cr&eacute;ation ou modification d'un utilisateur</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s02.html">2. R&ocirc;les et permissions</a></span></dt><dt><span class="section"><a href="ch01s03.html">3. Trackers</a></span></dt><dt><span class="section"><a href="ch01s04.html">4. Champs personnalis&eacute;s</a></span></dt><dt><span class="section"><a href="ch01s05.html">5. Statut des demandes</a></span></dt><dt><span class="section"><a href="ch01s06.html">6. Workflow</a></span></dt><dt><span class="section"><a href="ch01s07.html">7. Listes de valeurs</a></span></dt><dt><span class="section"><a href="ch01s08.html">8. Notifications par mail</a></span></dt><dt><span class="section"><a href="ch01s09.html">9. Informations</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Documentation redMine&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;1.&nbsp;Utilisateurs</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>1.&nbsp;Utilisateurs</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="next" href="ch01s02.html" title="2.&nbsp;R&ocirc;les et permissions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.&nbsp;Utilisateurs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s02.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e7"></a>1.&nbsp;Utilisateurs</h2></div></div></div><p>Ces &eacute;crans vous permettent de g&eacute;rer les utilisateurs de l'application.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e12"></a>1.1.&nbsp;Liste des utilisateurs</h3></div></div></div><p></p><div class="screenshot"><div class="mediaobject"><img src="resources/users_list.png"></div></div><p>Les boutons Lock/Unlock vous permettent de v&eacute;rouiller/d&eacute;v&eacute;rouiller les comptes utilisateurs.</p><p>Un utilisateur dont le compte est v&eacute;rouill&eacute; ne peut plus s'identifier pour acc&eacute;der &agrave; l'application.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e26"></a>1.2.&nbsp;Cr&eacute;ation ou modification d'un utilisateur</h3></div></div></div><p>En mode modification, laissez le champ Password vide pour laisser le mot de passe de l'utilisateur inchang&eacute;.</p><p>Un utilisateur d&eacute;clar&eacute; comme administrateur dispose de toutes les permissions sur l'application et sur tous les projets.</p><div class="itemizedlist"><ul type="disc"><li><p><span class="guilabel">Administrateur</span>: d&eacute;clare l'utilisateur comme administrateur de l'application.</p></li><li><p><span class="guilabel">Notifications par mail</span>: permet d'activer ou non l'envoi automatique de notifications par mail pour cet utilisateur</p></li><li><p><span class="guilabel">V&eacute;rouill&eacute;</span>: d&eacute;sactive le compte de l'utilisateur</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;1.&nbsp;Administration&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;2.&nbsp;R&ocirc;les et permissions</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>2.&nbsp;R&ocirc;les et permissions</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s01.html" title="1.&nbsp;Utilisateurs"><link rel="next" href="ch01s03.html" title="3.&nbsp;Trackers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.&nbsp;R&ocirc;les et permissions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s01.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e49"></a>2.&nbsp;R&ocirc;les et permissions</h2></div></div></div><p>Les r&ocirc;les permettent de d&eacute;finir les permissions des diff&eacute;rents membres d'un projet. Chaque membre d'un projet dispose d'un r&ocirc;le unique au sein d'un projet. Un utilisateur peut avoir diff&eacute;rents r&ocirc;les au sein de diff&eacute;rents projets.</p><p>Sur l'&eacute;cran d'&eacute;dition du r&ocirc;le, cochez les actions que vous souhaitez autoriser pour le r&ocirc;le.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s01.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.&nbsp;Utilisateurs&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;3.&nbsp;Trackers</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>3.&nbsp;Trackers</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s02.html" title="2.&nbsp;R&ocirc;les et permissions"><link rel="next" href="ch01s04.html" title="4.&nbsp;Champs personnalis&eacute;s"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.&nbsp;Trackers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s04.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e56"></a>3.&nbsp;Trackers</h2></div></div></div><p>Les trackers permettent de typer les demandes et de d&eacute;finir des workflows sp&eacute;cifiques pour chacun de ces types.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;R&ocirc;les et permissions&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;Champs personnalis&eacute;s</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>4.&nbsp;Champs personnalis&eacute;s</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s03.html" title="3.&nbsp;Trackers"><link rel="next" href="ch01s05.html" title="5.&nbsp;Statut des demandes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.&nbsp;Champs personnalis&eacute;s</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s05.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e61"></a>4.&nbsp;Champs personnalis&eacute;s</h2></div></div></div><p>Les champs personnalis&eacute;s vous permettent d'ajouter des informations suppl&eacute;mentaires sur les demandes. Un champ personnalis&eacute; peut &ecirc;tre de l'un des types suivants:</p><div class="itemizedlist"><ul type="disc"><li><p><span class="guilabel">Integer</span>: entier positif ou n&eacute;gatif</p></li><li><p><span class="guilabel">String</span>: cha&icirc;ne de caract&egrave;re</p></li><li><p><span class="guilabel">Date</span>: date</p></li><li><p><span class="guilabel">Boolean</span>: bool&eacute;en (case &agrave; cocher)</p></li><li><p><span class="guilabel">List</span>: valeur &agrave; s&eacute;lectionn&eacute;e parmi une liste pr&eacute;d&eacute;finie (liste d&eacute;roulante)</p></li></ul></div><p>Des &eacute;l&eacute;ments de validation peuvent &ecirc;tre d&eacute;finis:</p><div class="itemizedlist"><ul type="disc"><li><p><span class="guilabel">Obligatoire</span>: champ dont la saisie est obligatoire sur les demandes</p></li><li><p><span class="guilabel">Pour tous les projects</span>: champ automatiquement associ&eacute; &agrave; l'ensemble des projets</p></li><li><p><span class="guilabel">Min - max length</span>: longueurs minimales et maximales pour les champs en saisie libre (0 signifie qu'il n'y a pas de restriction)</p></li><li><p><span class="guilabel">Expression r&eacute;guli&egrave;re</span>: expression r&eacute;guli&egrave;re permettant de valider la valeur saisie</p></li><li><p><span class="guilabel">Valeurs possibles</span>: valeurs possibles pour les champs de type "Liste". Les valeurs sont s&eacute;par&eacute;es par le caract&egrave;re |</p></li></ul></div><p>Si l'option <span class="guilabel">Pour tous les projets</span> n'est pas activ&eacute;e, chaque projet pourra choisir d'utiliser ou non le champ pour ses demandes.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.&nbsp;Trackers&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;5.&nbsp;Statut des demandes</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>5.&nbsp;Statut des demandes</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s04.html" title="4.&nbsp;Champs personnalis&eacute;s"><link rel="next" href="ch01s06.html" title="6.&nbsp;Workflow"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.&nbsp;Statut des demandes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s06.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e125"></a>5.&nbsp;Statut des demandes</h2></div></div></div><p>Ces &eacute;crans vous permettent de d&eacute;finir les diff&eacute;rents statuts possibles des demandes.</p><div class="itemizedlist"><ul type="disc"><li><p><span class="guilabel">Demande ferm&eacute;e</span>: indique que le statut correspond &agrave; une demande consid&eacute;r&eacute;e comme ferm&eacute;e</p></li><li><p><span class="guilabel">Statut par d&eacute;faut</span>: statut appliqu&eacute; par d&eacute;faut aux nouvelles demandes (seul un statut peut &ecirc;tre d&eacute;clar&eacute; comme statut par d&eacute;faut)</p></li><li><p><span class="guilabel">Couleur</span>: code couleur HTML (6 caract&egrave;res) repr&eacute;sentant le statut &agrave; l'affichage</p></li></ul></div><p></p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.&nbsp;Champs personnalis&eacute;s&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;6.&nbsp;Workflow</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>6.&nbsp;Workflow</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s05.html" title="5.&nbsp;Statut des demandes"><link rel="next" href="ch01s07.html" title="7.&nbsp;Listes de valeurs"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.&nbsp;Workflow</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s05.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s07.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e147"></a>6.&nbsp;Workflow</h2></div></div></div><p>Le workflow permet de d&eacute;finir les changements que les diff&eacute;rents membres d'un projet sont autoris&eacute;s &agrave; effectuer sur les demandes, en fonction de leur type.</p><p>S&eacute;lectionnez le r&ocirc;le et le tracker pour lesquels vous souhaitez modifier le workflow, puis cliquez sur Edit. L'&eacute;cran vous permet alors de modifier, pour le r&ocirc;le et le tracker choisi, les changements autoris&eacute;s. Les lignes repr&eacute;sentent les statuts initiaux des demandes. Les colonnes repr&eacute;sentent les statuts autoris&eacute;s &agrave; &ecirc;tre appliqu&eacute;s.</p><p>Remarque: pour qu'un r&ocirc;le puisse changer le statut des demandes, la permission doit lui &ecirc;tre explicitement donn&eacute;e ind&eacute;pendemment de la configuration du workflow.</p><p></p><div class="screenshot"><div class="mediaobject"><img src="resources/workflow.png"></div></div><p>Dans l'exemple ci-dessus, les demandes de type Bug au statut Nouveau pourront &ecirc;tre pass&eacute;es au statut Assign&eacute;e ou R&eacute;solue par le r&ocirc;le D&eacute;veloppeur. Celles au statut Assign&eacute;e pourront &ecirc;tre pass&eacute;es au statut R&eacute;solue. Le statut de toutes les autres demandes de type Bug ne pourra pas &ecirc;tre modifi&eacute; par le D&eacute;veloppeur.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s05.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.&nbsp;Statut des demandes&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;7.&nbsp;Listes de valeurs</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>7.&nbsp;Listes de valeurs</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s06.html" title="6.&nbsp;Workflow"><link rel="next" href="ch01s08.html" title="8.&nbsp;Notifications par mail"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7.&nbsp;Listes de valeurs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s08.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e165"></a>7.&nbsp;Listes de valeurs</h2></div></div></div><p>Les listes de valeurs utilis&eacute;es par l'application (exemple: les priorit&eacute;s des demandes) peuvent &ecirc;tre personnalis&eacute;es. Cet &eacute;cran vous permet de d&eacute;finir les valeurs possibles pour chacune des listes suivantes:</p><div class="itemizedlist"><ul type="disc"><li><p>Priorit&eacute;s des demandes</p></li><li><p>Cat&eacute;gories de documents</p></li></ul></div><p></p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.&nbsp;Workflow&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;8.&nbsp;Notifications par mail</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>8.&nbsp;Notifications par mail</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s07.html" title="7.&nbsp;Listes de valeurs"><link rel="next" href="ch01s09.html" title="9.&nbsp;Informations"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.&nbsp;Notifications par mail</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s07.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01s09.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e178"></a>8.&nbsp;Notifications par mail</h2></div></div></div><p>Cet &eacute;cran vous permet de s&eacute;lectionner les actions qui donneront lieu &agrave; une notification par mail aux membres du projet.</p><p>Remarque: l'envoi de mails doit &ecirc;tre activ&eacute; dans la configuration de l'application si souhaitez effectuer des notifications.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s07.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01s09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">7.&nbsp;Listes de valeurs&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;9.&nbsp;Informations</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>9.&nbsp;Informations</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"><link rel="prev" href="ch01s08.html" title="8.&nbsp;Notifications par mail"><link rel="next" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9.&nbsp;Informations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s08.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;1.&nbsp;Administration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e185"></a>9.&nbsp;Informations</h2></div></div></div><p>Affiche des informations relatives &agrave; l'application et &agrave; son environnement.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s08.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8.&nbsp;Notifications par mail&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;2.&nbsp;Projets</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>Chapter&nbsp;2.&nbsp;Projets</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="index.html" title="Documentation redMine"><link rel="prev" href="ch01s09.html" title="9.&nbsp;Informations"><link rel="next" href="ch02s01.html" title="1.&nbsp;Aper&ccedil;u du projet"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;2.&nbsp;Projets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s09.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s01.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e190"></a>Chapter&nbsp;2.&nbsp;Projets</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch02s01.html">1. Aper&ccedil;u du projet</a></span></dt><dt><span class="section"><a href="ch02s02.html">2. Gestion des demandes</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s02.html#d0e204">2.1. Liste des demandes</a></span></dt></dl></dd><dt><span class="section"><a href="ch02s03.html">3. Rapports</a></span></dt><dt><span class="section"><a href="ch02s04.html">4. Historique</a></span></dt><dt><span class="section"><a href="ch02s05.html">5. Annonces</a></span></dt><dt><span class="section"><a href="ch02s06.html">6. Documents</a></span></dt><dt><span class="section"><a href="ch02s07.html">7. Fichiers</a></span></dt><dt><span class="section"><a href="ch02s08.html">8. Configuration du projet</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s08.html#d0e248">8.1. Propri&eacute;t&eacute;s du projet</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e264">8.2. Membres</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e269">8.3. Versions</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e274">8.4. Cat&eacute;gories des demandes</a></span></dt></dl></dd></dl></div><p></p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s09.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.&nbsp;Informations&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;1.&nbsp;Aper&ccedil;u du projet</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>1.&nbsp;Aper&ccedil;u du projet</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="next" href="ch02s02.html" title="2.&nbsp;Gestion des demandes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.&nbsp;Aper&ccedil;u du projet</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e194"></a>1.&nbsp;Aper&ccedil;u du projet</h2></div></div></div><p>L'aper&ccedil;u vous pr&eacute;sente les informations g&eacute;n&eacute;rales relatives au projet, les principaux membres, les derni&egrave;res annonces, ainsi qu'une synth&egrave;se du nombre de demandes ouvertes par tracker.</p><p></p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;2.&nbsp;Projets&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;2.&nbsp;Gestion des demandes</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>2.&nbsp;Gestion des demandes</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s01.html" title="1.&nbsp;Aper&ccedil;u du projet"><link rel="next" href="ch02s03.html" title="3.&nbsp;Rapports"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.&nbsp;Gestion des demandes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s01.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e200"></a>2.&nbsp;Gestion des demandes</h2></div></div></div><p></p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e204"></a>2.1.&nbsp;Liste des demandes</h3></div></div></div><p>Par d&eacute;faut, l'ensemble des demandes ouvertes du projet sont affich&eacute;es. Diff&eacute;rents filtres vous permettent de s&eacute;lectionner les demandes &agrave; afficher. Si le projet comporte des sous-projets, vous avez la possibilit&eacute; d'afficher &eacute;galement les demandes relatives aux sous-projets (non affich&eacute;es par d&eacute;faut).</p><p>Une fois appliqu&eacute;, un filtre reste valable durant toute votre session. Vous pouvez le red&eacute;finir, ou le supprimer en cliquant sur Annuler.</p><p></p><div class="screenshot"><div class="mediaobject"><img src="resources/issues_list.png"></div></div><p></p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s01.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.&nbsp;Aper&ccedil;u du projet&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;3.&nbsp;Rapports</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>3.&nbsp;Rapports</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s02.html" title="2.&nbsp;Gestion des demandes"><link rel="next" href="ch02s04.html" title="4.&nbsp;Historique"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.&nbsp;Rapports</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s04.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e219"></a>3.&nbsp;Rapports</h2></div></div></div><p>Cet &eacute;cran pr&eacute;sente la synth&egrave;se du nombre de demandes par statut et selon diff&eacute;rents crit&egrave;res (tracker, priorit&eacute;, cat&eacute;gorie). Des liens directs permettent d'acc&eacute;der &agrave; la liste d&eacute;taill&eacute;e des demandes pour chaque crit&egrave;re.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;Gestion des demandes&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;Historique</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>4.&nbsp;Historique</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s03.html" title="3.&nbsp;Rapports"><link rel="next" href="ch02s05.html" title="5.&nbsp;Annonces"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.&nbsp;Historique</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s03.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s05.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e224"></a>4.&nbsp;Historique</h2></div></div></div><p>Cette page pr&eacute;sente l'ensemble des demandes r&eacute;solues dans chacune des versions du projet. Certains types de demande peuvent &ecirc;tre exclus de cet affichage.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s03.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.&nbsp;Rapports&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;5.&nbsp;Annonces</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>5.&nbsp;Annonces</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s04.html" title="4.&nbsp;Historique"><link rel="next" href="ch02s06.html" title="6.&nbsp;Documents"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.&nbsp;Annonces</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s04.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s06.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e229"></a>5.&nbsp;Annonces</h2></div></div></div><p>Les nouvelles vous permettent d'informer les utilisateurs sur l'activit&eacute; du projet.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s04.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.&nbsp;Historique&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;6.&nbsp;Documents</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>6.&nbsp;Documents</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s05.html" title="5.&nbsp;Annonces"><link rel="next" href="ch02s07.html" title="7.&nbsp;Fichiers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.&nbsp;Documents</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s07.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e234"></a>6.&nbsp;Documents</h2></div></div></div><p>Les documents sont group&eacute;s par cat&eacute;gories (voir Listes de valeurs). Un document peut contenir plusieurs fichiers (exemple: r&eacute;visions ou versions successives).</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.&nbsp;Annonces&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;7.&nbsp;Fichiers</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>7.&nbsp;Fichiers</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s06.html" title="6.&nbsp;Documents"><link rel="next" href="ch02s08.html" title="8.&nbsp;Configuration du projet"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7.&nbsp;Fichiers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s06.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s08.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e239"></a>7.&nbsp;Fichiers</h2></div></div></div><p>Ce module vous permet de publier les diff&eacute;rents fichiers (sources, binaires, ...) pour chaque version de l'application.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s06.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.&nbsp;Documents&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;8.&nbsp;Configuration du projet</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>8.&nbsp;Configuration du projet</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Projets"><link rel="prev" href="ch02s07.html" title="7.&nbsp;Fichiers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.&nbsp;Configuration du projet</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s07.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Projets</th><td width="20%" align="right">&nbsp;</td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e244"></a>8.&nbsp;Configuration du projet</h2></div></div></div><p></p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e248"></a>8.1.&nbsp;Propri&eacute;t&eacute;s du projet</h3></div></div></div><p></p><div class="itemizedlist"><ul type="disc"><li><p><span class="guilabel">Public</span>: si le projet est public, il sera visible (consultation des demandes, des documents, ...) pour l'ensemble des utilisateurs, y compris ceux qui ne sont pas membres du projet. Si le projet n'est pas public, seuls les membres du projet y ont acc&egrave;s, en fonction de leur r&ocirc;le.</p></li><li><p><span class="guilabel">Champs personnalis&eacute;s</span>: s&eacute;lectionner les champs personnalis&eacute;s que vous souhaitez utiliser au sein du projet. Seul l'administrateur peut ajouter de nouveaux champs personnalis&eacute;s.</p></li></ul></div><p></p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e264"></a>8.2.&nbsp;Membres</h3></div></div></div><p>Cet &eacute;cran vous permet de d&eacute;finir les membres du projet ainsi que leurs r&ocirc;les respectifs. Un utilisateur ne peut avoir qu'un r&ocirc;le au sein d'un projet donn&eacute;. Le r&ocirc;le d'un membre d&eacute;termine les permissions dont il b&eacute;n&eacute;ficie sur le projet.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e269"></a>8.3.&nbsp;Versions</h3></div></div></div><p>Les versions vous permettent de suivre les changements survenus tout au long du projet. A la fermeture d'une demande, vous pouvez par exemple indiquer quelle version la prend en compte. Vous pouvez par ailleurs publier les diff&eacute;rentes versions de l'application (voir Fichiers).</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e274"></a>8.4.&nbsp;Cat&eacute;gories des demandes</h3></div></div></div><p>Les cat&eacute;gories de demande vous permettent de typer les demandes. Les cat&eacute;gories peuvent par exemple correspondre aux diff&eacute;rents modules du projet.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s07.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;</td></tr><tr><td width="40%" align="left" valign="top">7.&nbsp;Fichiers&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html> No newline at end of file
@@ -0,0 +1,55
1 body {
2 background: #FFFFFF;
3 font: 0.8em Verdana,Tahoma,Arial,sans-serif;
4 }
5
6 h1, h2, h3, h4, h5 {
7 color: #800000;
8 font-family: sans-serif;
9 }
10
11 table {
12 font-size: 1em;
13 }
14
15 a{
16 color:#467aa7;
17 font-weight:bold;
18 text-decoration:none;
19 background-color:inherit;
20 }
21
22 a:hover{
23 color: #800000;
24 text-decoration:underline;
25 background-color:inherit;
26 }
27
28 a img{border:none;}
29
30 .screenshot {
31 text-align: center;
32 }
33
34 .guilabel {
35 font-weight: bold;
36 }
37
38 span.term {
39 font-weight: bold;
40 }
41
42 div.sidebar {
43 background: #F0F0F0;
44 border: 1px solid gray;
45 padding: 5px;
46 margin: 20px;
47 }
48
49 pre.programlisting {
50 background: #F0F0F0;
51 border: 1px solid gray;
52 padding: 2px;
53 font-size: 10pt;
54 white-space: pre;
55 }
@@ -0,0 +1,3
1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>Documentation redMine</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Documentation redMine"><link rel="next" href="ch01.html" title="Chapter&nbsp;1.&nbsp;Administration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Documentation redMine</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e1"></a>Documentation redMine</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Administration</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s01.html">1. Utilisateurs</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s01.html#d0e12">1.1. Liste des utilisateurs</a></span></dt><dt><span class="section"><a href="ch01s01.html#d0e26">1.2. Cr&eacute;ation ou modification d'un utilisateur</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s02.html">2. R&ocirc;les et permissions</a></span></dt><dt><span class="section"><a href="ch01s03.html">3. Trackers</a></span></dt><dt><span class="section"><a href="ch01s04.html">4. Champs personnalis&eacute;s</a></span></dt><dt><span class="section"><a href="ch01s05.html">5. Statut des demandes</a></span></dt><dt><span class="section"><a href="ch01s06.html">6. Workflow</a></span></dt><dt><span class="section"><a href="ch01s07.html">7. Listes de valeurs</a></span></dt><dt><span class="section"><a href="ch01s08.html">8. Notifications par mail</a></span></dt><dt><span class="section"><a href="ch01s09.html">9. Informations</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch02.html">2. Projets</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s01.html">1. Aper&ccedil;u du projet</a></span></dt><dt><span class="section"><a href="ch02s02.html">2. Gestion des demandes</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s02.html#d0e204">2.1. Liste des demandes</a></span></dt></dl></dd><dt><span class="section"><a href="ch02s03.html">3. Rapports</a></span></dt><dt><span class="section"><a href="ch02s04.html">4. Historique</a></span></dt><dt><span class="section"><a href="ch02s05.html">5. Annonces</a></span></dt><dt><span class="section"><a href="ch02s06.html">6. Documents</a></span></dt><dt><span class="section"><a href="ch02s07.html">7. Fichiers</a></span></dt><dt><span class="section"><a href="ch02s08.html">8. Configuration du projet</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s08.html#d0e248">8.1. Propri&eacute;t&eacute;s du projet</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e264">8.2. Membres</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e269">8.3. Versions</a></span></dt><dt><span class="section"><a href="ch02s08.html#d0e274">8.4. Cat&eacute;gories des demandes</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;1.&nbsp;Administration</td></tr></table></div></body></html> No newline at end of file
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,76
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 require "#{File.dirname(__FILE__)}/../test_helper"
19
20 class AccountTest < ActionController::IntegrationTest
21 fixtures :users
22
23 # Replace this with your real tests.
24 def test_login
25 get "account/my_page"
26 assert_redirected_to "account/login"
27 log_user('plochon', 'admin')
28
29 get "account/my_account"
30 assert_response :success
31 assert_template "account/my_account"
32 end
33
34 def test_change_password
35 log_user('plochon', 'admin')
36 get "account/my_account"
37 assert_response :success
38 assert_template "account/my_account"
39
40 post "account/change_password", :password => 'admin', :new_password => "hello", :new_password_confirmation => "hello2"
41 assert_response :success
42 assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
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 => 'admin', :new_password => "hello", :new_password_confirmation => "hello"
49 assert_response :success
50 log_user('plochon', 'hello')
51 end
52
53 def test_my_account
54 log_user('plochon', 'admin')
55 get "account/my_account"
56 assert_response :success
57 assert_template "account/my_account"
58
59 post "account/my_account", :user => {:firstname => "Joe", :login => "root", :admin => 1}
60 assert_response :success
61 assert_template "account/my_account"
62 user = User.find(2)
63 assert_equal "Joe", user.firstname
64 assert_equal "plochon", user.login
65 assert_equal false, user.admin?
66
67 log_user('plochon', 'admin')
68 end
69
70 def test_my_page
71 log_user('plochon', 'admin')
72 get "account/my_page"
73 assert_response :success
74 assert_template "account/my_page"
75 end
76 end
@@ -0,0 +1,61
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 require "#{File.dirname(__FILE__)}/../test_helper"
19
20 class AdminTest < ActionController::IntegrationTest
21 fixtures :users
22
23 def test_add_user
24 log_user("admin", "admin")
25 get "/users/add"
26 assert_response :success
27 assert_template "users/add"
28 post "/users/add", :user => { :login => "jsmith", :firstname => "John", :lastname => "Smith", :mail => "jsmith@somenet.foo", :language => "en" }, :password => "jsmith09", :password_confirmation => "jsmith09"
29 assert_redirected_to "users/list"
30
31 user = User.find_by_login("jsmith")
32 assert_kind_of User, user
33 logged_user = User.try_to_login("jsmith", "jsmith09")
34 assert_kind_of User, logged_user
35 assert_equal "John", logged_user.firstname
36
37 post "users/edit", :id => user.id, :user => { :locked => 1 }
38 assert_redirected_to "users/list"
39 locked_user = User.try_to_login("jsmith", "jsmith09")
40 assert_equal nil, locked_user
41 end
42
43 def test_add_project
44 log_user("admin", "admin")
45 get "projects/add"
46 assert_response :success
47 assert_template "projects/add"
48 post "projects/add", :project => { :name => "blog", :descr => "weblog", :is_public => 1}
49 assert_redirected_to "admin/projects"
50 assert_equal 'Project was successfully created.', flash[:notice]
51
52 project = Project.find_by_name("blog")
53 assert_kind_of Project, project
54 assert_equal "weblog", project.descr
55 assert_equal true, project.is_public?
56
57 get "admin/projects"
58 assert_response :success
59 assert_template "admin/projects"
60 end
61 end
@@ -1,83 +1,77
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
20 # prevents login action to be filtered by check_if_login_required application scope filter
21 # prevents login action to be filtered by check_if_login_required application scope filter
21 skip_before_filter :check_if_login_required, :only => :login
22 skip_before_filter :check_if_login_required, :only => :login
22 before_filter :require_login, :except => [:show, :login]
23 before_filter :require_login, :except => [:show, :login]
23
24
24 def show
25 def show
25 @user = User.find(params[:id])
26 @user = User.find(params[:id])
26 end
27 end
27
28
28 # Login request and validation
29 # Login request and validation
29 def login
30 def login
30 if request.get?
31 if request.get?
31 session[:user] = nil
32 session[:user] = nil
32 @user = User.new
33 else
33 else
34 @user = User.new(params[:user])
34 logged_in_user = User.try_to_login(params[:login], params[:password])
35 logged_in_user = @user.try_to_login
36 if logged_in_user
35 if logged_in_user
37 session[:user] = logged_in_user
36 session[:user] = logged_in_user
38 redirect_back_or_default :controller => 'account', :action => 'my_page'
37 redirect_back_or_default :controller => 'account', :action => 'my_page'
39 else
38 else
40 flash[:notice] = _('Invalid user/password')
39 flash[:notice] = _('Invalid user/password')
41 end
40 end
42 end
41 end
43 end
42 end
44
43
45 # Log out current user and redirect to welcome page
44 # Log out current user and redirect to welcome page
46 def logout
45 def logout
47 session[:user] = nil
46 session[:user] = nil
48 redirect_to(:controller => '')
47 redirect_to(:controller => '')
49 end
48 end
50
49
51 def my_page
50 def my_page
52 @user = session[:user]
51 @user = session[:user]
53 @reported_issues = Issue.find(:all, :conditions => ["author_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
52 @reported_issues = Issue.find(:all, :conditions => ["author_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
54 @assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
53 @assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=?", @user.id], :limit => 10, :include => [ :status, :project, :tracker ], :order => 'issues.updated_on DESC')
55 end
54 end
56
55
57 # Edit current user's account
56 # Edit current user's account
58 def my_account
57 def my_account
59 @user = User.find(session[:user].id)
58 @user = User.find(session[:user].id)
60 if request.post? and @user.update_attributes(@params[:user])
59 if request.post? and @user.update_attributes(@params[:user])
61 flash[:notice] = 'Account was successfully updated.'
60 flash[:notice] = 'Account was successfully updated.'
62 session[:user] = @user
61 session[:user] = @user
63 set_localization
62 set_localization
64 end
63 end
65 end
64 end
66
65
67 # Change current user's password
66 # Change current user's password
68 def change_password
67 def change_password
69 @user = User.find(session[:user].id)
68 @user = User.find(session[:user].id)
70 if @user.check_password?(@params[:old_password])
69 if @user.check_password?(@params[:password])
71 if @params[:new_password] == @params[:new_password_confirmation]
70 @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
72 if @user.change_password(@params[:old_password], @params[:new_password])
71 flash[:notice] = 'Password was successfully updated.' if @user.save
73 flash[:notice] = 'Password was successfully updated.'
74 end
75 else
76 flash[:notice] = 'Password confirmation doesn\'t match!'
77 end
78 else
72 else
79 flash[:notice] = 'Wrong password'
73 flash[:notice] = 'Wrong password'
80 end
74 end
81 render :action => 'my_account'
75 render :action => 'my_account'
82 end
76 end
83 end
77 end
@@ -1,49 +1,54
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 AdminController < ApplicationController
18 class AdminController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :require_admin
20 before_filter :require_admin
21
21
22 helper :sort
22 helper :sort
23 include SortHelper
23 include SortHelper
24
24
25 def index
25 def index
26 end
26 end
27
27
28 def projects
28 def projects
29 sort_init 'projects.name', 'asc'
29 sort_init 'name', 'asc'
30 sort_update
30 sort_update
31 @project_pages, @projects = paginate :projects, :per_page => 15, :order => sort_clause
31 @project_count = Project.count
32 @project_pages = Paginator.new self, @project_count,
33 15,
34 @params['page']
35 @projects = Project.find :all, :order => sort_clause,
36 :limit => @project_pages.items_per_page,
37 :offset => @project_pages.current.offset
32 end
38 end
33
39
34 def mail_options
40 def mail_options
35 @actions = Permission.find(:all, :conditions => ["mail_option=?", true]) || []
41 @actions = Permission.find(:all, :conditions => ["mail_option=?", true]) || []
36 if request.post?
42 if request.post?
37 @actions.each { |a|
43 @actions.each { |a|
38 a.mail_enabled = params[:action_ids].include? a.id.to_s
44 a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s
39 a.save
45 a.save
40 }
46 }
41 flash[:notice] = "Mail options were successfully updated."
47 flash[:notice] = "Mail options were successfully updated."
42 end
48 end
43 end
49 end
44
50
45 def info
51 def info
46 @adapter_name = ActiveRecord::Base.connection.adapter_name
52 @adapter_name = ActiveRecord::Base.connection.adapter_name
47 end
53 end
48
49 end
54 end
@@ -1,86 +1,96
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 # check if login is globally required to access the application
21 # check if login is globally required to access the application
22 def check_if_login_required
22 def check_if_login_required
23 require_login if RDM_LOGIN_REQUIRED
23 require_login if RDM_LOGIN_REQUIRED
24 end
24 end
25
25
26 def set_localization
26 def set_localization
27 Localization.lang = session[:user].nil? ? RDM_DEFAULT_LANG : (session[:user].language || RDM_DEFAULT_LANG)
27 Localization.lang = begin
28 if session[:user]
29 session[:user].language
30 elsif request.env['HTTP_ACCEPT_LANGUAGE']
31 accept_lang = HTTPUtils.parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.split('-').first
32 if Localization.langs.collect{ |l| l[1] }.include? accept_lang
33 accept_lang
34 end
35 end
36 rescue
37 nil
38 end || RDM_DEFAULT_LANG
28 end
39 end
29
40
30 def require_login
41 def require_login
31 unless session[:user]
42 unless session[:user]
32 store_location
43 store_location
33 redirect_to(:controller => "account", :action => "login")
44 redirect_to(:controller => "account", :action => "login")
34 end
45 end
35 end
46 end
36
47
37 def require_admin
48 def require_admin
38 if session[:user].nil?
49 if session[:user].nil?
39 store_location
50 store_location
40 redirect_to(:controller => "account", :action => "login")
51 redirect_to(:controller => "account", :action => "login")
41 else
52 else
42 unless session[:user].admin?
53 unless session[:user].admin?
43 flash[:notice] = "Acces not allowed"
54 flash[:notice] = "Acces not allowed"
44 redirect_to(:controller => "projects", :action => "list")
55 redirect_to(:controller => "projects", :action => "list")
45 end
56 end
46 end
57 end
47 end
58 end
48
59
49 # authorizes the user for the requested action.
60 # authorizes the user for the requested action.
50 def authorize
61 def authorize
51 # check if action is allowed on public projects
62 # check if action is allowed on public projects
52 if @project.public? and Permission.allowed_to_public "%s/%s" % [ @params[:controller], @params[:action] ]
63 if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ @params[:controller], @params[:action] ]
53 return true
64 return true
54 end
65 end
55 # if user is not logged in, he is redirect to login form
66 # if user not logged in, redirect to login form
56 unless session[:user]
67 unless session[:user]
57 store_location
68 store_location
58 redirect_to(:controller => "account", :action => "login")
69 redirect_to(:controller => "account", :action => "login")
59 return false
70 return false
60 end
71 end
61 # check if user is authorized
72 # if logged in, check if authorized
62 if session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], session[:user].role_for_project(@project.id) )
73 if session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], session[:user].role_for_project(@project.id) )
63 return true
74 return true
64 end
75 end
65 flash[:notice] = "Acces denied"
76 flash[:notice] = "Acces denied"
66 redirect_to(:controller => "")
77 redirect_to(:controller => "")
67 return false
78 false
68 end
79 end
69
80
70 # store current uri in the session.
81 # store current uri in session.
71 # we can return to this location by calling redirect_back_or_default
82 # return to this location by calling redirect_back_or_default
72 def store_location
83 def store_location
73 session[:return_to] = @request.request_uri
84 session[:return_to] = @request.request_uri
74 end
85 end
75
86
76 # move to the last store_location call or to the passed default one
87 # move to the last store_location call or to the passed default one
77 def redirect_back_or_default(default)
88 def redirect_back_or_default(default)
78 if session[:return_to].nil?
89 if session[:return_to].nil?
79 redirect_to default
90 redirect_to default
80 else
91 else
81 redirect_to_url session[:return_to]
92 redirect_to_url session[:return_to]
82 session[:return_to] = nil
93 session[:return_to] = nil
83 end
94 end
84 end
95 end
85
86 end No newline at end of file
96 end
@@ -1,43 +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 def index
24 def index
24 if @params[:ctrl] and @help_config[@params[:ctrl]]
25 # select help page to display
25 if @params[:page] and @help_config[@params[:ctrl]][@params[:page]]
26 if @params[:ctrl] and @help_config['pages'][@params[:ctrl]]
26 template = @help_config[@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]]
27 else
29 else
28 template = @help_config[@params[:ctrl]]['index']
30 template = @help_config['pages'][@params[:ctrl]]['index']
29 end
31 end
30 end
32 end
33 # choose language according to available help translations
34 lang = (@help_config['langs'].include? Localization.lang) ? Localization.lang : @help_config['langs'].first
31
35
32 if template
36 if template
33 redirect_to "/manual/#{template}"
37 redirect_to "/manual/#{lang}/#{template}"
34 else
38 else
35 redirect_to "/manual/"
39 redirect_to "/manual/#{lang}/"
36 end
40 end
37 end
41 end
38
42
39 private
43 private
40 def load_help_config
44 def load_help_config
41 @help_config = YAML::load(File.open("#{RAILS_ROOT}/config/help.yml"))
45 @help_config = YAML::load(File.open("#{RAILS_ROOT}/config/help.yml"))
42 end
46 end
43 end
47 end
@@ -1,278 +1,282
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 'projects.name', 'asc'
37 sort_init 'name', 'asc'
38 sort_update
38 sort_update
39 @project_count = Project.count(["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 => ["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 = CustomField::find_all
51 @custom_fields = CustomField::find_all
52 @root_projects = Project::find(:all, :conditions => "parent_id is null")
52 @project = Project.new(params[:project])
53 @project = Project.new(params[:project])
53 if request.post?
54 if request.post?
54 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
55 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
55 if @project.save
56 if @project.save
56 flash[:notice] = 'Project was successfully created.'
57 flash[:notice] = 'Project was successfully created.'
57 redirect_to :controller => 'admin', :action => 'projects'
58 redirect_to :controller => 'admin', :action => 'projects'
58 end
59 end
59 end
60 end
60 end
61 end
61
62
62 # Show @project
63 # Show @project
63 def show
64 def show
64 @members = @project.members.find(:all, :include => [:user, :role])
65 @members = @project.members.find(:all, :include => [:user, :role])
66 @subprojects = @project.children if @project.children_count > 0
67 @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
65 end
68 end
66
69
67 def settings
70 def settings
71 @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id])
68 @custom_fields = CustomField::find_all
72 @custom_fields = CustomField::find_all
69 @issue_category ||= IssueCategory.new
73 @issue_category ||= IssueCategory.new
70 @member ||= @project.members.new
74 @member ||= @project.members.new
71 @roles = Role.find_all
75 @roles = Role.find_all
72 @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user }
76 @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user }
73 end
77 end
74
78
75 # Edit @project
79 # Edit @project
76 def edit
80 def edit
77 if request.post?
81 if request.post?
78 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
82 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
79 if @project.update_attributes(params[:project])
83 if @project.update_attributes(params[:project])
80 flash[:notice] = 'Project was successfully updated.'
84 flash[:notice] = 'Project was successfully updated.'
81 redirect_to :action => 'settings', :id => @project
85 redirect_to :action => 'settings', :id => @project
82 else
86 else
83 settings
87 settings
84 render :action => 'settings'
88 render :action => 'settings'
85 end
89 end
86 end
90 end
87 end
91 end
88
92
89 # Delete @project
93 # Delete @project
90 def destroy
94 def destroy
91 if request.post? and params[:confirm]
95 if request.post? and params[:confirm]
92 @project.destroy
96 @project.destroy
93 redirect_to :controller => 'admin', :action => 'projects'
97 redirect_to :controller => 'admin', :action => 'projects'
94 end
98 end
95 end
99 end
96
100
97 # Add a new issue category to @project
101 # Add a new issue category to @project
98 def add_issue_category
102 def add_issue_category
99 if request.post?
103 if request.post?
100 @issue_category = @project.issue_categories.build(params[:issue_category])
104 @issue_category = @project.issue_categories.build(params[:issue_category])
101 if @issue_category.save
105 if @issue_category.save
102 redirect_to :action => 'settings', :id => @project
106 redirect_to :action => 'settings', :id => @project
103 else
107 else
104 settings
108 settings
105 render :action => 'settings'
109 render :action => 'settings'
106 end
110 end
107 end
111 end
108 end
112 end
109
113
110 # Add a new version to @project
114 # Add a new version to @project
111 def add_version
115 def add_version
112 @version = @project.versions.build(params[:version])
116 @version = @project.versions.build(params[:version])
113 if request.post? and @version.save
117 if request.post? and @version.save
114 redirect_to :action => 'settings', :id => @project
118 redirect_to :action => 'settings', :id => @project
115 end
119 end
116 end
120 end
117
121
118 # Add a new member to @project
122 # Add a new member to @project
119 def add_member
123 def add_member
120 @member = @project.members.build(params[:member])
124 @member = @project.members.build(params[:member])
121 if request.post?
125 if request.post?
122 if @member.save
126 if @member.save
123 flash[:notice] = 'Member was successfully added.'
127 flash[:notice] = 'Member was successfully added.'
124 redirect_to :action => 'settings', :id => @project
128 redirect_to :action => 'settings', :id => @project
125 else
129 else
126 settings
130 settings
127 render :action => 'settings'
131 render :action => 'settings'
128 end
132 end
129 end
133 end
130 end
134 end
131
135
132 # Show members list of @project
136 # Show members list of @project
133 def list_members
137 def list_members
134 @members = @project.members
138 @members = @project.members
135 end
139 end
136
140
137 # Add a new document to @project
141 # Add a new document to @project
138 def add_document
142 def add_document
139 @categories = Enumeration::get_values('DCAT')
143 @categories = Enumeration::get_values('DCAT')
140 @document = @project.documents.build(params[:document])
144 @document = @project.documents.build(params[:document])
141 if request.post?
145 if request.post?
142 # Save the attachment
146 # Save the attachment
143 if params[:attachment][:file].size > 0
147 if params[:attachment][:file].size > 0
144 @attachment = @document.attachments.build(params[:attachment])
148 @attachment = @document.attachments.build(params[:attachment])
145 @attachment.author_id = session[:user].id unless session[:user].nil?
149 @attachment.author_id = session[:user].id unless session[:user].nil?
146 end
150 end
147 if @document.save
151 if @document.save
148 redirect_to :action => 'list_documents', :id => @project
152 redirect_to :action => 'list_documents', :id => @project
149 end
153 end
150 end
154 end
151 end
155 end
152
156
153 # Show documents list of @project
157 # Show documents list of @project
154 def list_documents
158 def list_documents
155 @documents = @project.documents
159 @documents = @project.documents
156 end
160 end
157
161
158 # Add a new issue to @project
162 # Add a new issue to @project
159 def add_issue
163 def add_issue
160 @trackers = Tracker.find(:all)
164 @trackers = Tracker.find(:all)
161 @priorities = Enumeration::get_values('IPRI')
165 @priorities = Enumeration::get_values('IPRI')
162 if request.get?
166 if request.get?
163 @issue = @project.issues.build
167 @issue = @project.issues.build
164 @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x) }
168 @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x) }
165 else
169 else
166 # Create the issue and set the author
170 # Create the issue and set the author
167 @issue = @project.issues.build(params[:issue])
171 @issue = @project.issues.build(params[:issue])
168 @issue.author = session[:user] unless session[:user].nil?
172 @issue.author = session[:user] unless session[:user].nil?
169 # Create the document if a file was sent
173 # Create the document if a file was sent
170 if params[:attachment][:file].size > 0
174 if params[:attachment][:file].size > 0
171 @attachment = @issue.attachments.build(params[:attachment])
175 @attachment = @issue.attachments.build(params[:attachment])
172 @attachment.author_id = session[:user].id unless session[:user].nil?
176 @attachment.author_id = session[:user].id unless session[:user].nil?
173 end
177 end
174 @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x, :value => params["custom_fields"][x.id.to_s]) }
178 @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x, :value => params["custom_fields"][x.id.to_s]) }
175 @issue.custom_values = @custom_values
179 @issue.custom_values = @custom_values
176 if @issue.save
180 if @issue.save
177 flash[:notice] = "Issue was successfully added."
181 flash[:notice] = "Issue was successfully added."
178 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
182 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
179 redirect_to :action => 'list_issues', :id => @project
183 redirect_to :action => 'list_issues', :id => @project
180 end
184 end
181 end
185 end
182 end
186 end
183
187
184 # Show issues list of @project
188 # Show filtered/sorted issues list of @project
185 def list_issues
189 def list_issues
186 sort_init 'issues.id', 'desc'
190 sort_init 'issues.id', 'desc'
187 sort_update
191 sort_update
188
192
189 search_filter_init_list_issues
193 search_filter_init_list_issues
190 search_filter_update if params[:set_filter] or request.post?
194 search_filter_update if params[:set_filter] or request.post?
191
195
192 @issue_count = Issue.count(:include => :status, :conditions => search_filter_clause)
196 @issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause)
193 @issue_pages = Paginator.new self, @issue_count, 15, @params['page']
197 @issue_pages = Paginator.new self, @issue_count, 15, @params['page']
194 @issues = Issue.find :all, :order => sort_clause,
198 @issues = Issue.find :all, :order => sort_clause,
195 :include => [ :author, :status, :tracker ],
199 :include => [ :author, :status, :tracker, :project ],
196 :conditions => search_filter_clause,
200 :conditions => search_filter_clause,
197 :limit => @issue_pages.items_per_page,
201 :limit => @issue_pages.items_per_page,
198 :offset => @issue_pages.current.offset
202 :offset => @issue_pages.current.offset
199 end
203 end
200
204
201 # Export filtered/sorted issues list to CSV
205 # Export filtered/sorted issues list to CSV
202 def export_issues_csv
206 def export_issues_csv
203 sort_init 'issues.id', 'desc'
207 sort_init 'issues.id', 'desc'
204 sort_update
208 sort_update
205
209
206 search_filter_init_list_issues
210 search_filter_init_list_issues
207
211
208 @issues = Issue.find :all, :order => sort_clause,
212 @issues = Issue.find :all, :order => sort_clause,
209 :include => [ :author, :status, :tracker ],
213 :include => [ :author, :status, :tracker, :project ],
210 :conditions => search_filter_clause
214 :conditions => search_filter_clause
211
215
212 export = StringIO.new
216 export = StringIO.new
213 CSV::Writer.generate(export, ',') do |csv|
217 CSV::Writer.generate(export, ',') do |csv|
214 csv << %w(Id Status Tracker Subject Author Created Updated)
218 csv << %w(Id Status Tracker Subject Author Created Updated)
215 @issues.each do |issue|
219 @issues.each do |issue|
216 csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, _('(time)', issue.created_on), _('(time)', issue.updated_on)]
220 csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, _('(time)', issue.created_on), _('(time)', issue.updated_on)]
217 end
221 end
218 end
222 end
219 export.rewind
223 export.rewind
220 send_data(export.read,
224 send_data(export.read,
221 :type => 'text/csv; charset=utf-8; header=present',
225 :type => 'text/csv; charset=utf-8; header=present',
222 :filename => 'export.csv')
226 :filename => 'export.csv')
223 end
227 end
224
228
225 # Add a news to @project
229 # Add a news to @project
226 def add_news
230 def add_news
227 @news = @project.news.build(params[:news])
231 @news = @project.news.build(params[:news])
228 if request.post?
232 if request.post?
229 @news.author = session[:user] unless session[:user].nil?
233 @news.author = session[:user] unless session[:user].nil?
230 if @news.save
234 if @news.save
231 redirect_to :action => 'list_news', :id => @project
235 redirect_to :action => 'list_news', :id => @project
232 end
236 end
233 end
237 end
234 end
238 end
235
239
236 # Show news list of @project
240 # Show news list of @project
237 def list_news
241 def list_news
238 @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"
242 @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"
239 end
243 end
240
244
241 def add_file
245 def add_file
242 if request.post?
246 if request.post?
243 # Save the attachment
247 # Save the attachment
244 if params[:attachment][:file].size > 0
248 if params[:attachment][:file].size > 0
245 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
249 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
246 @attachment.author_id = session[:user].id unless session[:user].nil?
250 @attachment.author_id = session[:user].id unless session[:user].nil?
247 if @attachment.save
251 if @attachment.save
248 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
252 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
249 end
253 end
250 end
254 end
251 end
255 end
252 @versions = @project.versions
256 @versions = @project.versions
253 end
257 end
254
258
255 def list_files
259 def list_files
256 @versions = @project.versions
260 @versions = @project.versions
257 end
261 end
258
262
259 # Show changelog of @project
263 # Show changelog of @project
260 def changelog
264 def changelog
261 @fixed_issues = @project.issues.find(:all,
265 @fixed_issues = @project.issues.find(:all,
262 :include => [ :fixed_version, :status, :tracker ],
266 :include => [ :fixed_version, :status, :tracker ],
263 :conditions => [ "issue_statuses.is_closed=? and trackers.is_in_chlog=? and issues.fixed_version_id is not null", true, true]
267 :conditions => [ "issue_statuses.is_closed=? and trackers.is_in_chlog=? and issues.fixed_version_id is not null", true, true]
264 )
268 )
265 end
269 end
266
270
267 private
271 private
268 # Find project of id params[:id]
272 # Find project of id params[:id]
269 # if not found, redirect to project list
273 # if not found, redirect to project list
270 # used as a before_filter
274 # used as a before_filter
271 def find_project
275 def find_project
272 @project = Project.find(params[:id])
276 @project = Project.find(params[:id])
273 rescue
277 rescue
274 flash[:notice] = 'Project not found.'
278 flash[:notice] = 'Project not found.'
275 redirect_to :action => 'list'
279 redirect_to :action => 'list'
276 end
280 end
277
281
278 end
282 end
@@ -1,84 +1,84
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, :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, :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 @roles = Role.find_all
66 @trackers = Tracker.find_all
67 @statuses = IssueStatus.find_all
68
65
69 @role = Role.find_by_id(params[:role_id])
66 @role = Role.find_by_id(params[:role_id])
70 @tracker = Tracker.find_by_id(params[:tracker_id])
67 @tracker = Tracker.find_by_id(params[:tracker_id])
71
68
72 if request.post?
69 if request.post?
73 Workflow.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
70 Workflow.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
74 (params[:issue_status] || []).each { |old, news|
71 (params[:issue_status] || []).each { |old, news|
75 news.each { |new|
72 news.each { |new|
76 @role.workflows.build(:tracker_id => @tracker.id, :old_status_id => old, :new_status_id => new)
73 @role.workflows.build(:tracker_id => @tracker.id, :old_status_id => old, :new_status_id => new)
77 }
74 }
78 }
75 }
79 if @role.save
76 if @role.save
80 flash[:notice] = 'Workflow was successfully updated.'
77 flash[:notice] = 'Workflow was successfully updated.'
81 end
78 end
82 end
79 end
80 @roles = Role.find_all
81 @trackers = Tracker.find_all
82 @statuses = IssueStatus.find(:all, :include => :workflows)
83 end
83 end
84 end
84 end
@@ -1,73 +1,77
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 UsersController < ApplicationController
18 class UsersController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :require_admin
20 before_filter :require_admin
21
21
22 helper :sort
22 helper :sort
23 include SortHelper
23 include SortHelper
24
24
25 def index
25 def index
26 list
26 list
27 render :action => 'list'
27 render :action => 'list'
28 end
28 end
29
29
30 def list
30 def list
31 sort_init 'users.login', 'asc'
31 sort_init 'login', 'asc'
32 sort_update
32 sort_update
33 @user_count = User.count
33 @user_count = User.count
34 @user_pages = Paginator.new self, @user_count,
34 @user_pages = Paginator.new self, @user_count,
35 15,
35 15,
36 @params['page']
36 @params['page']
37 @users = User.find :all, :order => sort_clause,
37 @users = User.find :all,:order => sort_clause,
38 :limit => @user_pages.items_per_page,
38 :limit => @user_pages.items_per_page,
39 :offset => @user_pages.current.offset
39 :offset => @user_pages.current.offset
40 end
40 end
41
41
42 def add
42 def add
43 if request.get?
43 if request.get?
44 @user = User.new
44 @user = User.new
45 else
45 else
46 @user = User.new(params[:user])
46 @user = User.new(params[:user])
47 @user.admin = params[:user][:admin]
47 @user.admin = params[:user][:admin] || false
48 @user.login = params[:user][:login]
49 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
48 if @user.save
50 if @user.save
49 flash[:notice] = 'User was successfully created.'
51 flash[:notice] = 'User was successfully created.'
50 redirect_to :action => 'list'
52 redirect_to :action => 'list'
51 end
53 end
52 end
54 end
53 end
55 end
54
56
55 def edit
57 def edit
56 @user = User.find(params[:id])
58 @user = User.find(params[:id])
57 if request.post?
59 if request.post?
58 @user.admin = params[:user][:admin] if params[:user][:admin]
60 @user.admin = params[:user][:admin] if params[:user][:admin]
61 @user.login = params[:user][:login] if params[:user][:login]
62 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation] unless params[:password].nil? or params[:password].empty?
59 if @user.update_attributes(params[:user])
63 if @user.update_attributes(params[:user])
60 flash[:notice] = 'User was successfully updated.'
64 flash[:notice] = 'User was successfully updated.'
61 redirect_to :action => 'list'
65 redirect_to :action => 'list'
62 end
66 end
63 end
67 end
64 end
68 end
65
69
66 def destroy
70 def destroy
67 User.find(params[:id]).destroy
71 User.find(params[:id]).destroy
68 redirect_to :action => 'list'
72 redirect_to :action => 'list'
69 rescue
73 rescue
70 flash[:notice] = "Unable to delete user"
74 flash[:notice] = "Unable to delete user"
71 redirect_to :action => 'list'
75 redirect_to :action => 'list'
72 end
76 end
73 end
77 end
@@ -1,53 +1,56
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 VersionsController < ApplicationController
18 class VersionsController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 def edit
22 def edit
23 if request.post? and @version.update_attributes(params[:version])
23 if request.post? and @version.update_attributes(params[:version])
24 flash[:notice] = 'Version was successfully updated.'
24 flash[:notice] = 'Version was successfully updated.'
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
26 end
26 end
27 end
27 end
28
28
29 def destroy
29 def destroy
30 @version.destroy
30 @version.destroy
31 redirect_to :controller => 'projects', :action => 'settings', :id => @project
31 redirect_to :controller => 'projects', :action => 'settings', :id => @project
32 rescue
32 rescue
33 flash[:notice] = "Unable to delete version"
33 flash[:notice] = "Unable to delete version"
34 redirect_to :controller => 'projects', :action => 'settings', :id => @project
34 redirect_to :controller => 'projects', :action => 'settings', :id => @project
35 end
35 end
36
36
37 def download
37 def download
38 @attachment = @version.attachments.find(params[:attachment_id])
38 @attachment = @version.attachments.find(params[:attachment_id])
39 @attachment.increment_download
39 @attachment.increment_download
40 send_file @attachment.diskfile, :filename => @attachment.filename
40 send_file @attachment.diskfile, :filename => @attachment.filename
41 rescue
42 flash[:notice]="Requested file doesn't exist or has been deleted."
43 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
41 end
44 end
42
45
43 def destroy_file
46 def destroy_file
44 @version.attachments.find(params[:attachment_id]).destroy
47 @version.attachments.find(params[:attachment_id]).destroy
45 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
48 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
46 end
49 end
47
50
48 private
51 private
49 def find_project
52 def find_project
50 @version = Version.find(params[:id])
53 @version = Version.find(params[:id])
51 @project = @version.project
54 @project = @version.project
52 end
55 end
53 end
56 end
@@ -1,65 +1,65
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 def loggedin?
20 def loggedin?
21 session[:user]
21 session[:user]
22 end
22 end
23
23
24 def admin_loggedin?
24 def admin_loggedin?
25 session[:user] && session[:user].admin
25 session[:user] && session[:user].admin
26 end
26 end
27
27
28 def authorize_for(controller, action)
28 def authorize_for(controller, action)
29 # check if action is allowed on public projects
29 # check if action is allowed on public projects
30 if @project.public? and Permission.allowed_to_public "%s/%s" % [ controller, action ]
30 if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ controller, action ]
31 return true
31 return true
32 end
32 end
33 # check if user is authorized
33 # check if user is authorized
34 if session[:user] and (session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ controller, action ], session[:user].role_for_project(@project.id) ) )
34 if session[:user] and (session[:user].admin? or Permission.allowed_to_role( "%s/%s" % [ controller, action ], session[:user].role_for_project(@project.id) ) )
35 return true
35 return true
36 end
36 end
37 return false
37 return false
38 end
38 end
39
39
40 def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference)
40 def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference)
41 link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action])
41 link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action])
42 end
42 end
43
43
44 # Display a link to user's account page
44 # Display a link to user's account page
45 def link_to_user(user)
45 def link_to_user(user)
46 link_to user.display_name, :controller => 'account', :action => 'show', :id => user
46 link_to user.display_name, :controller => 'account', :action => 'show', :id => user
47 end
47 end
48
48
49 def format_date(date)
49 def format_date(date)
50 _('(date)', date) if date
50 _('(date)', date) if date
51 end
51 end
52
52
53 def format_time(time)
53 def format_time(time)
54 _('(time)', time) if time
54 _('(time)', time) if time
55 end
55 end
56
56
57 def pagination_links_full(paginator, options={}, html_options={})
57 def pagination_links_full(paginator, options={}, html_options={})
58 html =''
58 html =''
59 html << link_to(('&#171; ' + _('Previous') ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous
59 html << link_to(('&#171; ' + _('Previous') ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous
60 html << (pagination_links(paginator, options, html_options) || '')
60 html << (pagination_links(paginator, options, html_options) || '')
61 html << ' ' + link_to((_('Next') + ' &#187;'), { :page => paginator.current.next }) if paginator.current.next
61 html << ' ' + link_to((_('Next') + ' &#187;'), { :page => paginator.current.next }) if paginator.current.next
62 html
62 html
63 end
63 end
64
64
65 end
65 end
@@ -1,85 +1,90
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 session[:search_filter] ||= {}
21 @search_filter ||= {}
22 session[:search_filter][name] ||= {}
22 @search_filter[name] ||= {}
23 unless session[:search_filter][name][:options] and session[:search_filter][name][:conditions]
23 @search_filter[name][:options] = []
24 session[:search_filter][name][:options] = []
24 @search_filter[name][:conditions] = {}
25 session[:search_filter][name][:conditions] = {}
26 yield.each { |c|
25 yield.each { |c|
27 session[:search_filter][name][:options] << [c[0], c[1].to_s]
26 @search_filter[name][:options] << [c[0], c[1].to_s]
28 session[:search_filter][name][:conditions].store(c[1].to_s, c[2])
27 @search_filter[name][:conditions].store(c[1].to_s, c[2])
29 }
28 }
30 end
29 end
31 end
32
30
33 def search_filter_update
31 def search_filter_update
34 session[:search_filter].each_key {|field| session[:search_filter][field][:value] = params[field] }
32 @search_filter.each_key {|field| session[:search_filter][field] = params[field] }
35 end
33 end
36
34
37 def search_filter_clause
35 def search_filter_clause
38 clause = ["issues.project_id=?", @project.id]
36 clause = ["1=1"]
39 session[:search_filter].each { |k, v|
37 @search_filter.each { |k, v|
40 v[:value] ||= v[:options][0][1]
38 filter_value = session[:search_filter][k] || v[:options][0][1]
41 if (!v[:conditions][v[:value]][0].empty?)
39 if v[:conditions][filter_value]
42 clause[0] = clause[0] + " AND " + v[:conditions][v[:value]][0]
40 clause[0] = clause[0] + " AND " + v[:conditions][filter_value].first
43 clause << v[:conditions][v[:value]][1] if !v[:conditions][v[:value]][1].nil?
41 clause += v[:conditions][filter_value][1..-1]
44 end
42 end
45 }
43 }
46 clause
44 clause
47 end
45 end
48
46
49 def search_filter_tag(criteria)
47 def search_filter_tag(criteria, options = {})
48 options[:name] = criteria
50 content_tag("select",
49 content_tag("select",
51 options_for_select(session[:search_filter][criteria][:options], session[:search_filter][criteria][:value]),
50 options_for_select(@search_filter[criteria][:options], session[:search_filter][criteria]),
52 :name => criteria
51 options
53 )
52 )
54 end
53 end
55
54
56 def search_filter_init_list_issues
55 def search_filter_init_list_issues
57 search_filter_criteria('status_id') {
56 search_filter_criteria('status_id') {
58 [ ["[Open]", "O", ["issue_statuses.is_closed=?", false]],
57 [ [_('[Open]'), "O", ["issue_statuses.is_closed=?", false]],
59 ["[All]", "A", ["", false]]
58 [_('[All]'), "A", nil]
60 ] + IssueStatus.find(:all).collect {|s| [s.name, s.id, ["issues.status_id=?", s.id]] }
59 ] + IssueStatus.find(:all).collect {|s| [s.name, s.id, ["issues.status_id=?", s.id]] }
61 }
60 }
62
61
63 search_filter_criteria('tracker_id') {
62 search_filter_criteria('tracker_id') {
64 [ ["[All]", "A", ["", false]]
63 [ [_('[All]'), "A", nil]
65 ] + Tracker.find(:all).collect {|s| [s.name, s.id, ["issues.tracker_id=?", s.id]] }
64 ] + Tracker.find(:all).collect {|s| [s.name, s.id, ["issues.tracker_id=?", s.id]] }
66 }
65 }
67
66
68 search_filter_criteria('priority_id') {
67 search_filter_criteria('priority_id') {
69 [ ["[All]", "A", ["", false]]
68 [ [_('[All]'), "A", nil]
70 ] + Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect {|s| [s.name, s.id, ["issues.priority_id=?", s.id]] }
69 ] + Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect {|s| [s.name, s.id, ["issues.priority_id=?", s.id]] }
71 }
70 }
72
71
73 search_filter_criteria('category_id') {
72 search_filter_criteria('category_id') {
74 [ ["[All]", "A", ["", false]],
73 [ [_('[All]'), "A", nil],
75 ["[None]", "N", ["issues.category_id is null"]]
74 [_('[None]'), "N", ["issues.category_id is null"]]
76 ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] }
75 ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] }
77 }
76 }
78
77
79 search_filter_criteria('assigned_to_id') {
78 search_filter_criteria('assigned_to_id') {
80 [ ["[All]", "A", ["", false]],
79 [ [_('[All]'), "A", nil],
81 ["[Nobody]", "N", ["issues.assigned_to_id is null"]]
80 [_('[None]'), "N", ["issues.assigned_to_id is null"]]
82 ] + User.find(:all).collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] }
81 ] + @project.users.collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] }
82 }
83
84 search_filter_criteria('subproject_id') {
85 [ [_('[None]'), "N", ["issues.project_id=?", @project.id]],
86 [_('[All]'), "A", ["(issues.project_id=? or projects.parent_id=?)", @project.id, @project.id]]
87 ]
83 }
88 }
84 end
89 end
85 end No newline at end of file
90 end
@@ -1,81 +1,81
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/md5"
18 require "digest/md5"
19
19
20 class Attachment < ActiveRecord::Base
20 class Attachment < ActiveRecord::Base
21 belongs_to :container, :polymorphic => true
21 belongs_to :container, :polymorphic => true
22 belongs_to :author, :class_name => "User", :foreign_key => "author_id"
22 belongs_to :author, :class_name => "User", :foreign_key => "author_id"
23
23
24 validates_presence_of :filename
24 validates_presence_of :filename
25
25
26 def file=(incomming_file)
26 def file=(incomming_file)
27 unless incomming_file.nil?
27 unless incomming_file.nil?
28 @temp_file = incomming_file
28 @temp_file = incomming_file
29 if @temp_file.size > 0
29 if @temp_file.size > 0
30 self.filename = sanitize_filename(@temp_file.original_filename)
30 self.filename = sanitize_filename(@temp_file.original_filename)
31 self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + self.filename
31 self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + self.filename
32 self.content_type = @temp_file.content_type
32 self.content_type = @temp_file.content_type
33 self.size = @temp_file.size
33 self.filesize = @temp_file.size
34 end
34 end
35 end
35 end
36 end
36 end
37
37
38 # Copy temp file to its final location
38 # Copy temp file to its final location
39 def before_save
39 def before_save
40 if @temp_file && (@temp_file.size > 0)
40 if @temp_file && (@temp_file.size > 0)
41 logger.debug("saving '#{self.diskfile}'")
41 logger.debug("saving '#{self.diskfile}'")
42 File.open(diskfile, "wb") do |f|
42 File.open(diskfile, "wb") do |f|
43 f.write(@temp_file.read)
43 f.write(@temp_file.read)
44 end
44 end
45 self.digest = Digest::MD5.hexdigest(File.read(diskfile))
45 self.digest = Digest::MD5.hexdigest(File.read(diskfile))
46 end
46 end
47 end
47 end
48
48
49 # Deletes file on the disk
49 # Deletes file on the disk
50 def after_destroy
50 def after_destroy
51 if self.filename?
51 if self.filename?
52 File.delete(diskfile) if File.exist?(diskfile)
52 File.delete(diskfile) if File.exist?(diskfile)
53 end
53 end
54 end
54 end
55
55
56 # Returns file's location on disk
56 # Returns file's location on disk
57 def diskfile
57 def diskfile
58 "#{RDM_STORAGE_PATH}/#{self.disk_filename}"
58 "#{RDM_STORAGE_PATH}/#{self.disk_filename}"
59 end
59 end
60
60
61 def increment_download
61 def increment_download
62 increment!(:downloads)
62 increment!(:downloads)
63 end
63 end
64
64
65 # returns last created projects
65 # returns last created projects
66 def self.most_downloaded
66 def self.most_downloaded
67 find(:all, :limit => 5, :order => "downloads DESC")
67 find(:all, :limit => 5, :order => "downloads DESC")
68 end
68 end
69
69
70 private
70 private
71 def sanitize_filename(value)
71 def sanitize_filename(value)
72 # get only the filename, not the whole path
72 # get only the filename, not the whole path
73 just_filename = value.gsub(/^.*(\\|\/)/, '')
73 just_filename = value.gsub(/^.*(\\|\/)/, '')
74 # NOTE: File.basename doesn't work right with Windows paths on Unix
74 # NOTE: File.basename doesn't work right with Windows paths on Unix
75 # INCORRECT: just_filename = File.basename(value.gsub('\\\\', '/'))
75 # INCORRECT: just_filename = File.basename(value.gsub('\\\\', '/'))
76
76
77 # Finally, replace all non alphanumeric, underscore or periods with underscore
77 # Finally, replace all non alphanumeric, underscore or periods with underscore
78 @filename = just_filename.gsub(/[^\w\.\-]/,'_')
78 @filename = just_filename.gsub(/[^\w\.\-]/,'_')
79 end
79 end
80
80
81 end
81 end
@@ -1,45 +1,46
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
23
23 OPTIONS = [
24 OPTIONS = [
24 ["Issue priorities", "IPRI"],
25 ["Issue priorities", "IPRI"],
25 ["Document categories", "DCAT"]
26 ["Document categories", "DCAT"]
26 ].freeze
27 ].freeze
27
28
28 def self.get_values(option)
29 def self.get_values(option)
29 find(:all, :conditions => ['opt=?', option])
30 find(:all, :conditions => ['opt=?', option])
30 end
31 end
31
32
32 def name
33 def name
33 _ self.attributes['name']
34 _ self.attributes['name']
34 end
35 end
35
36
36 private
37 private
37 def check_integrity
38 def check_integrity
38 case self.opt
39 case self.opt
39 when "IPRI"
40 when "IPRI"
40 raise "Can't delete enumeration" if Issue.find(:first, :conditions => ["priority_id=?", self.id])
41 raise "Can't delete enumeration" if Issue.find(:first, :conditions => ["priority_id=?", self.id])
41 when "DCAT"
42 when "DCAT"
42 raise "Can't delete enumeration" if Document.find(:first, :conditions => ["category_id=?", self.id])
43 raise "Can't delete enumeration" if Document.find(:first, :conditions => ["category_id=?", self.id])
43 end
44 end
44 end
45 end
45 end
46 end
@@ -1,28 +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 IssueCategory < ActiveRecord::Base
18 class IssueCategory < ActiveRecord::Base
19 before_destroy :check_integrity
19 before_destroy :check_integrity
20 belongs_to :project
20 belongs_to :project
21
21
22 validates_presence_of :name
22 validates_presence_of :name
23 validates_uniqueness_of :name, :scope => [:project_id]
23
24
24 private
25 private
25 def check_integrity
26 def check_integrity
26 raise "Can't delete category" if Issue.find(:first, :conditions => ["category_id=?", self.id])
27 raise "Can't delete category" if Issue.find(:first, :conditions => ["category_id=?", self.id])
27 end
28 end
28 end
29 end
@@ -1,47 +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 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
25 validates_format_of :html_color, :with => /^[a-f0-9]*$/i
24
26
25 # Returns the default status for new issues
27 # Returns the default status for new issues
26 def self.default
28 def self.default
27 find(:first, :conditions =>["is_default=?", true])
29 find(:first, :conditions =>["is_default=?", true])
28 end
30 end
29
31
30 # 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
31 def new_statuses_allowed_to(role, tracker)
33 def new_statuses_allowed_to(role, tracker)
32 statuses = []
34 statuses = []
33 for workflow in self.workflows.find(:all, :include => :new_status)
35 for workflow in self.workflows
34 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
35 end unless role.nil?
37 end unless role.nil? or tracker.nil?
36 statuses
38 statuses
37 end
39 end
38
40
39 def name
41 def name
40 _ self.attributes['name']
42 _ self.attributes['name']
41 end
43 end
42
44
43 private
45 private
44 def check_integrity
46 def check_integrity
45 raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id])
47 raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id])
46 end
48 end
47 end
49 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, :descr
21 validates_presence_of :controller, :action, :descr
22
22
23 GROUPS = {
23 GROUPS = {
24 100 => "Project",
24 100 => "Project",
25 200 => "Membres",
25 200 => "Membres",
26 300 => "Versions",
26 300 => "Versions",
27 400 => "Issue categories",
27 400 => "Issue categories",
28 1000 => "Issues",
28 1000 => "Issues",
29 1100 => "News",
29 1100 => "News",
30 1200 => "Documents",
30 1200 => "Documents",
31 1300 => "Files",
31 1300 => "Files",
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 => ["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,44 +1,48
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 Project < ActiveRecord::Base
18 class Project < ActiveRecord::Base
19 has_many :versions, :dependent => true, :order => "versions.date DESC"
19 has_many :versions, :dependent => true, :order => "versions.effective_date DESC"
20 has_many :members, :dependent => true
20 has_many :members, :dependent => true
21 has_many :users, :through => :members
21 has_many :issues, :dependent => true, :order => "issues.created_on DESC", :include => :status
22 has_many :issues, :dependent => true, :order => "issues.created_on DESC", :include => :status
22 has_many :documents, :dependent => true
23 has_many :documents, :dependent => true
23 has_many :news, :dependent => true, :order => "news.created_on DESC", :include => :author
24 has_many :news, :dependent => true, :include => :author
24 has_many :issue_categories, :dependent => true
25 has_many :issue_categories, :dependent => true
25 has_and_belongs_to_many :custom_fields
26 has_and_belongs_to_many :custom_fields
27 acts_as_tree :order => "name", :counter_cache => true
26
28
27 validates_presence_of :name, :descr
29 validates_presence_of :name, :descr
30 validates_uniqueness_of :name
28
31
29 # returns 5 last created projects
32 # returns 5 last created projects
30 def self.latest
33 def self.latest
31 find(:all, :limit => 5, :order => "created_on DESC")
34 find(:all, :limit => 5, :order => "created_on DESC")
32 end
35 end
33
36
34 # Returns current version of the project
35 def current_version
36 versions.find(:first, :conditions => [ "date <= ?", Date.today ], :order => "date DESC, id DESC")
37 end
38
39 # Returns an array of all custom fields enabled for project issues
37 # Returns an array of all custom fields enabled for project issues
40 # (explictly associated custom fields and custom fields enabled for all projects)
38 # (explictly associated custom fields and custom fields enabled for all projects)
41 def custom_fields_for_issues
39 def custom_fields_for_issues
42 (CustomField.for_all + custom_fields).uniq
40 (CustomField.for_all + custom_fields).uniq
43 end
41 end
42
43 protected
44 def validate
45 errors.add(parent_id, " must be a root project") if parent and parent.parent
46 errors.add_to_base("A project with subprojects can't be a subproject") if parent and projects_count > 0
47 end
44 end
48 end
@@ -1,31 +1,34
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
22
23 validates_presence_of :name
24 validates_uniqueness_of :name
25
23 def name
26 def name
24 _ self.attributes['name']
27 _ self.attributes['name']
25 end
28 end
26
29
27 private
30 private
28 def check_integrity
31 def check_integrity
29 raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id])
32 raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id])
30 end
33 end
31 end
34 end
@@ -1,89 +1,77
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
22
23 attr_accessor :password
23 attr_accessor :password, :password_confirmation
24 attr_accessor :last_before_login_on
24 attr_accessor :last_before_login_on
25 # Prevents unauthorized assignments
25 # Prevents unauthorized assignments
26 attr_protected :admin
26 attr_protected :login, :admin, :password, :password_confirmation, :hashed_password
27
27
28 validates_presence_of :login, :firstname, :lastname, :mail
28 validates_presence_of :login, :firstname, :lastname, :mail
29 validates_uniqueness_of :login, :mail
29 validates_uniqueness_of :login, :mail
30
31 # Login must contain lettres, numbers, underscores only
30 # Login must contain lettres, numbers, underscores only
32 validates_format_of :login, :with => /^[a-z0-9_]+$/i
31 validates_format_of :login, :with => /^[a-z0-9_]+$/i
33 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
32 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
33 # Password length between 4 and 12
34 validates_length_of :password, :in => 4..12, :allow_nil => true
35 validates_confirmation_of :password, :allow_nil => true
34
36
35 def before_create
37 def before_save
36 self.hashed_password = User.hash_password(self.password)
38 # update hashed_password if password was set
37 end
39 self.hashed_password = User.hash_password(self.password) if self.password
38
39 def after_create
40 @password = nil
41 end
40 end
42
41
43 # Returns the user that matches user's login and password
42 # Returns the user that matches provided login and password, or nil
44 def try_to_login
43 def self.try_to_login(login, password)
45 @user = User.login(self.login, self.password)
44 user = find(:first, :conditions => ["login=? and hashed_password=? and locked=?", login, User.hash_password(password), false])
46 unless @user.nil?
45 if user
47 @user.last_before_login_on = @user.last_login_on
46 user.last_before_login_on = user.last_login_on
48 @user.update_attribute(:last_login_on, DateTime.now)
47 user.update_attribute(:last_login_on, Time.now)
49 end
48 end
50 @user
49 user
51 end
50 end
52
51
53 # Return user's full name for display
52 # Return user's full name for display
54 def display_name
53 def display_name
55 firstname + " " + lastname #+ (self.admin ? " (Admin)" : "" )
54 firstname + " " + lastname
56 end
57
58 # Returns the user that matches the given login and password
59 def self.login(login, password)
60 hashed_password = hash_password(password || "")
61 find(:first,
62 :conditions => ["login = ? and hashed_password = ? and locked = ?", login, hashed_password, false])
63 end
55 end
64
56
65 def check_password?(clear_password)
57 def check_password?(clear_password)
66 User.hash_password(clear_password) == self.hashed_password
58 User.hash_password(clear_password) == self.hashed_password
67 end
59 end
68
60
69 def change_password(current_password, new_password)
70 self.hashed_password = User.hash_password(new_password)
71 save
72 end
73
61
74 def role_for_project(project_id)
62 def role_for_project(project_id)
75 @role_for_projects ||=
63 @role_for_projects ||=
76 begin
64 begin
77 roles = {}
65 roles = {}
78 self.memberships.each { |m| roles.store m.project_id, m.role_id }
66 self.memberships.each { |m| roles.store m.project_id, m.role_id }
79 roles
67 roles
80 end
68 end
81 @role_for_projects[project_id]
69 @role_for_projects[project_id]
82 end
70 end
83
71
84 private
72 private
85 # Return password digest
73 # Return password digest
86 def self.hash_password(clear_password)
74 def self.hash_password(clear_password)
87 Digest::SHA1.hexdigest(clear_password)
75 Digest::SHA1.hexdigest(clear_password || "")
88 end
76 end
89 end
77 end
@@ -1,30 +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 Version < ActiveRecord::Base
18 class Version < ActiveRecord::Base
19 before_destroy :check_integrity
19 before_destroy :check_integrity
20 belongs_to :project
20 belongs_to :project
21 has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id'
21 has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id'
22 has_many :attachments, :as => :container, :dependent => true
22 has_many :attachments, :as => :container, :dependent => true
23
23
24 validates_presence_of :name, :descr
24 validates_presence_of :name
25 validates_uniqueness_of :name, :scope => [:project_id]
25
26
26 private
27 private
27 def check_integrity
28 def check_integrity
28 raise "Can't delete version" if self.fixed_issues.find(:first)
29 raise "Can't delete version" if self.fixed_issues.find(:first)
29 end
30 end
30 end
31 end
@@ -1,25 +1,24
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 Workflow < ActiveRecord::Base
18 class Workflow < ActiveRecord::Base
19
20 belongs_to :role
19 belongs_to :role
21 belongs_to :old_status, :class_name => 'IssueStatus', :foreign_key => 'old_status_id'
20 belongs_to :old_status, :class_name => 'IssueStatus', :foreign_key => 'old_status_id'
22 belongs_to :new_status, :class_name => 'IssueStatus', :foreign_key => 'new_status_id'
21 belongs_to :new_status, :class_name => 'IssueStatus', :foreign_key => 'new_status_id'
23
22
24 validates_presence_of :role, :old_status, :new_status
23 validates_presence_of :role, :old_status, :new_status
25 end
24 end
@@ -1,13 +1,13
1 <div class="box">
1 <div class="box">
2 <h2><%=_ 'Please login' %></h2>
2 <h2><%=_('Please login') %></h2>
3
3
4 <%= start_form_tag :action=> "login" %>
4 <%= start_form_tag :action=> "login" %>
5 <p><label for="user_login"><%=_ 'Login' %>:</label><br/>
5 <p><label for="login"><%=_ 'Login' %>:</label><br/>
6 <input type="text" name="user[login]" id="user_login" size="30" /></p>
6 <%= text_field_tag 'login', nil, :size => 25 %></p>
7
7
8 <p><label for="user_password"><%=_ 'Password' %>:</label><br/>
8 <p><label for="user_password"><%=_ 'Password' %>:</label><br/>
9 <input type="password" name="user[password]" id="user_password" size="30"/></p>
9 <%= password_field_tag 'password', nil, :size => 25 %></p>
10
10
11 <p><input type="submit" name="login" value="<%=_ 'Log in' %> &#187;" class="primary" /></p>
11 <p><input type="submit" name="login" value="<%=_ 'Log in' %> &#187;" class="primary" /></p>
12 <%= end_form_tag %>
12 <%= end_form_tag %>
13 </div> No newline at end of file
13 </div>
@@ -1,54 +1,55
1 <h2><%=_('My account')%></h2>
1 <h2><%=_('My account')%></h2>
2
2
3 <p><%=_('Login')%>: <strong><%= @user.login %></strong><br />
3 <p><%=_('Login')%>: <strong><%= @user.login %></strong><br />
4 <%=_('Created on')%>: <%= format_time(@user.created_on) %>,
4 <%=_('Created on')%>: <%= format_time(@user.created_on) %>,
5 <%=_('Last update')%>: <%= format_time(@user.updated_on) %></p>
5 <%=_('Last update')%>: <%= format_time(@user.updated_on) %></p>
6
6
7 <%= error_messages_for 'user' %>
8
7 <div class="splitcontentleft">
9 <div class="splitcontentleft">
8 <div class="box">
10 <div class="box">
9 <h3><%=_('Information')%></h3>
11 <h3><%=_('Information')%></h3>
10 &nbsp;
12 &nbsp;
11 <%= start_form_tag :action => 'my_account' %>
13 <%= start_form_tag :action => 'my_account' %>
12 <%= error_messages_for 'user' %>
13
14
14 <!--[form:user]-->
15 <!--[form:user]-->
15 <p><label for="user_firstname"><%=_('Firstname')%> <span class="required">*</span></label><br/>
16 <p><label for="user_firstname"><%=_('Firstname')%> <span class="required">*</span></label><br/>
16 <%= text_field 'user', 'firstname' %></p>
17 <%= text_field 'user', 'firstname' %></p>
17
18
18 <p><label for="user_lastname"><%=_('Lastname')%> <span class="required">*</span></label><br/>
19 <p><label for="user_lastname"><%=_('Lastname')%> <span class="required">*</span></label><br/>
19 <%= text_field 'user', 'lastname' %></p>
20 <%= text_field 'user', 'lastname' %></p>
20
21
21 <p><label for="user_mail"><%=_('Mail')%> <span class="required">*</span></label><br/>
22 <p><label for="user_mail"><%=_('Mail')%> <span class="required">*</span></label><br/>
22 <%= text_field 'user', 'mail' %></p>
23 <%= text_field 'user', 'mail' %></p>
23
24
24 <p><label for="user_language"><%=_('Language')%></label><br/>
25 <p><label for="user_language"><%=_('Language')%></label><br/>
25 <%= select("user", "language", Localization.langs) %></p>
26 <%= select("user", "language", Localization.langs) %></p>
26 <!--[eoform:user]-->
27 <!--[eoform:user]-->
27
28
28 <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
29 <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
29
30
30 <center><%= submit_tag _('Save') %></center>
31 <center><%= submit_tag _('Save') %></center>
31 <%= end_form_tag %>
32 <%= end_form_tag %>
32 </div>
33 </div>
33 </div>
34 </div>
34
35
35
36
36 <div class="splitcontentright">
37 <div class="splitcontentright">
37 <div class="box">
38 <div class="box">
38 <h3><%=_('Password')%></h3>
39 <h3><%=_('Password')%></h3>
39 &nbsp;
40 &nbsp;
40 <%= start_form_tag :action => 'change_password' %>
41 <%= start_form_tag :action => 'change_password' %>
41
42
42 <p><label for="old_password"><%=_('Password')%> <span class="required">*</span></label><br/>
43 <p><label for="password"><%=_('Password')%> <span class="required">*</span></label><br/>
43 <%= password_field_tag 'old_password' %></p>
44 <%= password_field_tag 'password', nil, :size => 25 %></p>
44
45
45 <p><label for="new_password"><%=_('New password')%> <span class="required">*</span></label><br/>
46 <p><label for="new_password"><%=_('New password')%> <span class="required">*</span></label><br/>
46 <%= password_field_tag 'new_password' %></p>
47 <%= password_field_tag 'new_password', nil, :size => 25 %></p>
47
48
48 <p><label for="new_password_confirmation"><%=_('Confirmation')%> <span class="required">*</span></label><br/>
49 <p><label for="new_password_confirmation"><%=_('Confirmation')%> <span class="required">*</span></label><br/>
49 <%= password_field_tag 'new_password_confirmation' %></p>
50 <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
50
51
51 <center><%= submit_tag _('Save') %></center>
52 <center><%= submit_tag _('Save') %></center>
52 <%= end_form_tag %>
53 <%= end_form_tag %>
53 </div>
54 </div>
54 </div> No newline at end of file
55 </div>
@@ -1,4 +1,10
1 <h2><%=_('Information')%></h2>
1 <h2><%=_('Information')%></h2>
2
2
3 <%=_('Version')%>: <%= RDM_APP_NAME %> <%= RDM_APP_VERSION %><br />
3 <p><%=_('Version')%>: <strong><%= RDM_APP_NAME %> <%= RDM_APP_VERSION %></strong></p>
4 <%=_('Database')%>: <%= @adapter_name %> No newline at end of file
4
5 Environment:
6 <ul>
7 <% Rails::Info.properties.each do |name, value| %>
8 <li><%= name %>: <%= value %></li>
9 <% end %>
10 </ul> No newline at end of file
@@ -1,35 +1,32
1 <h2><%=_('Projects')%></h2>
1 <h2><%=_('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('projects.name', :caption => _('Project')) %>
5 <%= sort_header_tag('name', :caption => _('Project')) %>
6 <th><%=_('Description')%></th>
6 <th><%=_('Description')%></th>
7 <th><%=_('Public')%></th>
7 <th><%=_('Public')%></th>
8 <%= sort_header_tag('projects.created_on', :caption => _('Created on')) %>
8 <th><%=_('Subprojects')%></th>
9 <%= sort_header_tag('created_on', :caption => _('Created on')) %>
9 <th></th>
10 <th></th>
10 </tr>
11 </tr>
11
12
12 <% odd_or_even = 1
13 <% for project in @projects %>
13 for project in @projects
14 <tr class="<%= cycle("odd", "even") %>">
14 odd_or_even = 1 - odd_or_even %>
15 <tr class="ListLine<%= odd_or_even %>">
16 <td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
15 <td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
17 <td><%= project.descr %>
16 <td><%= project.descr %>
18 <td align="center"><%= image_tag 'true' if project.public? %>
17 <td align="center"><%= image_tag 'true' if project.is_public? %>
18 <td align="center"><%= project.projects_count %>
19 <td align="center"><%= format_date(project.created_on) %>
19 <td align="center"><%= format_date(project.created_on) %>
20 <td align="center">
20 <td align="center">
21 <%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => project}) %>
21 <%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => project}) %>
22 <%= submit_tag _('Delete'), :class => "button-small" %>
22 <%= submit_tag _('Delete'), :class => "button-small" %>
23 <%= end_form_tag %>
23 <%= end_form_tag %>
24 </td>
24 </td>
25 </tr>
25 </tr>
26 <% end %>
26 <% end %>
27 </table>
27 </table>
28
28
29 <%= link_to ('&#171; ' + _('Previous')), { :page => @project_pages.current.previous } if @project_pages.current.previous %>
29 <p><%= pagination_links_full @project_pages %>
30 <%= pagination_links(@project_pages) %>
30 [ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
31 <%= link_to (_('Next') + ' &#187;'), { :page => @project_pages.current.next } if @project_pages.current.next %>
32
31
33 <br />
32 <p><%= link_to ('&#187; ' + _('New project')), :controller => 'projects', :action => 'add' %></p> No newline at end of file
34
35 <%= link_to ('&#187; ' + _('New project')), :controller => 'projects', :action => 'add' %> No newline at end of file
@@ -1,32 +1,32
1 <h2><%=_('Custom fields')%></h2>
1 <h2><%=_('Custom fields')%></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><%=_('Name')%></th>
5 <th><%=_('Name')%></th>
6 <th><%=_('Type')%></th>
6 <th><%=_('Type')%></th>
7 <th><%=_('Required')%></th>
7 <th><%=_('Required')%></th>
8 <th><%=_('For all projects')%></th>
8 <th><%=_('For all projects')%></th>
9 <th><%=_('Used by')%></th>
9 <th><%=_('Used by')%></th>
10 <th></th>
10 <th></th>
11 </tr>
11 </tr>
12 <% for custom_field in @custom_fields %>
12 <% for custom_field in @custom_fields %>
13 <tr style="background-color:#CEE1ED">
13 <tr class="<%= cycle("odd", "even") %>">
14 <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
14 <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
15 <td align="center"><%= CustomField::TYPES[custom_field.typ][0] %></td>
15 <td align="center"><%= CustomField::TYPES[custom_field.typ][0] %></td>
16 <td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
16 <td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
17 <td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
17 <td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
18 <td align="center"><%= custom_field.projects.count.to_s + ' ' + _('Project') + '(s)' unless custom_field.is_for_all? %></td>
18 <td align="center"><%= custom_field.projects.count.to_s + ' ' + _('Project') + '(s)' unless custom_field.is_for_all? %></td>
19 <td align="center">
19 <td align="center">
20 <%= start_form_tag :action => 'destroy', :id => custom_field %>
20 <%= start_form_tag :action => 'destroy', :id => custom_field %>
21 <%= submit_tag _('Delete'), :class => "button-small" %>
21 <%= submit_tag _('Delete'), :class => "button-small" %>
22 <%= end_form_tag %> </td>
22 <%= end_form_tag %> </td>
23 </tr>
23 </tr>
24 <% end %>
24 <% end %>
25 </table>
25 </table>
26
26
27 <%= link_to ('&#171; ' + _('Previous')), { :page => @custom_field_pages.current.previous } if @custom_field_pages.current.previous %>
27 <%= link_to ('&#171; ' + _('Previous')), { :page => @custom_field_pages.current.previous } if @custom_field_pages.current.previous %>
28 <%= link_to (_('Next') + ' &#187;'), { :page => @custom_field_pages.current.next } if @custom_field_pages.current.next %>
28 <%= link_to (_('Next') + ' &#187;'), { :page => @custom_field_pages.current.next } if @custom_field_pages.current.next %>
29
29
30 <br />
30 <br />
31
31
32 <%= link_to ('&#187; ' + _('New custom field')), :action => 'new' %>
32 <%= link_to ('&#187; ' + _('New custom field')), :action => 'new' %>
@@ -1,45 +1,47
1 <h2><%= @document.title %></h2>
1 <h2><%= @document.title %></h2>
2
2
3 <strong><%=_('Description')%>:</strong> <%= @document.descr %><br />
3 <strong><%=_('Description')%>:</strong> <%= @document.descr %><br />
4 <strong><%=_('Category')%>:</strong> <%= @document.category.name %><br />
4 <strong><%=_('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 _('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 _('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.size) %><br /><%= attachment.downloads %> <%=_('download')%>(s)</td>
27 <td><%= human_size(attachment.filesize) %><br /><%= attachment.downloads %> <%=_('download')%>(s)</td>
28
28 <% if authorize_for('documents', 'destroy_attachment') %>
29 <% if authorize_for('documents', 'destroy_attachment') %>
29 <td align="center">
30 <td align="center">
30 <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %>
31 <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %>
31 <%= submit_tag _('Delete'), :class => "button-small" %>
32 <%= submit_tag _('Delete'), :class => "button-small" %>
32 <%= end_form_tag %>
33 <%= end_form_tag %>
33 </tr>
34 </tr>
34 <% end %>
35 <% end %>
36
35 <% end %>
37 <% end %>
36 </table>
38 </table>
37 <br />
39 <br />
38
40
39 <% if authorize_for('documents', 'add_attachment') %>
41 <% if authorize_for('documents', 'add_attachment') %>
40 <%= 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) %>
41 <%=_('Add file')%><br /><%= file_field 'attachment', 'file' %>
43 <%=_('Add file')%><br /><%= file_field 'attachment', 'file' %>
42 <%= submit_tag _('Add') %>
44 <%= submit_tag _('Add') %>
43 <%= end_form_tag %>
45 <%= end_form_tag %>
44 <% end %>
46 <% end %>
45
47
@@ -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><br/>
4 <p><label for="issue_status_name"><%=_('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"><%=_('Issue 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"><%=_('Default status')%></label></p>
12
12
13 <p><label for="issue_status_html_color"><%=_('Color')%></label>
13 <p><label for="issue_status_html_color"><%=_('Color')%></label>
14 #<%= text_field 'issue_status', 'html_color', :size => 6 %></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,30 +1,30
1 <h2><%=_('Issue statuses')%></h2>
1 <h2><%=_('Issue statuses')%></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><%=_('Status')%></th>
6 <th><%=_('Default status')%></th>
6 <th><%=_('Default status')%></th>
7 <th><%=_('Issue closed')%></th>
7 <th><%=_('Issue closed')%></th>
8 <th><%=_('Color')%></th>
8 <th><%=_('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 style="background-color:#CEE1ED">
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 _('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; ' + _('New issue status'), :action => 'new' %>
@@ -1,90 +1,90
1
1
2 <h2><%=_('Issue')%> #<%= @issue.id %> - <%= @issue.subject %></h2>
2 <h2><%=_('Issue')%> #<%= @issue.id %> - <%= @issue.subject %></h2>
3
3
4 <div class="box">
4 <div class="box">
5 <p><b><%=_('Tracker')%>:</b> <%= @issue.tracker.name %></p>
5 <p><b><%=_('Tracker')%>:</b> <%= @issue.tracker.name %></p>
6 <p><b><%=_('Priority')%>:</b> <%= @issue.priority.name %></p>
6 <p><b><%=_('Priority')%>:</b> <%= @issue.priority.name %></p>
7 <p><b><%=_('Category')%>:</b> <%= @issue.category.name unless @issue.category_id.nil? %></p>
7 <p><b><%=_('Category')%>:</b> <%= @issue.category.name unless @issue.category_id.nil? %></p>
8 <p><b><%=_('Status')%>:</b> <%= @issue.status.name %></p>
8 <p><b><%=_('Status')%>:</b> <%= @issue.status.name %></p>
9 <p><b><%=_('Author')%>:</b> <%= @issue.author.display_name %></p>
9 <p><b><%=_('Author')%>:</b> <%= @issue.author.display_name %></p>
10 <p><b><%=_('Assigned to')%>:</b> <%= @issue.assigned_to.display_name unless @issue.assigned_to.nil? %></p>
10 <p><b><%=_('Assigned to')%>:</b> <%= @issue.assigned_to.display_name unless @issue.assigned_to.nil? %></p>
11
11
12 <p><b><%=_('Subject')%>:</b> <%= @issue.subject %></p>
12 <p><b><%=_('Subject')%>:</b> <%= @issue.subject %></p>
13 <p><b><%=_('Description')%>:</b> <%= @issue.descr %></p>
13 <p><b><%=_('Description')%>:</b> <%= simple_format auto_link @issue.descr %></p>
14 <p><b><%=_('Created on')%>:</b> <%= format_date(@issue.created_on) %></p>
14 <p><b><%=_('Created on')%>:</b> <%= format_date(@issue.created_on) %></p>
15
15
16 <% if authorize_for('issues', 'edit') %>
16 <% if authorize_for('issues', 'edit') %>
17 <%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
17 <%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
18 <%= submit_tag _('Edit') %>
18 <%= submit_tag _('Edit') %>
19 <%= end_form_tag %>
19 <%= end_form_tag %>
20 &nbsp;&nbsp;
20 &nbsp;&nbsp;
21 <% end %>
21 <% end %>
22
22
23 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
23 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
24 <%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
24 <%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
25 <label for="history_status_id"><%=_('Change status')%>:</label>
25 <label for="history_status_id"><%=_('Change status')%>:</label>
26 <select name="history[status_id]">
26 <select name="history[status_id]">
27 <%= options_from_collection_for_select @status_options, "id", "name" %>
27 <%= options_from_collection_for_select @status_options, "id", "name" %>
28 </select>
28 </select>
29 <%= submit_tag _ "Update..." %>
29 <%= submit_tag _ "Update..." %>
30 <%= end_form_tag %>
30 <%= end_form_tag %>
31 &nbsp;&nbsp;
31 &nbsp;&nbsp;
32 <% end %>
32 <% end %>
33
33
34 <% if authorize_for('issues', 'destroy') %>
34 <% if authorize_for('issues', 'destroy') %>
35 <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %>
35 <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %>
36 <%= submit_tag _ "Delete" %>
36 <%= submit_tag _ "Delete" %>
37 <%= end_form_tag %>
37 <%= end_form_tag %>
38 &nbsp;&nbsp;
38 &nbsp;&nbsp;
39 <% end %>
39 <% end %>
40
40
41 </div>
41 </div>
42
42
43
43
44 <div class="splitcontentleft">
44 <div class="splitcontentleft">
45 <div class="box">
45 <div class="box">
46 <h3><%=_('History')%></h3>
46 <h3><%=_('History')%></h3>
47 <table width="100%">
47 <table width="100%">
48 <% for history in @issue.histories.find(:all, :include => :author) %>
48 <% for history in @issue.histories.find(:all, :include => :author) %>
49 <tr>
49 <tr>
50 <td><%= format_date(history.created_on) %></td>
50 <td><%= format_date(history.created_on) %></td>
51 <td><%= history.author.display_name %></td>
51 <td><%= history.author.display_name %></td>
52 <td><b><%= history.status.name %></b></td>
52 <td><b><%= history.status.name %></b></td>
53 </tr>
53 </tr>
54 <% if history.notes? %>
54 <% if history.notes? %>
55 <tr><td colspan=3><div class="notes"><%= history.notes %></td></tr>
55 <tr><td colspan=3><div class="notes"><%= history.notes %></td></tr>
56 <% end %>
56 <% end %>
57 <% end %>
57 <% end %>
58 </table>
58 </table>
59 </div>
59 </div>
60 </div>
60 </div>
61
61
62 <div class="splitcontentright">
62 <div class="splitcontentright">
63 <div class="box">
63 <div class="box">
64 <h3><%=_('Attachments')%></h3>
64 <h3><%=_('Attachments')%></h3>
65 <table width="100%">
65 <table width="100%">
66 <% for attachment in @issue.attachments %>
66 <% for attachment in @issue.attachments %>
67 <tr>
67 <tr>
68 <td><%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.size) %>)</td>
68 <td><%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.filesize) %>)</td>
69 <td><%= format_date(attachment.created_on) %></td>
69 <td><%= format_date(attachment.created_on) %></td>
70 <td><%= attachment.author.display_name %></td>
70 <td><%= attachment.author.display_name %></td>
71 <% if authorize_for('issues', 'destroy_attachment') %>
71 <% if authorize_for('issues', 'destroy_attachment') %>
72 <td>
72 <td>
73 <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %>
73 <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %>
74 <%= submit_tag _('Delete'), :class => "button-small" %>
74 <%= submit_tag _('Delete'), :class => "button-small" %>
75 <%= end_form_tag %>
75 <%= end_form_tag %>
76 </td>
76 </td>
77 <% end %>
77 <% end %>
78 </tr>
78 </tr>
79 <% end %>
79 <% end %>
80 </table>
80 </table>
81 <br />
81 <br />
82 <% if authorize_for('issues', 'add_attachment') %>
82 <% if authorize_for('issues', 'add_attachment') %>
83 <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true) %>
83 <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true) %>
84 <%=_('Add file')%>: <%= file_field 'attachment', 'file' %>
84 <%=_('Add file')%>: <%= file_field 'attachment', 'file' %>
85 <%= submit_tag _('Add') %>
85 <%= submit_tag _('Add') %>
86 <%= end_form_tag %>
86 <%= end_form_tag %>
87 <% end %>
87 <% end %>
88 </div>
88 </div>
89 </div>
89 </div>
90
90
@@ -1,89 +1,89
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>redMine</title>
4 <title>redMine</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 "rails" %>
9 <%= stylesheet_link_tag "rails" %>
10 <%= javascript_include_tag :defaults %>
10 <%= javascript_include_tag :defaults %>
11 </head>
11 </head>
12
12
13 <body>
13 <body>
14 <div id="container" >
14 <div id="container" >
15
15
16 <div id="header">
16 <div id="header">
17 <div style="float: left;">
17 <div style="float: left;">
18 <h1><%= RDM_APP_NAME %></h1>
18 <h1><%= RDM_APP_NAME %></h1>
19 <h2>Project management</h2>
19 <h2>Project management</h2>
20 </div>
20 </div>
21 <div style="float: right; padding-right: 1em; padding-top: 0.2em;">
21 <div style="float: right; padding-right: 1em; padding-top: 0.2em;">
22 <% unless session[:user].nil? %><small><%=_('Logged as')%> <b><%= session[:user].login %></b></small><% end %>
22 <% unless session[:user].nil? %><small><%=_('Logged as')%> <b><%= session[:user].login %></b></small><% end %>
23 </div>
23 </div>
24 </div>
24 </div>
25
25
26 <div id="navigation">
26 <div id="navigation">
27 <ul>
27 <ul>
28 <li class="selected"><%= link_to _('Home'), { :controller => '' }, :class => "picHome" %></li>
28 <li class="selected"><%= link_to _('Home'), { :controller => '' }, :class => "picHome" %></li>
29 <li><%= link_to _('My page'), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li>
29 <li><%= link_to _('My page'), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li>
30 <li><%= link_to _('Projects'), { :controller => 'projects' }, :class => "picProject" %></li>
30 <li><%= link_to _('Projects'), { :controller => 'projects' }, :class => "picProject" %></li>
31
31
32 <% unless session[:user].nil? %>
32 <% unless session[:user].nil? %>
33 <li><%= link_to _('My account'), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li>
33 <li><%= link_to _('My account'), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li>
34 <% end %>
34 <% end %>
35
35
36 <% if admin_loggedin? %>
36 <% if admin_loggedin? %>
37 <li><%= link_to _('Administration'), { :controller => 'admin' }, :class => "picAdmin" %></li>
37 <li><%= link_to _('Administration'), { :controller => 'admin' }, :class => "picAdmin" %></li>
38 <% end %>
38 <% end %>
39
39
40 <li class="right"><%= link_to _('Help'), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
40 <li class="right"><%= link_to _('Help'), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
41 <% if session[:user].nil? %>
41 <% if session[:user].nil? %>
42 <li class="right"><%= link_to _('Log in'), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
42 <li class="right"><%= link_to _('Log in'), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
43 <% else %>
43 <% else %>
44 <li class="right"><%= link_to _('Logout'), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
44 <li class="right"><%= link_to _('Logout'), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
45 <% end %>
45 <% end %>
46 </ul>
46 </ul>
47
47
48 </div>
48 </div>
49
49
50 <div id="subcontent">
50 <div id="subcontent">
51
51
52 <% unless @project.nil? || @project.id.nil? %>
52 <% unless @project.nil? || @project.id.nil? %>
53 <h2><%= @project.name %></h2>
53 <h2><%= @project.name %></h2>
54 <ul class="menublock">
54 <ul class="menublock">
55 <li><%= link_to _('Overview'), :controller => 'projects', :action => 'show', :id => @project %></li>
55 <li><%= link_to _('Overview'), :controller => 'projects', :action => 'show', :id => @project %></li>
56 <li><%= link_to _('Issues'), :controller => 'projects', :action => 'list_issues', :id => @project %></li>
56 <li><%= link_to _('Issues'), :controller => 'projects', :action => 'list_issues', :id => @project %></li>
57 <li><%= link_to _('Reports'), :controller => 'reports', :action => 'issue_report', :id => @project %></li>
57 <li><%= link_to _('Reports'), :controller => 'reports', :action => 'issue_report', :id => @project %></li>
58 <li><%= link_to _('News'), :controller => 'projects', :action => 'list_news', :id => @project %></li>
58 <li><%= link_to _('News'), :controller => 'projects', :action => 'list_news', :id => @project %></li>
59 <li><%= link_to _('Change log'), :controller => 'projects', :action => 'changelog', :id => @project %></li>
59 <li><%= link_to _('Change log'), :controller => 'projects', :action => 'changelog', :id => @project %></li>
60 <li><%= link_to _('Documents'), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
60 <li><%= link_to _('Documents'), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
61 <li><%= link_to _('Members'), :controller => 'projects', :action => 'list_members', :id => @project %></li>
61 <li><%= link_to _('Members'), :controller => 'projects', :action => 'list_members', :id => @project %></li>
62 <li><%= link_to _('Files'), :controller => 'projects', :action => 'list_files', :id => @project %></li>
62 <li><%= link_to _('Files'), :controller => 'projects', :action => 'list_files', :id => @project %></li>
63 <li><%= link_to_if_authorized _('Settings'), :controller => 'projects', :action => 'settings', :id => @project %></li>
63 <li><%= link_to_if_authorized _('Settings'), :controller => 'projects', :action => 'settings', :id => @project %></li>
64 </ul>
64 </ul>
65 <% end %>
65 <% end %>
66
66
67 <% unless session[:user].nil? %>
67 <% unless session[:user].nil? %>
68 <h2><%=_('My projects') %></h2>
68 <h2><%=_('My projects') %></h2>
69 <ul class="menublock">
69 <ul class="menublock">
70 <% for membership in session[:user].memberships %>
70 <% for membership in session[:user].memberships %>
71 <li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li>
71 <li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li>
72 <% end %>
72 <% end %>
73 </ul>
73 </ul>
74 <% end %>
74 <% end %>
75
75
76 </div>
76 </div>
77
77
78 <div id="content">
78 <div id="content">
79 <% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>
79 <% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>
80 <%= @content_for_layout %>
80 <%= @content_for_layout %>
81 </div>
81 </div>
82
82
83 <div id="footer">
83 <div id="footer">
84 <p><a href="http://redmine.sourceforge.net/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %></p>
84 <p><a href="http://redmine.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %></p>
85 </div>
85 </div>
86
86
87 </div>
87 </div>
88 </body>
88 </body>
89 </html> No newline at end of file
89 </html>
@@ -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.shortdescr %><br />
4 <b><%=_('Summary')%></b>: <%= @news.shortdescr %><br />
5 <b><%=_('By')%></b>: <%= @news.author.display_name %><br />
5 <b><%=_('By')%></b>: <%= @news.author.display_name %><br />
6 <b><%=_('Date')%></b>: <%= format_time(@news.created_on) %>
6 <b><%=_('Date')%></b>: <%= format_time(@news.created_on) %>
7 </p>
7 </p>
8
8
9 <%= @news.descr %>
9 <%= simple_format auto_link @news.descr %>
10
10
@@ -1,28 +1,36
1 <%= error_messages_for 'project' %>
1 <%= error_messages_for 'project' %>
2
2
3 <!--[form:project]-->
3 <!--[form:project]-->
4 <p><label for="project_name"><%=_('Name')%> <span class="required">*</span></label><br/>
4 <p><label for="project_name"><%=_('Name')%> <span class="required">*</span></label><br/>
5 <%= text_field 'project', 'name' %></p>
5 <%= text_field 'project', 'name' %></p>
6
6
7 <% if session[:user].admin %>
8 <p><label for="project_parent_id"><%=_('Subproject of')%></label><br/>
9 <select name="project[parent_id]">
10 <option value=""></option>
11 <%= options_from_collection_for_select @root_projects, "id", "name", @project.parent_id %>
12 </select></p>
13 <% end %>
14
7 <p><label for="project_descr"><%=_('Description')%> <span class="required">*</span></label><br/>
15 <p><label for="project_descr"><%=_('Description')%> <span class="required">*</span></label><br/>
8 <%= text_field 'project', 'descr', :size => 60 %></p>
16 <%= text_area 'project', 'descr', :cols => 60, :rows => 3 %></p>
9
17
10 <p><label for="project_homepage"><%=_('Homepage')%></label><br/>
18 <p><label for="project_homepage"><%=_('Homepage')%></label><br/>
11 <%= text_field 'project', 'homepage', :size => 40 %></p>
19 <%= text_field 'project', 'homepage', :size => 40 %></p>
12
20
13 <p><%= check_box 'project', 'public' %>
21 <p><%= check_box 'project', 'is_public' %>
14 <label for="project_public"><%=_('Public')%></label></p>
22 <label for="project_is_public"><%=_('Public')%></label></p>
15
23
16 <fieldset><legend><%=_('Custom fields')%></legend>
24 <fieldset><legend><%=_('Custom fields')%></legend>
17 <% for custom_field in @custom_fields %>
25 <% for custom_field in @custom_fields %>
18 <input type="checkbox"
26 <input type="checkbox"
19
27
20 name="custom_field_ids[]"
28 name="custom_field_ids[]"
21 value="<%= custom_field.id %>"
29 value="<%= custom_field.id %>"
22 <%if @project.custom_fields.include? custom_field%>checked="checked"<%end%>
30 <%if @project.custom_fields.include? custom_field%>checked="checked"<%end%>
23 > <%= custom_field.name %>
31 > <%= custom_field.name %>
24
32
25 <% end %></fieldset>
33 <% end %></fieldset>
26 <br />
34 <br />
27
35
28 <!--[eoform:project]-->
36 <!--[eoform:project]-->
@@ -1,12 +1,12
1 <h2><%=_('Change log')%></h2>
1 <h2><%=_('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.date) %><br />
5 <p><strong><%= version.name %></strong> - <%= format_date(version.effective_date) %><br />
6 <%=h version.descr %></p>
6 <%=h version.descr %></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,22 +1,20
1 <h2><%=_('Public projects')%></h2>
1 <h2><%=_('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('projects.name', :caption => _('Project')) %>
5 <%= sort_header_tag('name', :caption => _('Project')) %>
6 <th>Description</th>
6 <th>Description</th>
7 <%= sort_header_tag('projects.created_on', :caption => _('Created on')) %>
7 <%= sort_header_tag('created_on', :caption => _('Created on')) %>
8 </tr>
8 </tr>
9
9
10 <% odd_or_even = 1
10 <% for project in @projects %>
11 for project in @projects
11 <tr class="<%= cycle("odd", "even") %>">
12 odd_or_even = 1 - odd_or_even %>
13 <tr class="ListLine<%= odd_or_even %>">
14 <td><%= link_to project.name, :action => 'show', :id => project %>
12 <td><%= link_to project.name, :action => 'show', :id => project %>
15 <td><%= project.descr %>
13 <td><%= project.descr %>
16 <td align="center"><%= format_date(project.created_on) %>
14 <td align="center"><%= format_date(project.created_on) %>
17 </tr>
15 </tr>
18 <% end %>
16 <% end %>
19 </table>
17 </table>
20
18
21 <%= pagination_links_full @project_pages %>
19 <%= pagination_links_full @project_pages %>
22 [ <%= @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,47 +1,46
1 <h2><%=_('Files')%></h2>
1 <h2><%=_('Files')%></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><%=_('Version')%></th>
8 <th><%=_('File')%></th>
8 <th><%=_('File')%></th>
9 <th><%=_('Date')%></th>
9 <th><%=_('Date')%></th>
10 <th><%=_('Size')%></th>
10 <th><%=_('Size')%></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 <% odd_or_even = 1
20 <% for file in version.attachments %>
21 for file in version.attachments
21 <tr class="<%= cycle("odd", "even") %>">
22 odd_or_even = 1 - odd_or_even %>
23 <tr class="ListLine<%= odd_or_even %>">
24 <td></td>
22 <td></td>
25 <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>
26 <td align="center"><%= format_date(file.created_on) %></td>
24 <td align="center"><%= format_date(file.created_on) %></td>
27 <td align="center"><%= human_size(file.size) %></td>
25 <td align="center"><%= human_size(file.filesize) %></td>
28 <td align="center"><%= file.downloads %></td>
26 <td align="center"><%= file.downloads %></td>
29 <td align="center"><small><%= file.digest %></small></td>
27 <td align="center"><small><%= file.digest %></small></td>
30 <% if delete_allowed %>
28 <% if delete_allowed %>
31 <td align="center">
29 <td align="center">
32 <%= 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 %>
33 <%= submit_tag _('Delete'), :class => "button-small" %>
31 <%= submit_tag _('Delete'), :class => "button-small" %>
34 <%= end_form_tag %>
32 <%= end_form_tag %>
35 </td>
33 </td>
36 <% end %>
34 <% end %>
37 </tr>
35 </tr>
38 <% end %>
36 <% end
37 reset_cycle %>
39 <% end %>
38 <% end %>
40 </table>
39 </table>
41
40
42 <br />
41 <br />
43 <p>
42 <p>
44 <%= link_to_if_authorized '&#187; ' + _('New'), :controller => 'projects', :action => 'add_file', :id => @project %>
43 <%= link_to_if_authorized '&#187; ' + _('New'), :controller => 'projects', :action => 'add_file', :id => @project %>
45 </p>
44 </p>
46
45
47
46
@@ -1,58 +1,60
1 <h2><%=_('Issues')%></h2>
1 <h2><%=_('Issues')%></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><%=_('Status')%>:<br /><%= search_filter_tag("status_id") %></td>
6 <td><small><%=_('Status')%>:</small><br /><%= search_filter_tag 'status_id', :class => 'select-small' %></td>
7 <td><%=_('Tracker')%>:<br /><%= search_filter_tag("tracker_id") %></td>
7 <td><small><%=_('Tracker')%>:</small><br /><%= search_filter_tag 'tracker_id', :class => 'select-small' %></td>
8 <td><%=_('Priority')%>:<br /><%= search_filter_tag("priority_id") %></td>
8 <td><small><%=_('Priority')%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td>
9 <td><%=_('Category')%>:<br /><%= search_filter_tag("category_id") %></td>
9 <td><small><%=_('Category')%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td>
10 <td><%=_('Assigned to')%>:<br /><%= search_filter_tag("assigned_to_id") %></td>
10 <td><small><%=_('Assigned to')%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>
11 <td><small><%=_('Subprojects')%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
12
11 <td valign="bottom">
13 <td valign="bottom">
12 <%= submit_tag _('Apply filter') %>
14 <%= submit_tag _('Apply filter'), :class => 'button-small' %>
13 <%= end_form_tag %>
15 <%= end_form_tag %>
14
16
15 <%= start_form_tag %>
17 <%= start_form_tag %>
16 <%= submit_tag _('Reset') %>
18 <%= submit_tag _('Reset'), :class => 'button-small' %>
17 <%= end_form_tag %>
19 <%= end_form_tag %>
18 </td>
20 </td>
19 </tr>
21 </tr>
20 </table>
22 </table>
21 &nbsp;
23 &nbsp;
22 <table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
24 <table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
23
25
24 <tr><td colspan="7" align="right">
26 <tr><td colspan="7" align="right">
25 <small><%= link_to 'Export to CSV', :action => 'export_issues_csv', :id => @project.id %></small>
27 <small><%= link_to 'Export to CSV', :action => 'export_issues_csv', :id => @project.id %></small>
26 </td></tr>
28 </td></tr>
27
29
28 <tr class="ListHead">
30 <tr class="ListHead">
29 <%= sort_header_tag('issues.id', :caption => '#') %>
31 <%= sort_header_tag('issues.id', :caption => '#') %>
30 <%= sort_header_tag('issue_statuses.name', :caption => _('Status')) %>
32 <%= sort_header_tag('issue_statuses.name', :caption => _('Status')) %>
31 <%= sort_header_tag('issues.tracker_id', :caption => _('Tracker')) %>
33 <%= sort_header_tag('issues.tracker_id', :caption => _('Tracker')) %>
32 <th><%=_('Subject')%></th>
34 <th><%=_('Subject')%></th>
33 <%= sort_header_tag('users.lastname', :caption => _('Author')) %>
35 <%= sort_header_tag('users.lastname', :caption => _('Author')) %>
34 <%= sort_header_tag('issues.created_on', :caption => _('Created on')) %>
36 <%= sort_header_tag('issues.created_on', :caption => _('Created on')) %>
35 <%= sort_header_tag('issues.updated_on', :caption => _('Last update')) %>
37 <%= sort_header_tag('issues.updated_on', :caption => _('Last update')) %>
36 </tr>
38 </tr>
37
39
38 <% for issue in @issues %>
40 <% for issue in @issues %>
39 <tr bgcolor="#<%= issue.status.html_color %>">
41 <tr bgcolor="#<%= issue.status.html_color %>">
40 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
42 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
41 <td align="center"><%= issue.status.name %></td>
43 <td align="center"><%= issue.status.name %></td>
42 <td align="center"><%= issue.tracker.name %></td>
44 <td align="center"><%= issue.tracker.name %></td>
43 <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td>
45 <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td>
44 <td align="center"><%= issue.author.display_name %></td>
46 <td align="center"><%= issue.author.display_name %></td>
45 <td align="center"><%= format_time(issue.created_on) %></td>
47 <td align="center"><%= format_time(issue.created_on) %></td>
46 <td align="center"><%= format_time(issue.updated_on) %></td>
48 <td align="center"><%= format_time(issue.updated_on) %></td>
47 </tr>
49 </tr>
48 <% end %>
50 <% end %>
49 </table>
51 </table>
50 <p>
52 <p>
51 <%= pagination_links_full @issue_pages %>
53 <%= pagination_links_full @issue_pages %>
52 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
54 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
53 </p>
55 </p>
54
56
55
57
56 <p>
58 <p>
57 <%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
59 <%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
58 </p> No newline at end of file
60 </p>
@@ -1,53 +1,62
1 <h2><%=_('Overview')%></h2>
1 <h2><%=_('Overview')%></h2>
2
2
3 <div class="splitcontentleft">
3 <div class="splitcontentleft">
4 <%= @project.descr %>
4 <%= @project.descr %>
5 <ul>
5 <ul>
6 <li><%=_('Homepage')%>: <%= link_to @project.homepage, @project.homepage %></li>
6 <li><%=_('Homepage')%>: <%= link_to @project.homepage, @project.homepage %></li>
7 <li><%=_('Created on')%>: <%= format_date(@project.created_on) %></li>
7 <li><%=_('Created on')%>: <%= format_date(@project.created_on) %></li>
8 </ul>
8 </ul>
9
9
10 <div class="box">
10 <div class="box">
11 <h3><%= image_tag "tracker" %> <%=_('Trackers')%></h3>
11 <h3><%= image_tag "tracker" %> <%=_('Trackers')%></h3>
12 <ul>
12 <ul>
13 <% for tracker in Tracker.find_all %>
13 <% for tracker in Tracker.find_all %>
14 <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project,
14 <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project,
15 :set_filter => 1,
15 :set_filter => 1,
16 "issues.tracker_id" => tracker.id %>:
16 "tracker_id" => tracker.id %>:
17 <%= tracker.issues.count(["project_id=?", @project.id]) %> <%=_('open')%>
17 <%= Issue.count(:conditions => ["project_id=? and tracker_id=? and issue_statuses.is_closed=?", @project.id, tracker.id, false], :include => :status) %> <%=_('open')%>
18 </li>
18 </li>
19 <% end %>
19 <% end %>
20 </ul>
20 </ul>
21 <%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
21 <%= link_to_if_authorized '&#187; ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %>
22 <br />
22 <br />
23 <center><small>[ <%= link_to _('View all issues'), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %> ]</small></center>
23 <center><small>[ <%= link_to _('View all issues'), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %> ]</small></center>
24 </div>
24 </div>
25 </div>
25 </div>
26
26
27 <div class="splitcontentright">
27 <div class="splitcontentright">
28 <div class="box">
28 <div class="box">
29 <h3><%= image_tag "users" %> <%=_('Members')%></h3>
29 <h3><%= image_tag "users" %> <%=_('Members')%></h3>
30 <% for member in @members %>
30 <% for member in @members %>
31 <%= link_to_user member.user %> (<%= member.role.name %>)<br />
31 <%= link_to_user member.user %> (<%= member.role.name %>)<br />
32 <% end %>
32 <% end %>
33 </div>
33 </div>
34
34
35 <% if @subprojects %>
36 <div class="box">
37 <h3><%= image_tag "projects" %> <%=_('Subprojects')%></h3>
38 <% for subproject in @subprojects %>
39 <%= link_to subproject.name, :action => 'show', :id => subproject %><br />
40 <% end %>
41 </div>
42 <% end %>
43
35 <div class="box">
44 <div class="box">
36 <h3><%=_('Latest news')%></h3>
45 <h3><%=_('Latest news')%></h3>
37 <% for news in @project.news %>
46 <% for news in @news %>
38 <p>
47 <p>
39 <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
48 <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
40 <%= news.shortdescr %>
49 <%= news.shortdescr %>
41 <small>[<%= link_to _('Read...'), :controller => 'news', :action => 'show', :id => news %>]</small>
50 <small>[<%= link_to _('Read...'), :controller => 'news', :action => 'show', :id => news %>]</small>
42 </p>
51 </p>
43 <hr />
52 <hr />
44 <% end %>
53 <% end %>
45 <center><small>[ <%= link_to _('View all news'), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center>
54 <center><small>[ <%= link_to _('View all news'), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center>
46 </div>
55 </div>
47 </div>
56 </div>
48
57
49
58
50
59
51
60
52
61
53
62
@@ -1,23 +1,23
1 <h2><%=_('Roles')%></h2>
1 <h2><%=_('Roles')%></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><%=_('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 style="background-color:#CEE1ED">
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 _('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; ' + _('New role'), :action => 'new' %>
@@ -1,24 +1,24
1 <h2><%=_('Trackers')%></h2>
1 <h2><%=_('Trackers')%></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><%=_('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 style="background-color:#CEE1ED">
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 _('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; ' + _('New tracker'), :action => 'new' %>
@@ -1,28 +1,31
1 <%= error_messages_for 'user' %>
1 <%= error_messages_for 'user' %>
2
2
3 <!--[form:user]-->
3 <!--[form:user]-->
4 <p><label for="user_login"><%=_('Login')%></label><br/>
4 <p><label for="user_login"><%=_('Login')%></label><br/>
5 <%= text_field 'user', 'login' %></p>
5 <%= text_field 'user', 'login', :size => 25 %></p>
6
6
7 <p><label for="user_password"><%=_('Password')%></label><br/>
7 <p><label for="password"><%=_('Password')%></label><br/>
8 <%= password_field 'user', 'password' %></p>
8 <%= password_field_tag 'password', nil, :size => 25 %></p>
9
10 <p><label for="password_confirmation"><%=_('Confirmation')%></label><br/>
11 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
9
12
10 <p><label for="user_firstname"><%=_('Firstname')%></label><br/>
13 <p><label for="user_firstname"><%=_('Firstname')%></label><br/>
11 <%= text_field 'user', 'firstname' %></p>
14 <%= text_field 'user', 'firstname' %></p>
12
15
13 <p><label for="user_lastname"><%=_('Lastname')%></label><br/>
16 <p><label for="user_lastname"><%=_('Lastname')%></label><br/>
14 <%= text_field 'user', 'lastname' %></p>
17 <%= text_field 'user', 'lastname' %></p>
15
18
16 <p><label for="user_mail"><%=_('Mail')%></label><br/>
19 <p><label for="user_mail"><%=_('Mail')%></label><br/>
17 <%= text_field 'user', 'mail' %></p>
20 <%= text_field 'user', 'mail' %></p>
18
21
19 <p><label for="user_language"><%=_('Language')%></label><br/>
22 <p><label for="user_language"><%=_('Language')%></label><br/>
20 <%= select("user", "language", Localization.langs) %></p>
23 <%= select("user", "language", Localization.langs) %></p>
21
24
22 <p><%= check_box 'user', 'admin' %> <label for="user_admin"><%=_('Administrator')%></label></p>
25 <p><%= check_box 'user', 'admin' %> <label for="user_admin"><%=_('Administrator')%></label></p>
23
26
24 <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
27 <p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=_('Mail notifications')%></label></p>
25
28
26 <p><%= check_box 'user', 'locked' %> <label for="user_locked"><%=_('Locked')%></label></p>
29 <p><%= check_box 'user', 'locked' %> <label for="user_locked"><%=_('Locked')%></label></p>
27 <!--[eoform:user]-->
30 <!--[eoform:user]-->
28
31
@@ -1,46 +1,46
1 <h2><%=_('Users')%></h2>
1 <h2><%=_('Users')%></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('users.login', :caption => _('Login')) %>
5 <%= sort_header_tag('login', :caption => _('Login')) %>
6 <%= sort_header_tag('users.firstname', :caption => _('Firstname')) %>
6 <%= sort_header_tag('firstname', :caption => _('Firstname')) %>
7 <%= sort_header_tag('users.lastname', :caption => _('Lastname')) %>
7 <%= sort_header_tag('lastname', :caption => _('Lastname')) %>
8 <th><%=_('Mail')%></th>
8 <th><%=_('Mail')%></th>
9 <%= sort_header_tag('users.admin', :caption => _('Admin')) %>
9 <%= sort_header_tag('admin', :caption => _('Admin')) %>
10 <%= sort_header_tag('users.locked', :caption => _('Locked')) %>
10 <%= sort_header_tag('locked', :caption => _('Locked')) %>
11 <%= sort_header_tag('users.created_on', :caption => _('Created on')) %>
11 <%= sort_header_tag('created_on', :caption => _('Created on')) %>
12 <%= sort_header_tag('users.last_login_on', :caption => _('Last login')) %>
12 <%= sort_header_tag('last_login_on', :caption => _('Last login')) %>
13 <th></th>
13 <th></th>
14 </tr>
14 </tr>
15 <% for user in @users %>
15 <% for user in @users %>
16 <tr style="background-color:#CEE1ED">
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[locked]', false %>
28 <%= hidden_field_tag 'user[locked]', 0 %>
29 <%= submit_tag _('Unlock'), :class => "button-small" %>
29 <%= submit_tag _('Unlock'), :class => "button-small" %>
30 <% else %>
30 <% else %>
31 <%= hidden_field_tag 'user[locked]', true %>
31 <%= hidden_field_tag 'user[locked]', 1 %>
32 <%= submit_tag _('Lock'), :class => "button-small" %>
32 <%= submit_tag _('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; ' + _('New user'), :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><br/>
4 <p><label for="version_name"><%=_('Version')%></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_descr"><%=_('Description')%></label><br/>
7 <p><label for="version_descr"><%=_('Description')%></label><br/>
8 <%= text_field 'version', 'descr', :size => 60 %></p>
8 <%= text_field 'version', 'descr', :size => 60 %></p>
9
9
10 <p><label for="version_date"><%=_('Date')%></label><br/>
10 <p><label for="version_effective_date"><%=_('Date')%></label><br/>
11 <%= date_select 'version', 'date' %></p>
11 <%= date_select 'version', 'effective_date' %></p>
12 <!--[eoform:version]-->
12 <!--[eoform:version]-->
13
13
@@ -1,30 +1,30
1 <div class="splitcontentleft">
1 <div class="splitcontentleft">
2 <h2><%=_('Welcome')%> !</h2>
2 <h2><%=_('Welcome')%> !</h2>
3
3
4 <div class="box">
4 <div class="box">
5 <h3>Latest news</h3>
5 <h3><%=_('Latest news')%></h3>
6 <% for news in @news %>
6 <% for news in @news %>
7 <p>
7 <p>
8 <b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br />
8 <b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br />
9 <%= news.shortdescr %><br />
9 <%= news.shortdescr %><br />
10 [<%= link_to 'Read...', :controller => 'news', :action => 'show', :id => news %>]
10 [<%= link_to 'Read...', :controller => 'news', :action => 'show', :id => news %>]
11 </p>
11 </p>
12 <hr />
12 <hr />
13 <% end %>
13 <% end %>
14 </div>
14 </div>
15 </div>
15 </div>
16
16
17 <div class="splitcontentright">
17 <div class="splitcontentright">
18 <div class="box">
18 <div class="box">
19 <h3>Latest projects</h3>
19 <h3><%=_('Latest projects')%></h3>
20 <ul>
20 <ul>
21 <% for project in @projects %>
21 <% for project in @projects %>
22 <li>
22 <li>
23 <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (added <%= format_time(project.created_on) %>)<br />
23 <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (added <%= format_time(project.created_on) %>)<br />
24 <%= project.descr %>
24 <%= project.descr %>
25 </li>
25 </li>
26 <% end %>
26 <% end %>
27 </ul>
27 </ul>
28 </div>
28 </div>
29
29
30 </div>
30 </div>
@@ -1,39 +1,69
1 # MySQL (default setup). Versions 4.1 and 5.0 are recommended.
1 # MySQL (default setup). Versions 4.1 and 5.0 are recommended.
2 #
2 #
3 # Get the fast C bindings:
3 # Get the fast C bindings:
4 # gem install mysql
4 # gem install mysql
5 # (on OS X: gem install mysql -- --include=/usr/local/lib)
5 # (on OS X: gem install mysql -- --include=/usr/local/lib)
6 # And be sure to use new-style password hashing:
6 # And be sure to use new-style password hashing:
7 # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
7 # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
8
9 production:
10 adapter: mysql
11 database: redmine
12 host: localhost
13 username: root
14 password:
15
8 development:
16 development:
9 adapter: mysql
17 adapter: mysql
10 database: redmine_development
18 database: redmine_development
11 host: localhost
19 host: localhost
12 username: root
20 username: root
13 password:
21 password:
14
22
15 development_pgsql:
23 development_pgsql:
16 adapter: postgresql
24 adapter: postgresql
17 database: redmine
25 database: redmine
18 host: localhost
26 host: localhost
19 username: postgres
27 username: postgres
20 password: "postgres"
28 password: "postgres"
21
29
30 development_oracle:
31 adapter: oci
32 host: 192.168.0.14
33 username: rails
34 password: "rails"
35
36 development_sqlserver:
37 adapter: sqlserver
38 host: localhost,1157
39 database: redmine
40
22 test:
41 test:
23 adapter: mysql
42 adapter: mysql
24 database: redmine_test
43 database: redmine_test
25 host: localhost
44 host: localhost
26 username: root
45 username: root
27 password:
46 password:
28
47
48 test_pgsql:
49 adapter: postgresql
50 database: redmine
51 host: localhost
52 username: postgres
53 password: "postgres"
54
55 test_oracle:
56 adapter: oci
57 host: 192.168.0.14
58 username: rails_test
59 password: "rails"
60
61 test_sqlserver:
62 adapter: sqlserver
63 host: localhost,1157
64 database: redmine_test
65
29 demo:
66 demo:
30 adapter: sqlite3
67 adapter: sqlite3
31 dbfile: db/redmine_demo.db
68 dbfile: db/redmine_demo.db
32
69
33 production:
34 adapter: mysql
35 database: redmine
36 host: localhost
37 username: root
38 password:
39 No newline at end of file
@@ -1,85 +1,85
1 # Be sure to restart your web server when you modify this file.
1 # Be sure to restart your web server when you modify this file.
2
2
3 # Uncomment below to force Rails into production mode when
3 # Uncomment below to force Rails into production mode when
4 # you don't control web/app server and can't set it the proper way
4 # you don't control web/app server and can't set it the proper way
5 # ENV['RAILS_ENV'] ||= 'production'
5 # ENV['RAILS_ENV'] ||= 'production'
6
6
7 # Bootstrap the Rails environment, frameworks, and default configuration
7 # Bootstrap the Rails environment, frameworks, and default configuration
8 require File.join(File.dirname(__FILE__), 'boot')
8 require File.join(File.dirname(__FILE__), 'boot')
9
9
10 Rails::Initializer.run do |config|
10 Rails::Initializer.run do |config|
11 # Settings in config/environments/* take precedence those specified here
11 # Settings in config/environments/* take precedence those specified here
12
12
13 # Skip frameworks you're not going to use
13 # Skip frameworks you're not going to use
14 # config.frameworks -= [ :action_web_service, :action_mailer ]
14 # config.frameworks -= [ :action_web_service, :action_mailer ]
15
15
16 # Add additional load paths for your own custom dirs
16 # Add additional load paths for your own custom dirs
17 # config.load_paths += %W( #{RAILS_ROOT}/extras )
17 # config.load_paths += %W( #{RAILS_ROOT}/extras )
18
18
19 # Force all environments to use the same logger level
19 # Force all environments to use the same logger level
20 # (by default production uses :info, the others :debug)
20 # (by default production uses :info, the others :debug)
21 # config.log_level = :debug
21 # config.log_level = :debug
22
22
23 # Use the database for sessions instead of the file system
23 # Use the database for sessions instead of the file system
24 # (create the session table with 'rake create_sessions_table')
24 # (create the session table with 'rake create_sessions_table')
25 # config.action_controller.session_store = :active_record_store
25 # config.action_controller.session_store = :active_record_store
26
26
27 # Enable page/fragment caching by setting a file-based store
27 # Enable page/fragment caching by setting a file-based store
28 # (remember to create the caching directory and make it readable to the application)
28 # (remember to create the caching directory and make it readable to the application)
29 # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
29 # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
30
30
31 # Activate observers that should always be running
31 # Activate observers that should always be running
32 # config.active_record.observers = :cacher, :garbage_collector
32 # config.active_record.observers = :cacher, :garbage_collector
33
33
34 # Make Active Record use UTC-base instead of local time
34 # Make Active Record use UTC-base instead of local time
35 # config.active_record.default_timezone = :utc
35 # config.active_record.default_timezone = :utc
36
36
37 # Use Active Record's schema dumper instead of SQL when creating the test database
37 # Use Active Record's schema dumper instead of SQL when creating the test database
38 # (enables use of different database adapters for development and test environments)
38 # (enables use of different database adapters for development and test environments)
39 # config.active_record.schema_format = :ruby
39 # config.active_record.schema_format = :ruby
40
40
41 # See Rails::Configuration for more options
41 # See Rails::Configuration for more options
42
42
43 # SMTP server configuration
43 # SMTP server configuration
44 config.action_mailer.server_settings = {
44 config.action_mailer.server_settings = {
45 :address => "127.0.0.1",
45 :address => "127.0.0.1",
46 :port => 25,
46 :port => 25,
47 :domain => "somenet.foo",
47 :domain => "somenet.foo",
48 :authentication => :login,
48 :authentication => :login,
49 :user_name => "redmine",
49 :user_name => "redmine",
50 :password => "redmine",
50 :password => "redmine",
51 }
51 }
52
52
53 config.action_mailer.perform_deliveries = true
53 config.action_mailer.perform_deliveries = true
54
54
55 # Tell ActionMailer not to deliver emails to the real world.
55 # Tell ActionMailer not to deliver emails to the real world.
56 # The :test delivery method accumulates sent emails in the
56 # The :test delivery method accumulates sent emails in the
57 # ActionMailer::Base.deliveries array.
57 # ActionMailer::Base.deliveries array.
58 #config.action_mailer.delivery_method = :test
58 #config.action_mailer.delivery_method = :test
59 config.action_mailer.delivery_method = :smtp
59 config.action_mailer.delivery_method = :smtp
60 end
60 end
61
61
62 # Add new inflection rules using the following format
62 # Add new inflection rules using the following format
63 # (all these examples are active by default):
63 # (all these examples are active by default):
64 # Inflector.inflections do |inflect|
64 # Inflector.inflections do |inflect|
65 # inflect.plural /^(ox)$/i, '\1en'
65 # inflect.plural /^(ox)$/i, '\1en'
66 # inflect.singular /^(ox)en/i, '\1'
66 # inflect.singular /^(ox)en/i, '\1'
67 # inflect.irregular 'person', 'people'
67 # inflect.irregular 'person', 'people'
68 # inflect.uncountable %w( fish sheep )
68 # inflect.uncountable %w( fish sheep )
69 # end
69 # end
70
70
71 # Include your application configuration below
71 # Include your application configuration below
72
72
73 # application name
73 # application name
74 RDM_APP_NAME = "redMine"
74 RDM_APP_NAME = "redMine"
75 # application version
75 # application version
76 RDM_APP_VERSION = "0.1.0"
76 RDM_APP_VERSION = "0.2.0"
77 # application host name
77 # application host name
78 RDM_HOST_NAME = "somenet.foo"
78 RDM_HOST_NAME = "somenet.foo"
79 # file storage path
79 # file storage path
80 RDM_STORAGE_PATH = "#{RAILS_ROOT}/files"
80 RDM_STORAGE_PATH = "#{RAILS_ROOT}/files"
81 # if RDM_LOGIN_REQUIRED is set to true, login is required to access the application
81 # if RDM_LOGIN_REQUIRED is set to true, login is required to access the application
82 RDM_LOGIN_REQUIRED = false
82 RDM_LOGIN_REQUIRED = false
83 # default langage
83 # default langage
84 RDM_DEFAULT_LANG = 'en'
84 RDM_DEFAULT_LANG = 'en'
85
85
@@ -1,21 +1,62
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 # available languages for help pages
19 langs:
20 - fr
21
22 # mapping between controller/action and help pages
23 # if action is not defined here, 'index' page will be displayed
24 pages:
1 # administration
25 # administration
2 admin:
26 admin:
3 index: administration.html
27 index: ch01.html
4 mail_options: administration.html#mail_notifications
28 mail_options: ch01s08.html
5 info: administration.html#app_info
29 info: ch01s09.html
6 users:
30 users:
7 index: administration.html#users
31 index: ch01s01.html
8 roles:
32 roles:
9 index: administration.html#roles
33 index: ch01s02.html
10 workflow: administration.html#workflow
34 workflow: ch01s06.html
11 trackers:
35 trackers:
12 index: administration.html#trackers
36 index: ch01s03.html
13 issue_statuses:
37 issue_statuses:
14 index: administration.html#issue_statuses
38 index: ch01s05.html
15
16 # projects
39 # projects
17 projects:
40 projects:
18 add: projects.html#settings
41 index: ch02.html
19
42 add: ch02s08.html
20
43 show: ch02s01.html
21 # issues No newline at end of file
44 add_document: ch02s06.html
45 list_documents: ch02s06.html
46 add_issue: ch02s02.html
47 list_issues: ch02s02.html
48 add_news: ch02s05.html
49 list_news: ch02s05.html
50 add_file: ch02s07.html
51 list_files: ch02s07.html
52 changelog: ch02s04.html
53 issues:
54 index: ch02s02.html
55 documents:
56 index: ch02s06.html
57 news:
58 index: ch02s05.html
59 versions:
60 index: ch02s08.html
61 reports:
62 index: ch02s03.html No newline at end of file
@@ -1,254 +1,275
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 class Setup < ActiveRecord::Migration
18 class Setup < ActiveRecord::Migration
2 def self.up
19 def self.up
3 create_table "attachments", :force => true do |t|
20 create_table "attachments", :force => true do |t|
4 t.column "container_id", :integer, :default => 0, :null => false
21 t.column "container_id", :integer, :default => 0, :null => false
5 t.column "container_type", :string, :limit => 30, :default => "", :null => false
22 t.column "container_type", :string, :limit => 30, :default => "", :null => false
6 t.column "filename", :string, :default => "", :null => false
23 t.column "filename", :string, :default => "", :null => false
7 t.column "disk_filename", :string, :default => "", :null => false
24 t.column "disk_filename", :string, :default => "", :null => false
8 t.column "size", :integer, :default => 0, :null => false
25 t.column "filesize", :integer, :default => 0, :null => false
9 t.column "content_type", :string, :limit => 60, :default => "", :null => false
26 t.column "content_type", :string, :limit => 60, :default => ""
10 t.column "digest", :string, :limit => 40, :default => "", :null => false
27 t.column "digest", :string, :limit => 40, :default => "", :null => false
11 t.column "downloads", :integer, :default => 0, :null => false
28 t.column "downloads", :integer, :default => 0, :null => false
12 t.column "author_id", :integer, :default => 0, :null => false
29 t.column "author_id", :integer, :default => 0, :null => false
13 t.column "created_on", :timestamp
30 t.column "created_on", :timestamp
14 end
31 end
15
32
16 create_table "custom_fields", :force => true do |t|
33 create_table "custom_fields", :force => true do |t|
17 t.column "name", :string, :limit => 30, :default => "", :null => false
34 t.column "name", :string, :limit => 30, :default => "", :null => false
18 t.column "typ", :integer, :default => 0, :null => false
35 t.column "typ", :integer, :default => 0, :null => false
19 t.column "is_required", :boolean, :default => false, :null => false
36 t.column "is_required", :boolean, :default => false, :null => false
20 t.column "is_for_all", :boolean, :default => false, :null => false
37 t.column "is_for_all", :boolean, :default => false, :null => false
21 t.column "possible_values", :text, :default => "", :null => false
38 t.column "possible_values", :text, :default => ""
22 t.column "regexp", :string, :default => "", :null => false
39 t.column "regexp", :string, :default => ""
23 t.column "min_length", :integer, :default => 0, :null => false
40 t.column "min_length", :integer, :default => 0, :null => false
24 t.column "max_length", :integer, :default => 0, :null => false
41 t.column "max_length", :integer, :default => 0, :null => false
25 end
42 end
26
43
27 create_table "custom_fields_projects", :id => false, :force => true do |t|
44 create_table "custom_fields_projects", :id => false, :force => true do |t|
28 t.column "custom_field_id", :integer, :default => 0, :null => false
45 t.column "custom_field_id", :integer, :default => 0, :null => false
29 t.column "project_id", :integer, :default => 0, :null => false
46 t.column "project_id", :integer, :default => 0, :null => false
30 end
47 end
31
48
32 create_table "custom_values", :force => true do |t|
49 create_table "custom_values", :force => true do |t|
33 t.column "issue_id", :integer, :default => 0, :null => false
50 t.column "issue_id", :integer, :default => 0, :null => false
34 t.column "custom_field_id", :integer, :default => 0, :null => false
51 t.column "custom_field_id", :integer, :default => 0, :null => false
35 t.column "value", :text, :default => "", :null => false
52 t.column "value", :text, :default => "", :null => false
36 end
53 end
37
54
38 add_index "custom_values", ["issue_id"], :name => "custom_values_issue_id"
55 add_index "custom_values", ["issue_id"], :name => "custom_values_issue_id"
39
56
40 create_table "documents", :force => true do |t|
57 create_table "documents", :force => true do |t|
41 t.column "project_id", :integer, :default => 0, :null => false
58 t.column "project_id", :integer, :default => 0, :null => false
42 t.column "category_id", :integer, :default => 0, :null => false
59 t.column "category_id", :integer, :default => 0, :null => false
43 t.column "title", :string, :limit => 60, :default => "", :null => false
60 t.column "title", :string, :limit => 60, :default => "", :null => false
44 t.column "descr", :text, :default => "", :null => false
61 t.column "descr", :text, :default => "", :null => false
45 t.column "created_on", :timestamp
62 t.column "created_on", :timestamp
46 end
63 end
47
64
48 create_table "enumerations", :force => true do |t|
65 create_table "enumerations", :force => true do |t|
49 t.column "opt", :string, :limit => 4, :default => "", :null => false
66 t.column "opt", :string, :limit => 4, :default => "", :null => false
50 t.column "name", :string, :limit => 30, :default => "", :null => false
67 t.column "name", :string, :limit => 30, :default => "", :null => false
51 end
68 end
52
69
53 create_table "issue_categories", :force => true do |t|
70 create_table "issue_categories", :force => true do |t|
54 t.column "project_id", :integer, :default => 0, :null => false
71 t.column "project_id", :integer, :default => 0, :null => false
55 t.column "name", :string, :limit => 30, :default => "", :null => false
72 t.column "name", :string, :limit => 30, :default => "", :null => false
56 end
73 end
57
74
58 create_table "issue_histories", :force => true do |t|
75 create_table "issue_histories", :force => true do |t|
59 t.column "issue_id", :integer, :default => 0, :null => false
76 t.column "issue_id", :integer, :default => 0, :null => false
60 t.column "status_id", :integer, :default => 0, :null => false
77 t.column "status_id", :integer, :default => 0, :null => false
61 t.column "author_id", :integer, :default => 0, :null => false
78 t.column "author_id", :integer, :default => 0, :null => false
62 t.column "notes", :text, :default => "", :null => false
79 t.column "notes", :text, :default => ""
63 t.column "created_on", :timestamp
80 t.column "created_on", :timestamp
64 end
81 end
65
82
66 add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
83 add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
67
84
68 create_table "issue_statuses", :force => true do |t|
85 create_table "issue_statuses", :force => true do |t|
69 t.column "name", :string, :limit => 30, :default => "", :null => false
86 t.column "name", :string, :limit => 30, :default => "", :null => false
70 t.column "is_closed", :boolean, :default => false, :null => false
87 t.column "is_closed", :boolean, :default => false, :null => false
71 t.column "is_default", :boolean, :default => false, :null => false
88 t.column "is_default", :boolean, :default => false, :null => false
72 t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
89 t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
73 end
90 end
74
91
75 create_table "issues", :force => true do |t|
92 create_table "issues", :force => true do |t|
76 t.column "tracker_id", :integer, :default => 0, :null => false
93 t.column "tracker_id", :integer, :default => 0, :null => false
77 t.column "project_id", :integer, :default => 0, :null => false
94 t.column "project_id", :integer, :default => 0, :null => false
78 t.column "subject", :string, :default => "", :null => false
95 t.column "subject", :string, :default => "", :null => false
79 t.column "descr", :text, :default => "", :null => false
96 t.column "descr", :text, :default => "", :null => false
80 t.column "category_id", :integer
97 t.column "category_id", :integer
81 t.column "status_id", :integer, :default => 0, :null => false
98 t.column "status_id", :integer, :default => 0, :null => false
82 t.column "assigned_to_id", :integer
99 t.column "assigned_to_id", :integer
83 t.column "priority_id", :integer, :default => 0, :null => false
100 t.column "priority_id", :integer, :default => 0, :null => false
84 t.column "fixed_version_id", :integer
101 t.column "fixed_version_id", :integer
85 t.column "author_id", :integer, :default => 0, :null => false
102 t.column "author_id", :integer, :default => 0, :null => false
86 t.column "created_on", :timestamp
103 t.column "created_on", :timestamp
87 t.column "updated_on", :timestamp
104 t.column "updated_on", :timestamp
88 end
105 end
89
106
90 add_index "issues", ["project_id"], :name => "issues_project_id"
107 add_index "issues", ["project_id"], :name => "issues_project_id"
91
108
92 create_table "members", :force => true do |t|
109 create_table "members", :force => true do |t|
93 t.column "user_id", :integer, :default => 0, :null => false
110 t.column "user_id", :integer, :default => 0, :null => false
94 t.column "project_id", :integer, :default => 0, :null => false
111 t.column "project_id", :integer, :default => 0, :null => false
95 t.column "role_id", :integer, :default => 0, :null => false
112 t.column "role_id", :integer, :default => 0, :null => false
96 t.column "created_on", :timestamp
113 t.column "created_on", :timestamp
97 end
114 end
98
115
99 create_table "news", :force => true do |t|
116 create_table "news", :force => true do |t|
100 t.column "project_id", :integer
117 t.column "project_id", :integer
101 t.column "title", :string, :limit => 60, :default => "", :null => false
118 t.column "title", :string, :limit => 60, :default => "", :null => false
102 t.column "shortdescr", :string, :default => "", :null => false
119 t.column "shortdescr", :string, :default => ""
103 t.column "descr", :text, :default => "", :null => false
120 t.column "descr", :text, :default => "", :null => false
104 t.column "author_id", :integer, :default => 0, :null => false
121 t.column "author_id", :integer, :default => 0, :null => false
105 t.column "created_on", :timestamp
122 t.column "created_on", :timestamp
106 end
123 end
107
124
108 create_table "permissions", :force => true do |t|
125 create_table "permissions", :force => true do |t|
109 t.column "controller", :string, :limit => 30, :default => "", :null => false
126 t.column "controller", :string, :limit => 30, :default => "", :null => false
110 t.column "action", :string, :limit => 30, :default => "", :null => false
127 t.column "action", :string, :limit => 30, :default => "", :null => false
111 t.column "descr", :string, :limit => 60, :default => "", :null => false
128 t.column "descr", :string, :limit => 60, :default => "", :null => false
112 t.column "public", :boolean, :default => false, :null => false
129 t.column "is_public", :boolean, :default => false, :null => false
113 t.column "sort", :integer, :default => 0, :null => false
130 t.column "sort", :integer, :default => 0, :null => false
114 t.column "mail_option", :boolean, :default => false, :null => false
131 t.column "mail_option", :boolean, :default => false, :null => false
115 t.column "mail_enabled", :boolean, :default => false, :null => false
132 t.column "mail_enabled", :boolean, :default => false, :null => false
116 end
133 end
117
134
118 create_table "permissions_roles", :id => false, :force => true do |t|
135 create_table "permissions_roles", :id => false, :force => true do |t|
119 t.column "permission_id", :integer, :default => 0, :null => false
136 t.column "permission_id", :integer, :default => 0, :null => false
120 t.column "role_id", :integer, :default => 0, :null => false
137 t.column "role_id", :integer, :default => 0, :null => false
121 end
138 end
122
139
123 add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
140 add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
124
141
125 create_table "projects", :force => true do |t|
142 create_table "projects", :force => true do |t|
126 t.column "name", :string, :limit => 30, :default => "", :null => false
143 t.column "name", :string, :limit => 30, :default => "", :null => false
127 t.column "descr", :string, :default => "", :null => false
144 t.column "descr", :string, :default => "", :null => false
128 t.column "homepage", :string, :limit => 60, :default => "", :null => false
145 t.column "homepage", :string, :limit => 60, :default => ""
129 t.column "public", :boolean, :default => true, :null => false
146 t.column "is_public", :boolean, :default => true, :null => false
147 t.column "parent_id", :integer
148 t.column "projects_count", :integer, :default => 0
130 t.column "created_on", :timestamp
149 t.column "created_on", :timestamp
131 t.column "updated_on", :timestamp
150 t.column "updated_on", :timestamp
132 end
151 end
133
152
134 create_table "roles", :force => true do |t|
153 create_table "roles", :force => true do |t|
135 t.column "name", :string, :limit => 30, :default => "", :null => false
154 t.column "name", :string, :limit => 30, :default => "", :null => false
136 end
155 end
137
156
138 create_table "trackers", :force => true do |t|
157 create_table "trackers", :force => true do |t|
139 t.column "name", :string, :limit => 30, :default => "", :null => false
158 t.column "name", :string, :limit => 30, :default => "", :null => false
140 t.column "is_in_chlog", :boolean, :default => false, :null => false
159 t.column "is_in_chlog", :boolean, :default => false, :null => false
141 end
160 end
142
161
143 create_table "users", :force => true do |t|
162 create_table "users", :force => true do |t|
144 t.column "login", :string, :limit => 30, :default => "", :null => false
163 t.column "login", :string, :limit => 30, :default => "", :null => false
145 t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
164 t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
146 t.column "firstname", :string, :limit => 30, :default => "", :null => false
165 t.column "firstname", :string, :limit => 30, :default => "", :null => false
147 t.column "lastname", :string, :limit => 30, :default => "", :null => false
166 t.column "lastname", :string, :limit => 30, :default => "", :null => false
148 t.column "mail", :string, :limit => 60, :default => "", :null => false
167 t.column "mail", :string, :limit => 60, :default => "", :null => false
149 t.column "mail_notification", :boolean, :default => true, :null => false
168 t.column "mail_notification", :boolean, :default => true, :null => false
150 t.column "admin", :boolean, :default => false, :null => false
169 t.column "admin", :boolean, :default => false, :null => false
151 t.column "locked", :boolean, :default => false, :null => false
170 t.column "locked", :boolean, :default => false, :null => false
152 t.column "last_login_on", :datetime
171 t.column "last_login_on", :datetime
153 t.column "language", :string, :limit => 2, :default => "", :null => false
172 t.column "language", :string, :limit => 2, :default => "", :null => false
154 t.column "created_on", :timestamp
173 t.column "created_on", :timestamp
155 t.column "updated_on", :timestamp
174 t.column "updated_on", :timestamp
156 end
175 end
157
176
158 create_table "versions", :force => true do |t|
177 create_table "versions", :force => true do |t|
159 t.column "project_id", :integer, :default => 0, :null => false
178 t.column "project_id", :integer, :default => 0, :null => false
160 t.column "name", :string, :limit => 30, :default => "", :null => false
179 t.column "name", :string, :limit => 30, :default => "", :null => false
161 t.column "descr", :string, :default => "", :null => false
180 t.column "descr", :string, :default => ""
162 t.column "date", :date, :null => false
181 t.column "effective_date", :date, :null => false
163 t.column "created_on", :timestamp
182 t.column "created_on", :timestamp
164 t.column "updated_on", :timestamp
183 t.column "updated_on", :timestamp
165 end
184 end
166
185
167 create_table "workflows", :force => true do |t|
186 create_table "workflows", :force => true do |t|
168 t.column "tracker_id", :integer, :default => 0, :null => false
187 t.column "tracker_id", :integer, :default => 0, :null => false
169 t.column "old_status_id", :integer, :default => 0, :null => false
188 t.column "old_status_id", :integer, :default => 0, :null => false
170 t.column "new_status_id", :integer, :default => 0, :null => false
189 t.column "new_status_id", :integer, :default => 0, :null => false
171 t.column "role_id", :integer, :default => 0, :null => false
190 t.column "role_id", :integer, :default => 0, :null => false
172 end
191 end
173
192
174 # project
193 # project
175 Permission.create :controller => "projects", :action => "show", :descr => "Overview", :sort => 100, :public => true
194 Permission.create :controller => "projects", :action => "show", :descr => "Overview", :sort => 100, :is_public => true
176 Permission.create :controller => "projects", :action => "changelog", :descr => "View change log", :sort => 105, :public => true
195 Permission.create :controller => "projects", :action => "changelog", :descr => "View change log", :sort => 105, :is_public => true
177 Permission.create :controller => "reports", :action => "issue_report", :descr => "View reports", :sort => 110, :public => true
196 Permission.create :controller => "reports", :action => "issue_report", :descr => "View reports", :sort => 110, :is_public => true
178 Permission.create :controller => "projects", :action => "settings", :descr => "Settings", :sort => 150
197 Permission.create :controller => "projects", :action => "settings", :descr => "Settings", :sort => 150
179 Permission.create :controller => "projects", :action => "edit", :descr => "Edit", :sort => 151
198 Permission.create :controller => "projects", :action => "edit", :descr => "Edit", :sort => 151
180 # members
199 # members
181 Permission.create :controller => "projects", :action => "list_members", :descr => "View list", :sort => 200, :public => true
200 Permission.create :controller => "projects", :action => "list_members", :descr => "View list", :sort => 200, :is_public => true
182 Permission.create :controller => "projects", :action => "add_member", :descr => "New member", :sort => 220
201 Permission.create :controller => "projects", :action => "add_member", :descr => "New member", :sort => 220
183 Permission.create :controller => "members", :action => "edit", :descr => "Edit", :sort => 221
202 Permission.create :controller => "members", :action => "edit", :descr => "Edit", :sort => 221
184 Permission.create :controller => "members", :action => "destroy", :descr => "Delete", :sort => 222
203 Permission.create :controller => "members", :action => "destroy", :descr => "Delete", :sort => 222
185 # versions
204 # versions
186 Permission.create :controller => "projects", :action => "add_version", :descr => "New version", :sort => 320
205 Permission.create :controller => "projects", :action => "add_version", :descr => "New version", :sort => 320
187 Permission.create :controller => "versions", :action => "edit", :descr => "Edit", :sort => 321
206 Permission.create :controller => "versions", :action => "edit", :descr => "Edit", :sort => 321
188 Permission.create :controller => "versions", :action => "destroy", :descr => "Delete", :sort => 322
207 Permission.create :controller => "versions", :action => "destroy", :descr => "Delete", :sort => 322
189 # issue categories
208 # issue categories
190 Permission.create :controller => "projects", :action => "add_issue_category", :descr => "New issue category", :sort => 420
209 Permission.create :controller => "projects", :action => "add_issue_category", :descr => "New issue category", :sort => 420
191 Permission.create :controller => "issue_categories", :action => "edit", :descr => "Edit", :sort => 421
210 Permission.create :controller => "issue_categories", :action => "edit", :descr => "Edit", :sort => 421
192 Permission.create :controller => "issue_categories", :action => "destroy", :descr => "Delete", :sort => 422
211 Permission.create :controller => "issue_categories", :action => "destroy", :descr => "Delete", :sort => 422
193 # issues
212 # issues
194 Permission.create :controller => "projects", :action => "list_issues", :descr => "View list", :sort => 1000, :public => true
213 Permission.create :controller => "projects", :action => "list_issues", :descr => "View list", :sort => 1000, :is_public => true
195 Permission.create :controller => "issues", :action => "show", :descr => "View", :sort => 1005, :public => true
214 Permission.create :controller => "issues", :action => "show", :descr => "View", :sort => 1005, :is_public => true
196 Permission.create :controller => "issues", :action => "download", :descr => "Download file", :sort => 1010, :public => true
215 Permission.create :controller => "issues", :action => "download", :descr => "Download file", :sort => 1010, :is_public => true
197 Permission.create :controller => "projects", :action => "add_issue", :descr => "Report an issue", :sort => 1050, :mail_option => 1, :mail_enabled => 1
216 Permission.create :controller => "projects", :action => "add_issue", :descr => "Report an issue", :sort => 1050, :mail_option => 1, :mail_enabled => 1
198 Permission.create :controller => "issues", :action => "edit", :descr => "Edit", :sort => 1055
217 Permission.create :controller => "issues", :action => "edit", :descr => "Edit", :sort => 1055
199 Permission.create :controller => "issues", :action => "change_status", :descr => "Change status", :sort => 1060, :mail_option => 1, :mail_enabled => 1
218 Permission.create :controller => "issues", :action => "change_status", :descr => "Change status", :sort => 1060, :mail_option => 1, :mail_enabled => 1
200 Permission.create :controller => "issues", :action => "destroy", :descr => "Delete", :sort => 1065
219 Permission.create :controller => "issues", :action => "destroy", :descr => "Delete", :sort => 1065
201 Permission.create :controller => "issues", :action => "add_attachment", :descr => "Add file", :sort => 1070
220 Permission.create :controller => "issues", :action => "add_attachment", :descr => "Add file", :sort => 1070
202 Permission.create :controller => "issues", :action => "destroy_attachment", :descr => "Delete file", :sort => 1075
221 Permission.create :controller => "issues", :action => "destroy_attachment", :descr => "Delete file", :sort => 1075
203 # news
222 # news
204 Permission.create :controller => "projects", :action => "list_news", :descr => "View list", :sort => 1100, :public => true
223 Permission.create :controller => "projects", :action => "list_news", :descr => "View list", :sort => 1100, :is_public => true
205 Permission.create :controller => "news", :action => "show", :descr => "View", :sort => 1101, :public => true
224 Permission.create :controller => "news", :action => "show", :descr => "View", :sort => 1101, :is_public => true
206 Permission.create :controller => "projects", :action => "add_news", :descr => "Add", :sort => 1120
225 Permission.create :controller => "projects", :action => "add_news", :descr => "Add", :sort => 1120
207 Permission.create :controller => "news", :action => "edit", :descr => "Edit", :sort => 1121
226 Permission.create :controller => "news", :action => "edit", :descr => "Edit", :sort => 1121
208 Permission.create :controller => "news", :action => "destroy", :descr => "Delete", :sort => 1122
227 Permission.create :controller => "news", :action => "destroy", :descr => "Delete", :sort => 1122
209 # documents
228 # documents
210 Permission.create :controller => "projects", :action => "list_documents", :descr => "View list", :sort => 1200, :public => true
229 Permission.create :controller => "projects", :action => "list_documents", :descr => "View list", :sort => 1200, :is_public => true
211 Permission.create :controller => "documents", :action => "show", :descr => "View", :sort => 1201, :public => true
230 Permission.create :controller => "documents", :action => "show", :descr => "View", :sort => 1201, :is_public => true
212 Permission.create :controller => "documents", :action => "download", :descr => "Download", :sort => 1202, :public => true
231 Permission.create :controller => "documents", :action => "download", :descr => "Download", :sort => 1202, :is_public => true
213 Permission.create :controller => "projects", :action => "add_document", :descr => "Add", :sort => 1220
232 Permission.create :controller => "projects", :action => "add_document", :descr => "Add", :sort => 1220
214 Permission.create :controller => "documents", :action => "edit", :descr => "Edit", :sort => 1221
233 Permission.create :controller => "documents", :action => "edit", :descr => "Edit", :sort => 1221
215 Permission.create :controller => "documents", :action => "destroy", :descr => "Delete", :sort => 1222
234 Permission.create :controller => "documents", :action => "destroy", :descr => "Delete", :sort => 1222
216 Permission.create :controller => "documents", :action => "add_attachment", :descr => "Add file", :sort => 1223
235 Permission.create :controller => "documents", :action => "add_attachment", :descr => "Add file", :sort => 1223
217 Permission.create :controller => "documents", :action => "destroy_attachment", :descr => "Delete file", :sort => 1224
236 Permission.create :controller => "documents", :action => "destroy_attachment", :descr => "Delete file", :sort => 1224
218 # files
237 # files
219 Permission.create :controller => "projects", :action => "list_files", :descr => "View list", :sort => 1300, :public => true
238 Permission.create :controller => "projects", :action => "list_files", :descr => "View list", :sort => 1300, :is_public => true
220 Permission.create :controller => "versions", :action => "download", :descr => "Download", :sort => 1301, :public => true
239 Permission.create :controller => "versions", :action => "download", :descr => "Download", :sort => 1301, :is_public => true
221 Permission.create :controller => "projects", :action => "add_file", :descr => "Add", :sort => 1320
240 Permission.create :controller => "projects", :action => "add_file", :descr => "Add", :sort => 1320
222 Permission.create :controller => "versions", :action => "destroy_file", :descr => "Delete", :sort => 1322
241 Permission.create :controller => "versions", :action => "destroy_file", :descr => "Delete", :sort => 1322
223
242
224 # create default administrator account
243 # create default administrator account
225 user = User.create :login => "admin", :password => "admin", :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en"
244 user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en"
245 user.login = "admin"
246 user.password = "admin"
226 user.admin = true
247 user.admin = true
227 user.save
248 user.save
228
249
229
250
230 end
251 end
231
252
232 def self.down
253 def self.down
233 drop_table :attachments
254 drop_table :attachments
234 drop_table :custom_fields
255 drop_table :custom_fields
235 drop_table :custom_fields_projects
256 drop_table :custom_fields_projects
236 drop_table :custom_values
257 drop_table :custom_values
237 drop_table :documents
258 drop_table :documents
238 drop_table :enumerations
259 drop_table :enumerations
239 drop_table :issue_categories
260 drop_table :issue_categories
240 drop_table :issue_histories
261 drop_table :issue_histories
241 drop_table :issue_statuses
262 drop_table :issue_statuses
242 drop_table :issues
263 drop_table :issues
243 drop_table :members
264 drop_table :members
244 drop_table :news
265 drop_table :news
245 drop_table :permissions
266 drop_table :permissions
246 drop_table :permissions_roles
267 drop_table :permissions_roles
247 drop_table :projects
268 drop_table :projects
248 drop_table :roles
269 drop_table :roles
249 drop_table :trackers
270 drop_table :trackers
250 drop_table :users
271 drop_table :users
251 drop_table :versions
272 drop_table :versions
252 drop_table :workflows
273 drop_table :workflows
253 end
274 end
254 end
275 end
@@ -1,44 +1,61
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 class DefaultConfiguration < ActiveRecord::Migration
18 class DefaultConfiguration < ActiveRecord::Migration
2 def self.up
19 def self.up
3 # roles
20 # roles
4 r = Role.create(:name => "Manager")
21 r = Role.create(:name => "Manager")
5 r.permissions = Permission.find(:all)
22 r.permissions = Permission.find(:all)
6 r = Role.create :name => "Developer"
23 r = Role.create :name => "Developer"
7 r.permissions = Permission.find([1, 2, 3, 6, 10, 11, 12, 16, 17, 18, 19, 20, 21, 23, 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41])
24 r.permissions = Permission.find(:all)
8 r = Role.create :name => "Reporter"
25 r = Role.create :name => "Reporter"
9 r.permissions = Permission.find([1, 2, 3, 6, 16, 17, 18, 19, 20, 21, 23, 25, 26, 30, 31, 32, 38, 39])
26 r.permissions = Permission.find(:all)
10 # trackers
27 # trackers
11 Tracker.create(:name => "Bug", :is_in_chlog => true)
28 Tracker.create(:name => "Bug", :is_in_chlog => true)
12 Tracker.create(:name => "Feature request", :is_in_chlog => true)
29 Tracker.create(:name => "Feature request", :is_in_chlog => true)
13 Tracker.create(:name => "Support request", :is_in_chlog => false)
30 Tracker.create(:name => "Support request", :is_in_chlog => false)
14 # issue statuses
31 # issue statuses
15 IssueStatus.create(:name => "New", :is_closed => false, :is_default => true, :html_color => 'F98787')
32 IssueStatus.create(:name => "New", :is_closed => false, :is_default => true, :html_color => 'F98787')
16 IssueStatus.create(:name => "Assigned", :is_closed => false, :is_default => false, :html_color => 'C0C0FF')
33 IssueStatus.create(:name => "Assigned", :is_closed => false, :is_default => false, :html_color => 'C0C0FF')
17 IssueStatus.create(:name => "Resolved", :is_closed => false, :is_default => false, :html_color => '88E0B3')
34 IssueStatus.create(:name => "Resolved", :is_closed => false, :is_default => false, :html_color => '88E0B3')
18 IssueStatus.create(:name => "Feedback", :is_closed => false, :is_default => false, :html_color => 'F3A4F4')
35 IssueStatus.create(:name => "Feedback", :is_closed => false, :is_default => false, :html_color => 'F3A4F4')
19 IssueStatus.create(:name => "Closed", :is_closed => true, :is_default => false, :html_color => 'DBDBDB')
36 IssueStatus.create(:name => "Closed", :is_closed => true, :is_default => false, :html_color => 'DBDBDB')
20 IssueStatus.create(:name => "Rejected", :is_closed => true, :is_default => false, :html_color => 'F5C28B')
37 IssueStatus.create(:name => "Rejected", :is_closed => true, :is_default => false, :html_color => 'F5C28B')
21 # workflow
38 # workflow
22 Tracker.find(:all).each { |t|
39 Tracker.find(:all).each { |t|
23 Role.find(:all).each { |r|
40 Role.find(:all).each { |r|
24 IssueStatus.find(:all).each { |os|
41 IssueStatus.find(:all).each { |os|
25 IssueStatus.find(:all).each { |ns|
42 IssueStatus.find(:all).each { |ns|
26 Workflow.create(:tracker_id => t.id, :role_id => r.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns
43 Workflow.create(:tracker_id => t.id, :role_id => r.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns
27 }
44 }
28 }
45 }
29 }
46 }
30 }
47 }
31 # enumeartions
48 # enumeartions
32 Enumeration.create(:opt => "DCAT", :name => 'Uncategorized')
49 Enumeration.create(:opt => "DCAT", :name => 'Uncategorized')
33 Enumeration.create(:opt => "DCAT", :name => 'User documentation')
50 Enumeration.create(:opt => "DCAT", :name => 'User documentation')
34 Enumeration.create(:opt => "DCAT", :name => 'Technical documentation')
51 Enumeration.create(:opt => "DCAT", :name => 'Technical documentation')
35 Enumeration.create(:opt => "IPRI", :name => 'Low')
52 Enumeration.create(:opt => "IPRI", :name => 'Low')
36 Enumeration.create(:opt => "IPRI", :name => 'Normal')
53 Enumeration.create(:opt => "IPRI", :name => 'Normal')
37 Enumeration.create(:opt => "IPRI", :name => 'High')
54 Enumeration.create(:opt => "IPRI", :name => 'High')
38 Enumeration.create(:opt => "IPRI", :name => 'Urgent')
55 Enumeration.create(:opt => "IPRI", :name => 'Urgent')
39 Enumeration.create(:opt => "IPRI", :name => 'Immediate')
56 Enumeration.create(:opt => "IPRI", :name => 'Immediate')
40 end
57 end
41
58
42 def self.down
59 def self.down
43 end
60 end
44 end
61 end
@@ -1,25 +1,34
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.sourceforge.net/
5 http://redmine.org/
6
6
7
7
8 == xx/xx/2006
8 == 07/09/2006 - v0.2.0
9
9
10 * More filter options in issues list
10 * new databases supported: Oracle, PostgreSQL, SQL Server
11 * Issues list exportable to CSV
11 * projects/subprojects hierarchy (1 level of subprojects only)
12 * environment information display in admin/info
13 * more filter options in issues list (rev6)
14 * default language based on browser settings (Accept-Language HTTP header)
15 * issues list exportable to CSV (rev6)
16 * simple_format and auto_link on long text fields
17 * more data validations
18 * Fixed: error when all mail notifications are unchecked in admin/mail_options
19 * Fixed: all project news are displayed on project summary
20 * Fixed: Can't change user password in users/edit
12 * Fixed: Error on tables creation with PostgreSQL (rev5)
21 * Fixed: Error on tables creation with PostgreSQL (rev5)
13 * Fixed: SQL error in "issue reports" view with PostgreSQL (rev5)
22 * Fixed: SQL error in "issue reports" view with PostgreSQL (rev5)
14
23
15
24
16 == 06/25/2006 - v0.1.0
25 == 06/25/2006 - v0.1.0
17
26
18 * multiple users/multiple projects
27 * multiple users/multiple projects
19 * role based access control
28 * role based access control
20 * issue tracking system
29 * issue tracking system
21 * fully customizable workflow
30 * fully customizable workflow
22 * documents/files repository
31 * documents/files repository
23 * email notifications on issue creation and update
32 * email notifications on issue creation and update
24 * multilanguage support (except for error messages):english, french, spanish
33 * multilanguage support (except for error messages):english, french, spanish
25 * online manual in french (unfinished) No newline at end of file
34 * online manual in french (unfinished)
@@ -1,61 +1,69
1 == redMine installation
1 == redMine installation
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.sourceforge.net/
5 http://redmine.org/
6
6
7
7
8 == Requirements
8 == Requirements
9
9
10 * Ruby on Rails 1.1
10 * Ruby on Rails 1.1
11 * Any database supported by Rails (developped using MySQL 5)
11 * a database (see compatibility below)
12 * (recommended) Apache/Lighttpd with FCGI support
12 * (recommended) Apache/Lighttpd with FCGI support
13
13
14 Supported databases:
15
16 * MySQL (tested with MySQL 5)
17 * PostgreSQL (tested with PostgreSQL 8.1)
18 * Oracle (tested with Oracle 10g)
19 * SQL Server (tested with SQL Server 2005)
20 * SQLite (tested with SQLite 3)
21
14
22
15 == Installation
23 == Installation
16
24
17 1. Uncompress program archive:
25 1. Uncompress program archive:
18 tar zxvf <filename>
26 tar zxvf <filename>
19
27
20 2. Create an empty database: "redmine" for example
28 2. Create an empty database: "redmine" for example
21
29
22 3. Configure database parameters in config/database.yml
30 3. Configure database parameters in config/database.yml
23 for "production" environment
31 for "production" environment (default database is MySQL)
24
32
25 4. Create database structure. Under application main directory:
33 4. Create the database structure. Under application main directory:
26 rake migrate RAILS_ENV="production"
34 rake migrate RAILS_ENV="production"
27 It will create tables and default configuration data
35 It will create tables and default configuration data
28
36
29 5. Test the installation by running WEBrick web server:
37 5. Test the installation by running WEBrick web server:
30 ruby script/server -e production
38 ruby script/server -e production
31
39
32 Once WEBrick has started, point your browser to http://localhost:3000/
40 Once WEBrick has started, point your browser to http://localhost:3000/
33 You should now see the application welcome page
41 You should now see the application welcome page
34
42
35 6. Use default administrator account to log in:
43 6. Use default administrator account to log in:
36 login: admin
44 login: admin
37 password: admin
45 password: admin
38
46
39 7. Setup Apache or Lighttpd with fastcgi for best performance.
47 7. Setup Apache or Lighttpd with fastcgi for best performance.
40
48
41
49
42 == Configuration
50 == Configuration
43
51
44 You can setup a few things in config/environment.rb:
52 You can setup a few things in config/environment.rb:
45 Don't forget to restart the application after any change.
53 Don't forget to restart the application after any change.
46
54
47
55
48 config.action_mailer.server_settings: SMTP server configuration
56 config.action_mailer.server_settings: SMTP server configuration
49 config.action_mailer.perform_deliveries: set to false to disable mail delivering
57 config.action_mailer.perform_deliveries: set to false to disable mail delivering
50
58
51 RDM_HOST_NAME: hostname used to provide urls in notification mails
59 RDM_HOST_NAME: hostname used to provide urls in notification mails
52
60
53 RDM_STORAGE_PATH: path for all attachments storage (default: "#{RAILS_ROOT}/files")
61 RDM_STORAGE_PATH: path for all attachments storage (default: "#{RAILS_ROOT}/files")
54 "#{RAILS_ROOT}/" represents application main directory
62 "#{RAILS_ROOT}/" represents application main directory
55
63
56 RDM_LOGIN_REQUIRED: set to true if you want to force users to login to access
64 RDM_LOGIN_REQUIRED: set to true if you want to force users to login to access
57 any part of the application (default: false)
65 any part of the application (default: false)
58
66
59 RDM_DEFAULT_LANG: default language for anonymous users: 'en' (default), 'es', 'fr' available
67 RDM_DEFAULT_LANG: default language for anonymous users: 'en' (default), 'es', 'fr' available
60
68
61
69
@@ -1,49 +1,55
1 == redMine
1 == redMine
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.sourceforge.net/
5 http://redmine.org/
6
6
7 == License
7 == License
8
8
9 This program is free software; you can redistribute it and/or
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
12 of the License, or (at your option) any later version.
13
13
14 This program is distributed in the hope that it will be useful,
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
17 GNU General Public License for more details.
18
18
19 You should have received a copy of the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
22
23
23
24 == Main features
24 == Main features
25
25
26 redMine is a project management software written using Ruby on Rails.
26 redMine is a project management software written using Ruby on Rails.
27
27
28 * multiple users/projects
28 * multiple users/projects
29 * fully customizable role based access control
29 * fully customizable role based access control
30 * issue tracking system
30 * issue tracking system
31 * fully customizable workflow
31 * fully customizable workflow
32 * documents/files repository
32 * documents/files repository
33 * email notifications
33 * email notifications
34 * multilanguage support
34 * multilanguage support
35
35
36
36
37 == User documentation
38
39 User documentation for redMine is written using DocBook XML format.
40 It's also avaible as HTML files in /public/manual (contextual help)
41
42
37 == Versioning
43 == Versioning
38
44
39 redMine versioning scheme is major.minor.revision
45 redMine versioning scheme is major.minor.revision
40 Versions before 1.0.0 must be considered as beta versions and upgrading support
46 Versions before 1.0.0 must be considered as beta versions and upgrading support
41 may not be provided for these versions.
47 may not be provided for these versions.
42
48
43
49
44 == Credits
50 == Credits
45
51
46 * Jean-Francois Boutier (spanish translation)
52 * Jean-Francois Boutier (spanish translation)
47 * Andreas Viklund (open source XHTML layout, http://andreasviklund.com/)
53 * Andreas Viklund (open source XHTML layout, http://andreasviklund.com/)
48
54
49
55
@@ -1,316 +1,324
1 Localization.define('fr', 'Français') do |l|
1 Localization.define('fr', 'Français') do |l|
2
2
3 # trackers
3 # trackers
4 l.store 'Bug', 'Anomalie'
4 l.store 'Bug', 'Anomalie'
5 l.store 'Feature request', 'Evolution'
5 l.store 'Feature request', 'Evolution'
6 l.store 'Support request', 'Assistance'
6 l.store 'Support request', 'Assistance'
7 # issue statuses
7 # issue statuses
8 l.store 'New', 'Nouveau'
8 l.store 'New', 'Nouveau'
9 l.store 'Assigned', 'Assignée'
9 l.store 'Assigned', 'Assignée'
10 l.store 'Resolved', 'Résolue'
10 l.store 'Resolved', 'Résolue'
11 l.store 'Closed', 'Fermée'
11 l.store 'Closed', 'Fermée'
12 l.store 'Rejected', 'Rejetée'
12 l.store 'Rejected', 'Rejetée'
13 l.store 'Feedback', 'Commentaire'
13 l.store 'Feedback', 'Commentaire'
14 # filters
15 l.store '[All]', '[Tous]'
16 l.store '[Open]', '[Ouvert]'
17 l.store '[None]', '[Aucun]'
14
18
15 # issue priorities
19 # issue priorities
16 l.store 'Issue priorities', 'Priorités des demandes'
20 l.store 'Issue priorities', 'Priorités des demandes'
17 l.store 'Low', 'Bas'
21 l.store 'Low', 'Bas'
18 l.store 'Normal', 'Normal'
22 l.store 'Normal', 'Normal'
19 l.store 'High', 'Haut'
23 l.store 'High', 'Haut'
20 l.store 'Urgent', 'Urgent'
24 l.store 'Urgent', 'Urgent'
21 l.store 'Immediate', 'Immédiat'
25 l.store 'Immediate', 'Immédiat'
22 # document categories
26 # document categories
23 l.store 'Document categories', 'Catégories de documents'
27 l.store 'Document categories', 'Catégories de documents'
24 l.store 'Uncategorized', 'Sans catégorie'
28 l.store 'Uncategorized', 'Sans catégorie'
25 l.store 'User documentation', 'Documentation utilisateur'
29 l.store 'User documentation', 'Documentation utilisateur'
26 l.store 'Technical documentation', 'Documentation technique'
30 l.store 'Technical documentation', 'Documentation technique'
27 # dates
31 # dates
28 l.store '(date)', lambda { |t| t.strftime('%d/%m/%Y') }
32 l.store '(date)', lambda { |t| t.strftime('%d/%m/%Y') }
29 l.store '(time)', lambda { |t| t.strftime('%d/%m/%Y %H:%M') }
33 l.store '(time)', lambda { |t| t.strftime('%d/%m/%Y %H:%M') }
30
34
31 # ./script/../config/../app/views/account/login.rhtml
35 # ./script/../config/../app/views/account/login.rhtml
32
36
33 # ./script/../config/../app/views/account/my_account.rhtml
37 # ./script/../config/../app/views/account/my_account.rhtml
34 l.store 'My account', 'Mon compte'
38 l.store 'My account', 'Mon compte'
35 l.store 'Login', 'Identifiant'
39 l.store 'Login', 'Identifiant'
36 l.store 'Created on', 'Crée le'
40 l.store 'Created on', 'Crée le'
37 l.store 'Last update', 'Mis à jour'
41 l.store 'Last update', 'Mis à jour'
38 l.store 'Information', 'Informations'
42 l.store 'Information', 'Informations'
39 l.store 'Firstname', 'Prénom'
43 l.store 'Firstname', 'Prénom'
40 l.store 'Lastname', 'Nom'
44 l.store 'Lastname', 'Nom'
41 l.store 'Mail', 'Mail'
45 l.store 'Mail', 'Mail'
42 l.store 'Language', 'Langue'
46 l.store 'Language', 'Langue'
43 l.store 'Mail notifications', 'Notifications par mail'
47 l.store 'Mail notifications', 'Notifications par mail'
44 l.store 'Save', 'Valider'
48 l.store 'Save', 'Valider'
45 l.store 'Password', 'Mot de passe'
49 l.store 'Password', 'Mot de passe'
46 l.store 'New password', 'Nouveau mot de passe'
50 l.store 'New password', 'Nouveau mot de passe'
47 l.store 'Confirmation', 'Confirmation'
51 l.store 'Confirmation', 'Confirmation'
48
52
49 # ./script/../config/../app/views/account/my_page.rhtml
53 # ./script/../config/../app/views/account/my_page.rhtml
50 l.store 'My page', 'Ma page'
54 l.store 'My page', 'Ma page'
51 l.store 'Welcome', 'Bienvenue'
55 l.store 'Welcome', 'Bienvenue'
52 l.store 'Last login', 'Dernière connexion'
56 l.store 'Last login', 'Dernière connexion'
53 l.store 'Reported issues', 'Demandes soumises'
57 l.store 'Reported issues', 'Demandes soumises'
54 l.store 'Assigned to me', 'Demandes qui me sont assignées'
58 l.store 'Assigned to me', 'Demandes qui me sont assignées'
55
59
60 # ./script/../config/../app/views/account/login.rhtml
61 l.store 'Please login', 'Identification'
62
56 # ./script/../config/../app/views/account/show.rhtml
63 # ./script/../config/../app/views/account/show.rhtml
57 l.store 'Registered on', 'Inscrit le'
64 l.store 'Registered on', 'Inscrit le'
58 l.store 'Projects', 'Projets'
65 l.store 'Projects', 'Projets'
59 l.store 'Activity', 'Activité'
66 l.store 'Activity', 'Activité'
60
67
61 # ./script/../config/../app/views/admin/index.rhtml
68 # ./script/../config/../app/views/admin/index.rhtml
62 l.store 'Administration', 'Administration'
69 l.store 'Administration', 'Administration'
63 l.store 'Users', 'Utilisateurs'
70 l.store 'Users', 'Utilisateurs'
64 l.store 'Roles and permissions', 'Rôles et permissions'
71 l.store 'Roles and permissions', 'Rôles et permissions'
65 l.store 'Trackers', 'Trackers'
72 l.store 'Trackers', 'Trackers'
66 l.store 'Custom fields', 'Champs personnalisés'
73 l.store 'Custom fields', 'Champs personnalisés'
67 l.store 'Issue Statuses', 'Statuts des demandes'
74 l.store 'Issue Statuses', 'Statuts des demandes'
68 l.store 'Workflow', 'Workflow'
75 l.store 'Workflow', 'Workflow'
69 l.store 'Enumerations', 'Listes de valeurs'
76 l.store 'Enumerations', 'Listes de valeurs'
70
77
71 # ./script/../config/../app/views/admin/info.rhtml
78 # ./script/../config/../app/views/admin/info.rhtml
72 l.store 'Version', 'Version'
79 l.store 'Version', 'Version'
73 l.store 'Database', 'Base de données'
80 l.store 'Database', 'Base de données'
74
81
75 # ./script/../config/../app/views/admin/mail_options.rhtml
82 # ./script/../config/../app/views/admin/mail_options.rhtml
76 l.store 'Select actions for which mail notification should be enabled.', 'Sélectionner les actions pour lesquelles la notification par mail doit être activée.'
83 l.store 'Select actions for which mail notification should be enabled.', 'Sélectionner les actions pour lesquelles la notification par mail doit être activée.'
77 l.store 'Check all', 'Cocher tout'
84 l.store 'Check all', 'Cocher tout'
78 l.store 'Uncheck all', 'Décocher tout'
85 l.store 'Uncheck all', 'Décocher tout'
79
86
80 # ./script/../config/../app/views/admin/projects.rhtml
87 # ./script/../config/../app/views/admin/projects.rhtml
81 l.store 'Project', 'Projet'
88 l.store 'Project', 'Projet'
82 l.store 'Description', 'Description'
89 l.store 'Description', 'Description'
83 l.store 'Public', 'Public'
90 l.store 'Public', 'Public'
84 l.store 'Delete', 'Supprimer'
91 l.store 'Delete', 'Supprimer'
85 l.store 'Previous', 'Précédent'
92 l.store 'Previous', 'Précédent'
86 l.store 'Next', 'Suivant'
93 l.store 'Next', 'Suivant'
87
94
88 # ./script/../config/../app/views/custom_fields/edit.rhtml
95 # ./script/../config/../app/views/custom_fields/edit.rhtml
89 l.store 'Custom field', 'Champ personnalisé'
96 l.store 'Custom field', 'Champ personnalisé'
90
97
91 # ./script/../config/../app/views/custom_fields/list.rhtml
98 # ./script/../config/../app/views/custom_fields/list.rhtml
92 l.store 'Name', 'Nom'
99 l.store 'Name', 'Nom'
93 l.store 'Type', 'Type'
100 l.store 'Type', 'Type'
94 l.store 'Required', 'Obligatoire'
101 l.store 'Required', 'Obligatoire'
95 l.store 'For all projects', 'Pour tous les projets'
102 l.store 'For all projects', 'Pour tous les projets'
96 l.store 'Used by', 'Utilisé par'
103 l.store 'Used by', 'Utilisé par'
97
104
98 # ./script/../config/../app/views/custom_fields/new.rhtml
105 # ./script/../config/../app/views/custom_fields/new.rhtml
99 l.store 'New custom field', 'Nouveau champ personnalisé'
106 l.store 'New custom field', 'Nouveau champ personnalisé'
100 l.store 'Create', 'Créer'
107 l.store 'Create', 'Créer'
101
108
102 # ./script/../config/../app/views/custom_fields/_form.rhtml
109 # ./script/../config/../app/views/custom_fields/_form.rhtml
103 l.store '0 means no restriction', '0 pour aucune restriction'
110 l.store '0 means no restriction', '0 pour aucune restriction'
104 l.store 'Regular expression pattern', 'Expression régulière'
111 l.store 'Regular expression pattern', 'Expression régulière'
105 l.store 'Possible values', 'Valeurs possibles'
112 l.store 'Possible values', 'Valeurs possibles'
106
113
107 # ./script/../config/../app/views/documents/edit.rhtml
114 # ./script/../config/../app/views/documents/edit.rhtml
108 l.store 'Document', 'Document'
115 l.store 'Document', 'Document'
109
116
110 # ./script/../config/../app/views/documents/show.rhtml
117 # ./script/../config/../app/views/documents/show.rhtml
111 l.store 'Category', 'Catégorie'
118 l.store 'Category', 'Catégorie'
112 l.store 'Edit', 'Modifier'
119 l.store 'Edit', 'Modifier'
113 l.store 'download', 'téléchargement'
120 l.store 'download', 'téléchargement'
114 l.store 'Add file', 'Ajouter le fichier'
121 l.store 'Add file', 'Ajouter le fichier'
115 l.store 'Add', 'Ajouter'
122 l.store 'Add', 'Ajouter'
116
123
117 # ./script/../config/../app/views/documents/_form.rhtml
124 # ./script/../config/../app/views/documents/_form.rhtml
118 l.store 'Title', 'Titre'
125 l.store 'Title', 'Titre'
119
126
120 # ./script/../config/../app/views/enumerations/edit.rhtml
127 # ./script/../config/../app/views/enumerations/edit.rhtml
121
128
122 # ./script/../config/../app/views/enumerations/list.rhtml
129 # ./script/../config/../app/views/enumerations/list.rhtml
123
130
124 # ./script/../config/../app/views/enumerations/new.rhtml
131 # ./script/../config/../app/views/enumerations/new.rhtml
125 l.store 'New enumeration', 'Nouvelle valeur'
132 l.store 'New enumeration', 'Nouvelle valeur'
126
133
127 # ./script/../config/../app/views/enumerations/_form.rhtml
134 # ./script/../config/../app/views/enumerations/_form.rhtml
128
135
129 # ./script/../config/../app/views/issues/change_status.rhtml
136 # ./script/../config/../app/views/issues/change_status.rhtml
130 l.store 'Issue', 'Demande'
137 l.store 'Issue', 'Demande'
131 l.store 'New status', 'Nouveau statut'
138 l.store 'New status', 'Nouveau statut'
132 l.store 'Assigned to', 'Assigné à'
139 l.store 'Assigned to', 'Assigné à'
133 l.store 'Fixed in version', 'Version corrigée'
140 l.store 'Fixed in version', 'Version corrigée'
134 l.store 'Notes', 'Remarques'
141 l.store 'Notes', 'Remarques'
135
142
136 # ./script/../config/../app/views/issues/edit.rhtml
143 # ./script/../config/../app/views/issues/edit.rhtml
137 l.store 'Status', 'Statut'
144 l.store 'Status', 'Statut'
138 l.store 'Tracker', 'Tracker'
145 l.store 'Tracker', 'Tracker'
139 l.store 'Priority', 'Priorité'
146 l.store 'Priority', 'Priorité'
140 l.store 'Subject', 'Sujet'
147 l.store 'Subject', 'Sujet'
141
148
142 # ./script/../config/../app/views/issues/show.rhtml
149 # ./script/../config/../app/views/issues/show.rhtml
143 l.store 'Author', 'Auteur'
150 l.store 'Author', 'Auteur'
144 l.store 'Change status', 'Changer le statut'
151 l.store 'Change status', 'Changer le statut'
145 l.store 'History', 'Historique'
152 l.store 'History', 'Historique'
146 l.store 'Attachments', 'Fichiers'
153 l.store 'Attachments', 'Fichiers'
147 l.store 'Update...', 'Changer...'
154 l.store 'Update...', 'Changer...'
148
155
149 # ./script/../config/../app/views/issues/_list_simple.rhtml
156 # ./script/../config/../app/views/issues/_list_simple.rhtml
150 l.store 'No issue', 'Aucune demande'
157 l.store 'No issue', 'Aucune demande'
151
158
152 # ./script/../config/../app/views/issue_categories/edit.rhtml
159 # ./script/../config/../app/views/issue_categories/edit.rhtml
153
160
154 # ./script/../config/../app/views/issue_categories/_form.rhtml
161 # ./script/../config/../app/views/issue_categories/_form.rhtml
155
162
156 # ./script/../config/../app/views/issue_statuses/edit.rhtml
163 # ./script/../config/../app/views/issue_statuses/edit.rhtml
157 l.store 'Issue status', 'Statut de demande'
164 l.store 'Issue status', 'Statut de demande'
158
165
159 # ./script/../config/../app/views/issue_statuses/list.rhtml
166 # ./script/../config/../app/views/issue_statuses/list.rhtml
160 l.store 'Issue statuses', 'Statuts de demande'
167 l.store 'Issue statuses', 'Statuts de demande'
161 l.store 'Default status', 'Statut par défaut'
168 l.store 'Default status', 'Statut par défaut'
162 l.store 'Issue closed', 'Demande fermée'
169 l.store 'Issue closed', 'Demande fermée'
163 l.store 'Color', 'Couleur'
170 l.store 'Color', 'Couleur'
164
171
165 # ./script/../config/../app/views/issue_statuses/new.rhtml
172 # ./script/../config/../app/views/issue_statuses/new.rhtml
166 l.store 'New issue status', 'Nouveau statut'
173 l.store 'New issue status', 'Nouveau statut'
167
174
168 # ./script/../config/../app/views/issue_statuses/_form.rhtml
175 # ./script/../config/../app/views/issue_statuses/_form.rhtml
169
176
170 # ./script/../config/../app/views/layouts/base.rhtml
177 # ./script/../config/../app/views/layouts/base.rhtml
171 l.store 'Home', 'Accueil'
178 l.store 'Home', 'Accueil'
172 l.store 'Help', 'Aide'
179 l.store 'Help', 'Aide'
173 l.store 'Log in', 'Connexion'
180 l.store 'Log in', 'Connexion'
174 l.store 'Logout', 'Déconnexion'
181 l.store 'Logout', 'Déconnexion'
175 l.store 'Overview', 'Aperçu'
182 l.store 'Overview', 'Aperçu'
176 l.store 'Issues', 'Demandes'
183 l.store 'Issues', 'Demandes'
177 l.store 'Reports', 'Rapports'
184 l.store 'Reports', 'Rapports'
178 l.store 'News', 'Annonces'
185 l.store 'News', 'Annonces'
179 l.store 'Change log', 'Historique'
186 l.store 'Change log', 'Historique'
180 l.store 'Documents', 'Documents'
187 l.store 'Documents', 'Documents'
181 l.store 'Members', 'Membres'
188 l.store 'Members', 'Membres'
182 l.store 'Files', 'Fichiers'
189 l.store 'Files', 'Fichiers'
183 l.store 'Settings', 'Configuration'
190 l.store 'Settings', 'Configuration'
184 l.store 'My projects', 'Mes projets'
191 l.store 'My projects', 'Mes projets'
185 l.store 'Logged as', 'Connecté en tant que'
192 l.store 'Logged as', 'Connecté en tant que'
186
193
187 # ./script/../config/../app/views/mailer/issue_add.rhtml
194 # ./script/../config/../app/views/mailer/issue_add.rhtml
188
195
189 # ./script/../config/../app/views/mailer/issue_change_status.rhtml
196 # ./script/../config/../app/views/mailer/issue_change_status.rhtml
190
197
191 # ./script/../config/../app/views/mailer/_issue.rhtml
198 # ./script/../config/../app/views/mailer/_issue.rhtml
192
199
193 # ./script/../config/../app/views/news/edit.rhtml
200 # ./script/../config/../app/views/news/edit.rhtml
194
201
195 # ./script/../config/../app/views/news/show.rhtml
202 # ./script/../config/../app/views/news/show.rhtml
196 l.store 'Summary', 'Résumé'
203 l.store 'Summary', 'Résumé'
197 l.store 'By', 'Par'
204 l.store 'By', 'Par'
198 l.store 'Date', 'Date'
205 l.store 'Date', 'Date'
199
206
200 # ./script/../config/../app/views/news/_form.rhtml
207 # ./script/../config/../app/views/news/_form.rhtml
201
208
202 # ./script/../config/../app/views/projects/add.rhtml
209 # ./script/../config/../app/views/projects/add.rhtml
203 l.store 'New project', 'Nouveau projet'
210 l.store 'New project', 'Nouveau projet'
204
211
205 # ./script/../config/../app/views/projects/add_document.rhtml
212 # ./script/../config/../app/views/projects/add_document.rhtml
206 l.store 'New document', 'Nouveau document'
213 l.store 'New document', 'Nouveau document'
207 l.store 'File', 'Fichier'
214 l.store 'File', 'Fichier'
208
215
209 # ./script/../config/../app/views/projects/add_issue.rhtml
216 # ./script/../config/../app/views/projects/add_issue.rhtml
210 l.store 'New issue', 'Nouvelle demande'
217 l.store 'New issue', 'Nouvelle demande'
211 l.store 'Attachment', 'Fichier'
218 l.store 'Attachment', 'Fichier'
212
219
213 # ./script/../config/../app/views/projects/add_news.rhtml
220 # ./script/../config/../app/views/projects/add_news.rhtml
214
221
215 # ./script/../config/../app/views/projects/add_version.rhtml
222 # ./script/../config/../app/views/projects/add_version.rhtml
216 l.store 'New version', 'Nouvelle version'
223 l.store 'New version', 'Nouvelle version'
217
224
218 # ./script/../config/../app/views/projects/changelog.rhtml
225 # ./script/../config/../app/views/projects/changelog.rhtml
219
226
220 # ./script/../config/../app/views/projects/destroy.rhtml
227 # ./script/../config/../app/views/projects/destroy.rhtml
221 l.store 'Are you sure you want to delete project', 'Êtes-vous sûr de vouloir supprimer le projet'
228 l.store 'Are you sure you want to delete project', 'Êtes-vous sûr de vouloir supprimer le projet'
222
229
223 # ./script/../config/../app/views/projects/list.rhtml
230 # ./script/../config/../app/views/projects/list.rhtml
224 l.store 'Public projects', 'Projets publics'
231 l.store 'Public projects', 'Projets publics'
225
232
226 # ./script/../config/../app/views/projects/list_documents.rhtml
233 # ./script/../config/../app/views/projects/list_documents.rhtml
227 l.store 'Desciption', 'Description'
234 l.store 'Desciption', 'Description'
228
235
229 # ./script/../config/../app/views/projects/list_files.rhtml
236 # ./script/../config/../app/views/projects/list_files.rhtml
230 l.store 'Files', 'Fichiers'
237 l.store 'Files', 'Fichiers'
231 l.store 'New file', 'Nouveau fichier'
238 l.store 'New file', 'Nouveau fichier'
232
239
233 # ./script/../config/../app/views/projects/list_issues.rhtml
240 # ./script/../config/../app/views/projects/list_issues.rhtml
241 l.store 'Subprojects', 'Sous-projets'
234 l.store 'Apply filter', 'Appliquer'
242 l.store 'Apply filter', 'Appliquer'
235 l.store 'Reset', 'Annuler'
243 l.store 'Reset', 'Annuler'
236 l.store 'Report an issue', 'Nouvelle demande'
244 l.store 'Report an issue', 'Nouvelle demande'
237
245
238 # ./script/../config/../app/views/projects/list_members.rhtml
246 # ./script/../config/../app/views/projects/list_members.rhtml
239 l.store 'Project members', 'Membres du projet'
247 l.store 'Project members', 'Membres du projet'
240
248
241 # ./script/../config/../app/views/projects/list_news.rhtml
249 # ./script/../config/../app/views/projects/list_news.rhtml
242 l.store 'Read...', 'Lire...'
250 l.store 'Read...', 'Lire...'
243
251
244 # ./script/../config/../app/views/projects/settings.rhtml
252 # ./script/../config/../app/views/projects/settings.rhtml
245 l.store 'New member', 'Nouveau membre'
253 l.store 'New member', 'Nouveau membre'
246 l.store 'Versions', 'Versions'
254 l.store 'Versions', 'Versions'
247 l.store 'New version...', 'Nouvelle version...'
255 l.store 'New version...', 'Nouvelle version...'
248 l.store 'Issue categories', 'Catégories des demandes'
256 l.store 'Issue categories', 'Catégories des demandes'
249 l.store 'New category', 'Nouvelle catégorie'
257 l.store 'New category', 'Nouvelle catégorie'
250
258
251 # ./script/../config/../app/views/projects/show.rhtml
259 # ./script/../config/../app/views/projects/show.rhtml
252 l.store 'Homepage', 'Site web'
260 l.store 'Homepage', 'Site web'
253 l.store 'open', 'ouverte(s)'
261 l.store 'open', 'ouverte(s)'
254 l.store 'View all issues', 'Voir toutes les demandes'
262 l.store 'View all issues', 'Voir toutes les demandes'
255 l.store 'View all news', 'Voir toutes les annonces'
263 l.store 'View all news', 'Voir toutes les annonces'
256 l.store 'Latest news', 'Dernières annonces'
264 l.store 'Latest news', 'Dernières annonces'
257
265
258 # ./script/../config/../app/views/projects/_form.rhtml
266 # ./script/../config/../app/views/projects/_form.rhtml
259
267
260 # ./script/../config/../app/views/reports/issue_report.rhtml
268 # ./script/../config/../app/views/reports/issue_report.rhtml
261 l.store 'Issues by tracker', 'Demandes par tracker'
269 l.store 'Issues by tracker', 'Demandes par tracker'
262 l.store 'Issues by priority', 'Demandes par priorité'
270 l.store 'Issues by priority', 'Demandes par priorité'
263 l.store 'Issues by category', 'Demandes par catégorie'
271 l.store 'Issues by category', 'Demandes par catégorie'
264
272
265 # ./script/../config/../app/views/reports/_simple.rhtml
273 # ./script/../config/../app/views/reports/_simple.rhtml
266 l.store 'Open', 'Ouverte'
274 l.store 'Open', 'Ouverte'
267 l.store 'Total', 'Total'
275 l.store 'Total', 'Total'
268
276
269 # ./script/../config/../app/views/roles/edit.rhtml
277 # ./script/../config/../app/views/roles/edit.rhtml
270 l.store 'Role', 'Rôle'
278 l.store 'Role', 'Rôle'
271
279
272 # ./script/../config/../app/views/roles/list.rhtml
280 # ./script/../config/../app/views/roles/list.rhtml
273 l.store 'Roles', 'Rôles'
281 l.store 'Roles', 'Rôles'
274
282
275 # ./script/../config/../app/views/roles/new.rhtml
283 # ./script/../config/../app/views/roles/new.rhtml
276 l.store 'New role', 'Nouveau rôle'
284 l.store 'New role', 'Nouveau rôle'
277
285
278 # ./script/../config/../app/views/roles/workflow.rhtml
286 # ./script/../config/../app/views/roles/workflow.rhtml
279 l.store 'Workflow setup', 'Configuration du workflow'
287 l.store 'Workflow setup', 'Configuration du workflow'
280 l.store 'Select a workflow to edit', 'Sélectionner un workflow à mettre à jour'
288 l.store 'Select a workflow to edit', 'Sélectionner un workflow à mettre à jour'
281 l.store 'New statuses allowed', 'Nouveaux statuts autorisés'
289 l.store 'New statuses allowed', 'Nouveaux statuts autorisés'
282
290
283 # ./script/../config/../app/views/roles/_form.rhtml
291 # ./script/../config/../app/views/roles/_form.rhtml
284 l.store 'Permissions', 'Permissions'
292 l.store 'Permissions', 'Permissions'
285
293
286 # ./script/../config/../app/views/trackers/edit.rhtml
294 # ./script/../config/../app/views/trackers/edit.rhtml
287
295
288 # ./script/../config/../app/views/trackers/list.rhtml
296 # ./script/../config/../app/views/trackers/list.rhtml
289 l.store 'View issues in change log', 'Demandes affichées dans l\'historique'
297 l.store 'View issues in change log', 'Demandes affichées dans l\'historique'
290
298
291 # ./script/../config/../app/views/trackers/new.rhtml
299 # ./script/../config/../app/views/trackers/new.rhtml
292 l.store 'New tracker', 'Nouveau tracker'
300 l.store 'New tracker', 'Nouveau tracker'
293
301
294 # ./script/../config/../app/views/trackers/_form.rhtml
302 # ./script/../config/../app/views/trackers/_form.rhtml
295
303
296 # ./script/../config/../app/views/users/add.rhtml
304 # ./script/../config/../app/views/users/add.rhtml
297 l.store 'New user', 'Nouvel utilisateur'
305 l.store 'New user', 'Nouvel utilisateur'
298
306
299 # ./script/../config/../app/views/users/edit.rhtml
307 # ./script/../config/../app/views/users/edit.rhtml
300 l.store 'User', 'Utilisateur'
308 l.store 'User', 'Utilisateur'
301
309
302 # ./script/../config/../app/views/users/list.rhtml
310 # ./script/../config/../app/views/users/list.rhtml
303 l.store 'Admin', 'Admin'
311 l.store 'Admin', 'Admin'
304 l.store 'Locked', 'Verrouillé'
312 l.store 'Locked', 'Verrouillé'
305
313
306 # ./script/../config/../app/views/users/_form.rhtml
314 # ./script/../config/../app/views/users/_form.rhtml
307 l.store 'Administrator', 'Administrateur'
315 l.store 'Administrator', 'Administrateur'
308
316
309 # ./script/../config/../app/views/versions/edit.rhtml
317 # ./script/../config/../app/views/versions/edit.rhtml
310
318
311 # ./script/../config/../app/views/versions/_form.rhtml
319 # ./script/../config/../app/views/versions/_form.rhtml
312
320
313 # ./script/../config/../app/views/welcome/index.rhtml
321 # ./script/../config/../app/views/welcome/index.rhtml
314
322 l.store 'Latest projects', 'Derniers projets'
315
323
316 end
324 end
1 NO CONTENT: file renamed from redmine/public/manual/images/users_list.png to redmine/public/manual/fr/resources/users_list.png
NO CONTENT: file renamed from redmine/public/manual/images/users_list.png to redmine/public/manual/fr/resources/users_list.png
@@ -1,322 +1,331
1 /* andreas08 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer. Version: 1.0, November 28, 2005 */
1 /* andreas08 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer. Version: 1.0, November 28, 2005 */
2 /* Edited by Jean-Philippe Lang *>
2 /* Edited by Jean-Philippe Lang *>
3 /**************** Body and tag styles ****************/
3 /**************** Body and tag styles ****************/
4
4
5
5
6 #header * {margin:0; padding:0;}
6 #header * {margin:0; padding:0;}
7 p, ul, ol, li {margin:0; padding:0;}
7 p, ul, ol, li {margin:0; padding:0;}
8
8
9
9
10 body{
10 body{
11 font:76% Verdana,Tahoma,Arial,sans-serif;
11 font:76% Verdana,Tahoma,Arial,sans-serif;
12 line-height:1.4em;
12 line-height:1.4em;
13 text-align:center;
13 text-align:center;
14 color:#303030;
14 color:#303030;
15 background:#e8eaec;
15 background:#e8eaec;
16 }
16 }
17
17
18 a{
18 a{
19 color:#467aa7;
19 color:#467aa7;
20 font-weight:bold;
20 font-weight:bold;
21 text-decoration:none;
21 text-decoration:none;
22 background-color:inherit;
22 background-color:inherit;
23 }
23 }
24
24
25 a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;}
25 a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;}
26 a img{border:none;}
26 a img{border:none;}
27
27
28 p{padding:0 0 1em 0;}
28 p{padding:0 0 1em 0;}
29 p form{margin-top:0; margin-bottom:20px;}
29 p form{margin-top:0; margin-bottom:20px;}
30
30
31 img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;}
31 img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;}
32 img.left{float:left; margin:0 12px 5px 0;}
32 img.left{float:left; margin:0 12px 5px 0;}
33 img.center{display:block; margin:0 auto 5px auto;}
33 img.center{display:block; margin:0 auto 5px auto;}
34 img.right{float:right; margin:0 0 5px 12px;}
34 img.right{float:right; margin:0 0 5px 12px;}
35
35
36 /**************** Header and navigation styles ****************/
36 /**************** Header and navigation styles ****************/
37
37
38 #container{
38 #container{
39 width:100%;
39 width:100%;
40 min-width: 800px;
40 min-width: 800px;
41 margin:5px auto;
41 margin:5px auto;
42 padding:1px 0;
42 padding:1px 0;
43 text-align:left;
43 text-align:left;
44 background:#ffffff;
44 background:#ffffff;
45 color:#303030;
45 color:#303030;
46 border:2px solid #a0a0a0;
46 border:2px solid #a0a0a0;
47 }
47 }
48
48
49 #header{
49 #header{
50 height:5.5em;
50 height:5.5em;
51 /*width:758px;*/
51 /*width:758px;*/
52 margin:0 1px 1px 1px;
52 margin:0 1px 1px 1px;
53 background:#467aa7;
53 background:#467aa7;
54 color:#ffffff;
54 color:#ffffff;
55 }
55 }
56
56
57 #header h1{
57 #header h1{
58 padding:14px 0 0 20px;
58 padding:14px 0 0 20px;
59 font-size:2.4em;
59 font-size:2.4em;
60 background-color:inherit;
60 background-color:inherit;
61 color:#fff; /*rgb(152, 26, 33);*/
61 color:#fff; /*rgb(152, 26, 33);*/
62 letter-spacing:-2px;
62 letter-spacing:-2px;
63 font-weight:normal;
63 font-weight:normal;
64 }
64 }
65
65
66 #header h2{
66 #header h2{
67 margin:10px 0 0 40px;
67 margin:10px 0 0 40px;
68 font-size:1.4em;
68 font-size:1.4em;
69 background-color:inherit;
69 background-color:inherit;
70 color:#f0f2f4;
70 color:#f0f2f4;
71 letter-spacing:-1px;
71 letter-spacing:-1px;
72 font-weight:normal;
72 font-weight:normal;
73 }
73 }
74
74
75 #navigation{
75 #navigation{
76 height:2.2em;
76 height:2.2em;
77 line-height:2.2em;
77 line-height:2.2em;
78 /*width:758px;*/
78 /*width:758px;*/
79 margin:0 1px;
79 margin:0 1px;
80 background:#578bb8;
80 background:#578bb8;
81 color:#ffffff;
81 color:#ffffff;
82 }
82 }
83
83
84 #navigation li{
84 #navigation li{
85 float:left;
85 float:left;
86 list-style-type:none;
86 list-style-type:none;
87 border-right:1px solid #ffffff;
87 border-right:1px solid #ffffff;
88 white-space:nowrap;
88 white-space:nowrap;
89 }
89 }
90
90
91 #navigation li.right {
91 #navigation li.right {
92 float:right;
92 float:right;
93 list-style-type:none;
93 list-style-type:none;
94 border-right:0;
94 border-right:0;
95 border-left:1px solid #ffffff;
95 border-left:1px solid #ffffff;
96 white-space:nowrap;
96 white-space:nowrap;
97 }
97 }
98
98
99 #navigation li a{
99 #navigation li a{
100 display:block;
100 display:block;
101 padding:0px 10px 0px 22px;
101 padding:0px 10px 0px 22px;
102 font-size:0.8em;
102 font-size:0.8em;
103 font-weight:normal;
103 font-weight:normal;
104 /*text-transform:uppercase;*/
104 /*text-transform:uppercase;*/
105 text-decoration:none;
105 text-decoration:none;
106 background-color:inherit;
106 background-color:inherit;
107 color: #ffffff;
107 color: #ffffff;
108 }
108 }
109
109
110 * html #navigation a {width:1%;}
110 * html #navigation a {width:1%;}
111
111
112 #navigation .selected,#navigation a:hover{
112 #navigation .selected,#navigation a:hover{
113 color:#ffffff;
113 color:#ffffff;
114 text-decoration:none;
114 text-decoration:none;
115 background-color: #80b0da;
115 background-color: #80b0da;
116 }
116 }
117
117
118 /**************** Icons links *******************/
118 /**************** Icons links *******************/
119 .picHome { background: url(../images/home.png) no-repeat 4px 50%; }
119 .picHome { background: url(../images/home.png) no-repeat 4px 50%; }
120 .picUser { background: url(../images/user.png) no-repeat 4px 50%; }
120 .picUser { background: url(../images/user.png) no-repeat 4px 50%; }
121 .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; }
121 .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; }
122 .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; }
122 .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; }
123 .picProject { background: url(../images/projects.png) no-repeat 4px 50%; }
123 .picProject { background: url(../images/projects.png) no-repeat 4px 50%; }
124 .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; }
124 .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; }
125 .picHelp { background: url(../images/help.png) no-repeat 4px 50%; }
125 .picHelp { background: url(../images/help.png) no-repeat 4px 50%; }
126
126
127 /**************** Content styles ****************/
127 /**************** Content styles ****************/
128
128
129 #content{
129 #content{
130 /*float:right;*/
130 /*float:right;*/
131 /*width:530px;*/
131 /*width:530px;*/
132 width: auto;
132 width: auto;
133 min-height: 500px;
133 min-height: 500px;
134 font-size:0.9em;
134 font-size:0.9em;
135 padding:20px 10px 10px 20px;
135 padding:20px 10px 10px 20px;
136 /*position: absolute;*/
136 /*position: absolute;*/
137 margin: 0 0 0 140px;
137 margin: 0 0 0 140px;
138 border-left: 1px dashed #c0c0c0;
138 border-left: 1px dashed #c0c0c0;
139
139
140 }
140 }
141
141
142 #content h2{
142 #content h2{
143 display:block;
143 display:block;
144 margin:0 0 16px 0;
144 margin:0 0 16px 0;
145 font-size:1.7em;
145 font-size:1.7em;
146 font-weight:normal;
146 font-weight:normal;
147 letter-spacing:-1px;
147 letter-spacing:-1px;
148 color:#505050;
148 color:#505050;
149 background-color:inherit;
149 background-color:inherit;
150 }
150 }
151
151
152 #content h2 a{font-weight:normal;}
152 #content h2 a{font-weight:normal;}
153 #content h3{margin:0 0 5px 0; font-size:1.4em; letter-spacing:-1px;}
153 #content h3{margin:0 0 5px 0; font-size:1.4em; letter-spacing:-1px;}
154 #content a:hover,#subcontent a:hover{text-decoration:underline;}
154 #content a:hover,#subcontent a:hover{text-decoration:underline;}
155 #content ul,#content ol{margin:0 5px 16px 35px;}
155 #content ul,#content ol{margin:0 5px 16px 35px;}
156 #content dl{margin:0 5px 10px 25px;}
156 #content dl{margin:0 5px 10px 25px;}
157 #content dt{font-weight:bold; margin-bottom:5px;}
157 #content dt{font-weight:bold; margin-bottom:5px;}
158 #content dd{margin:0 0 10px 15px;}
158 #content dd{margin:0 0 10px 15px;}
159
159
160
160
161 /***********************************************/
161 /***********************************************/
162
162
163 /*
163 /*
164 form{
164 form{
165 padding:15px;
165 padding:15px;
166 margin:0 0 20px 0;
166 margin:0 0 20px 0;
167 border:1px solid #c0c0c0;
167 border:1px solid #c0c0c0;
168 background-color:#CEE1ED;
168 background-color:#CEE1ED;
169 width:600px;
169 width:600px;
170 }
170 }
171 */
171 */
172
172
173 form {
173 form {
174 display: inline;
174 display: inline;
175 }
175 }
176
176
177 .noborder {
177 .noborder {
178 border:0px;
178 border:0px;
179 background-color:#fff;
179 background-color:#fff;
180 width:100%;
180 width:100%;
181 }
181 }
182
182
183 input {
183 input {
184 vertical-align: top;
184 vertical-align: top;
185 }
185 }
186
186
187 input.button-small
187 input.button-small
188 {
188 {
189 font-size: 0.8em;
189 font-size: 0.8em;
190 }
190 }
191
191
192 select.select-small
193 {
194 font-size: 0.8em;
195 }
196
192 label {
197 label {
193 font-weight: bold;
198 font-weight: bold;
194 font-size: 1em;
199 font-size: 1em;
195 }
200 }
196
201
202 fieldset {
203 border:1px solid #7F9DB9;
204 }
205
197 .required {
206 .required {
198 color: #bb0000;
207 color: #bb0000;
199 }
208 }
200
209
201 table.listTableContent {
210 table.listTableContent {
202 /*margin: 2em 2em 2em 0; */
211 /*margin: 2em 2em 2em 0; */
203 border:1px solid #c0c0c0;
212 border:1px solid #c0c0c0;
204 width:99%;
213 width:99%;
205 }
214 }
206
215
207 table.listTableContent td {
216 table.listTableContent td {
208 margin: 2px;
217 margin: 2px;
209
218
210 }
219 }
211
220
212 tr.ListHead {
221 tr.ListHead {
213 background-color:#467aa7;
222 background-color:#467aa7;
214 color:#FFFFFF;
223 color:#FFFFFF;
215 text-align:center;
224 text-align:center;
216 }
225 }
217
226
218 tr.ListHead a {
227 tr.ListHead a {
219 color:#FFFFFF;
228 color:#FFFFFF;
220 text-decoration:underline;
229 text-decoration:underline;
221 }
230 }
222
231
223 tr.ListLine0 {
232 tr.odd {
224 background-color: #C1E2F7;
233 background-color: #C1E2F7;
225 }
234 }
226 tr.ListLine1 {
235 tr.even {
227 background-color:#CEE1ED;
236 background-color:#CEE1ED;
228 }
237 }
229
238
230 hr { border:0px; border-bottom:1px dashed #000000; }
239 hr { border:0px; border-bottom:1px dashed #000000; }
231
240
232
241
233 /**************** Sidebar styles ****************/
242 /**************** Sidebar styles ****************/
234
243
235 #subcontent{
244 #subcontent{
236 float:left;
245 float:left;
237 clear:both;
246 clear:both;
238 width:130px;
247 width:130px;
239 padding:20px 20px 10px 5px;
248 padding:20px 20px 10px 5px;
240 line-height:1.4em;
249 line-height:1.4em;
241 }
250 }
242
251
243 #subcontent h2{
252 #subcontent h2{
244 display:block;
253 display:block;
245 margin:0 0 15px 0;
254 margin:0 0 15px 0;
246 font-size:1.6em;
255 font-size:1.6em;
247 font-weight:normal;
256 font-weight:normal;
248 text-align:left;
257 text-align:left;
249 letter-spacing:-1px;
258 letter-spacing:-1px;
250 color:#505050;
259 color:#505050;
251 background-color:inherit;
260 background-color:inherit;
252 }
261 }
253
262
254 #subcontent p{margin:0 0 16px 0; font-size:0.9em;}
263 #subcontent p{margin:0 0 16px 0; font-size:0.9em;}
255
264
256 /**************** Menublock styles ****************/
265 /**************** Menublock styles ****************/
257
266
258 .menublock{margin:0 0 20px 8px; font-size:0.9em;}
267 .menublock{margin:0 0 20px 8px; font-size:0.9em;}
259 .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;}
268 .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;}
260 .menublock li a{font-weight:bold; text-decoration:none;}
269 .menublock li a{font-weight:bold; text-decoration:none;}
261 .menublock li a:hover{text-decoration:none;}
270 .menublock li a:hover{text-decoration:none;}
262 .menublock li ul{margin:3px 0 3px 15px; font-size:1em; font-weight:normal;}
271 .menublock li ul{margin:3px 0 3px 15px; font-size:1em; font-weight:normal;}
263 .menublock li ul li{margin-bottom:0;}
272 .menublock li ul li{margin-bottom:0;}
264 .menublock li ul a{font-weight:normal;}
273 .menublock li ul a{font-weight:normal;}
265
274
266 /**************** Searchbar styles ****************/
275 /**************** Searchbar styles ****************/
267
276
268 #searchbar{margin:0 0 20px 0;}
277 #searchbar{margin:0 0 20px 0;}
269 #searchbar form fieldset{margin-left:10px; border:0 solid;}
278 #searchbar form fieldset{margin-left:10px; border:0 solid;}
270
279
271 #searchbar #s{
280 #searchbar #s{
272 height:1.2em;
281 height:1.2em;
273 width:110px;
282 width:110px;
274 margin:0 5px 0 0;
283 margin:0 5px 0 0;
275 border:1px solid #a0a0a0;
284 border:1px solid #a0a0a0;
276 }
285 }
277
286
278 #searchbar #searchbutton{
287 #searchbar #searchbutton{
279 width:auto;
288 width:auto;
280 padding:0 1px;
289 padding:0 1px;
281 border:1px solid #808080;
290 border:1px solid #808080;
282 font-size:0.9em;
291 font-size:0.9em;
283 text-align:center;
292 text-align:center;
284 }
293 }
285
294
286 /**************** Footer styles ****************/
295 /**************** Footer styles ****************/
287
296
288 #footer{
297 #footer{
289 clear:both;
298 clear:both;
290 /*width:758px;*/
299 /*width:758px;*/
291 padding:5px 0;
300 padding:5px 0;
292 margin:0 1px;
301 margin:0 1px;
293 font-size:0.9em;
302 font-size:0.9em;
294 color:#f0f0f0;
303 color:#f0f0f0;
295 background:#467aa7;
304 background:#467aa7;
296 }
305 }
297
306
298 #footer p{padding:0; margin:0; text-align:center;}
307 #footer p{padding:0; margin:0; text-align:center;}
299 #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;}
308 #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;}
300 #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;}
309 #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;}
301
310
302 /**************** Misc classes and styles ****************/
311 /**************** Misc classes and styles ****************/
303
312
304 .splitcontentleft{float:left; width:49%;}
313 .splitcontentleft{float:left; width:49%;}
305 .splitcontentright{float:right; width:49%;}
314 .splitcontentright{float:right; width:49%;}
306 .clear{clear:both;}
315 .clear{clear:both;}
307 .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;}
316 .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;}
308 .hide{display:none;}
317 .hide{display:none;}
309 .textcenter{text-align:center;}
318 .textcenter{text-align:center;}
310 .textright{text-align:right;}
319 .textright{text-align:right;}
311 .important{color:#f02025; background-color:inherit; font-weight:bold;}
320 .important{color:#f02025; background-color:inherit; font-weight:bold;}
312
321
313 .box{
322 .box{
314 margin:0 0 20px 0;
323 margin:0 0 20px 0;
315 padding:10px;
324 padding:10px;
316 border:1px solid #c0c0c0;
325 border:1px solid #c0c0c0;
317 background-color:#fafbfc;
326 background-color:#fafbfc;
318 color:#505050;
327 color:#505050;
319 line-height:1.5em;
328 line-height:1.5em;
320 }
329 }
321
330
322
331
@@ -1,5 +1,26
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 first:
2 ecookbook:
3 id: 1
3 id: 1
4 another:
4 name: eCookbook
5 descr: Recipes management application
6 homepage: http://ecookbook.somenet.foo/
7 projects_count: 1
8 created_on: 2005-01-01 01:00:00
9 updated_on: 2005-01-01 01:00:00
10 onlinestore:
5 id: 2
11 id: 2
12 name: OnlineStore
13 descr: E-commerce web site
14 is_public: false
15 projects_count: 0
16 created_on: 2005-01-01 01:00:00
17 updated_on: 2005-01-01 01:00:00
18 tracker:
19 id: 3
20 name: tracker
21 descr: bug tracker
22 is_public: true
23 projects_count: 0
24 parent_id: 1
25 created_on: 2005-01-01 01:00:00
26 updated_on: 2005-01-01 01:00:00 No newline at end of file
@@ -1,5 +1,10
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 first:
2 manager:
3 id: 1
3 id: 1
4 another:
4 name: manager
5 developer:
5 id: 2
6 id: 2
7 name: developer
8 reporter:
9 id: 3
10 name: reporter
@@ -1,5 +1,19
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 first:
2 admin:
3 id: 1
3 id: 1
4 another:
4 login: admin
5 firstname: admin
6 lastname: admin
7 mail: admin@somenet.foo
8 hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
9 admin: true
10 language: en
11 paulochon:
5 id: 2
12 id: 2
13 login: plochon
14 firstname: Paul
15 lastname: Ochon
16 mail: plochon@somenet.foo
17 hashed_password: d033e22ae348aeb5660fc2140aec35850c4da997
18 admin: false
19 language: en No newline at end of file
@@ -1,88 +1,47
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 require File.dirname(__FILE__) + '/../test_helper'
18 require File.dirname(__FILE__) + '/../test_helper'
2 require 'projects_controller'
19 require 'projects_controller'
3
20
4 # Re-raise errors caught by the controller.
21 # Re-raise errors caught by the controller.
5 class ProjectsController; def rescue_action(e) raise e end; end
22 class ProjectsController; def rescue_action(e) raise e end; end
6
23
7 class ProjectsControllerTest < Test::Unit::TestCase
24 class ProjectsControllerTest < Test::Unit::TestCase
8 fixtures :projects
25 fixtures :projects
9
26
10 def setup
27 def setup
11 @controller = ProjectsController.new
28 @controller = ProjectsController.new
12 @request = ActionController::TestRequest.new
29 @request = ActionController::TestRequest.new
13 @response = ActionController::TestResponse.new
30 @response = ActionController::TestResponse.new
14 end
31 end
15
32
16 def test_index
33 def test_index
17 get :index
34 get :index
18 assert_response :success
35 assert_response :success
19 assert_template 'list'
36 assert_template 'list'
20 end
37 end
21
38
22 def test_list
39 def test_list
23 get :list
40 get :list
24
41
25 assert_response :success
42 assert_response :success
26 assert_template 'list'
43 assert_template 'list'
27
44
28 assert_not_nil assigns(:projects)
45 assert_not_nil assigns(:projects)
29 end
46 end
30
31 def test_show
32 get :show, :id => 1
33
34 assert_response :success
35 assert_template 'show'
36
37 assert_not_nil assigns(:project)
38 assert assigns(:project).valid?
39 end
40
41 def test_new
42 get :new
43
44 assert_response :success
45 assert_template 'new'
46
47 assert_not_nil assigns(:project)
48 end
49
50 def test_create
51 num_projects = Project.count
52
53 post :create, :project => {}
54
55 assert_response :redirect
56 assert_redirected_to :action => 'list'
57
58 assert_equal num_projects + 1, Project.count
59 end
60
61 def test_edit
62 get :edit, :id => 1
63
64 assert_response :success
65 assert_template 'edit'
66
67 assert_not_nil assigns(:project)
68 assert assigns(:project).valid?
69 end
70
71 def test_update
72 post :update, :id => 1
73 assert_response :redirect
74 assert_redirected_to :action => 'show', :id => 1
75 end
76
77 def test_destroy
78 assert_not_nil Project.find(1)
79
80 post :destroy, :id => 1
81 assert_response :redirect
82 assert_redirected_to :action => 'list'
83
84 assert_raise(ActiveRecord::RecordNotFound) {
85 Project.find(1)
86 }
87 end
88 end
47 end
@@ -1,28 +1,55
1 ENV["RAILS_ENV"] = "test"
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 ENV["RAILS_ENV"] ||= "test"
2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
19 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3 require 'test_help'
20 require 'test_help'
4
21
5 class Test::Unit::TestCase
22 class Test::Unit::TestCase
6 # Transactional fixtures accelerate your tests by wrapping each test method
23 # Transactional fixtures accelerate your tests by wrapping each test method
7 # in a transaction that's rolled back on completion. This ensures that the
24 # in a transaction that's rolled back on completion. This ensures that the
8 # test database remains unchanged so your fixtures don't have to be reloaded
25 # test database remains unchanged so your fixtures don't have to be reloaded
9 # between every test method. Fewer database queries means faster tests.
26 # between every test method. Fewer database queries means faster tests.
10 #
27 #
11 # Read Mike Clark's excellent walkthrough at
28 # Read Mike Clark's excellent walkthrough at
12 # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
29 # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13 #
30 #
14 # Every Active Record database supports transactions except MyISAM tables
31 # Every Active Record database supports transactions except MyISAM tables
15 # in MySQL. Turn off transactional fixtures in this case; however, if you
32 # in MySQL. Turn off transactional fixtures in this case; however, if you
16 # don't care one way or the other, switching from MyISAM to InnoDB tables
33 # don't care one way or the other, switching from MyISAM to InnoDB tables
17 # is recommended.
34 # is recommended.
18 self.use_transactional_fixtures = true
35 self.use_transactional_fixtures = true
19
36
20 # Instantiated fixtures are slow, but give you @david where otherwise you
37 # Instantiated fixtures are slow, but give you @david where otherwise you
21 # would need people(:david). If you don't want to migrate your existing
38 # would need people(:david). If you don't want to migrate your existing
22 # test cases which use the @david style and don't mind the speed hit (each
39 # test cases which use the @david style and don't mind the speed hit (each
23 # instantiated fixtures translates to a database query per test method),
40 # instantiated fixtures translates to a database query per test method),
24 # then set this back to true.
41 # then set this back to true.
25 self.use_instantiated_fixtures = false
42 self.use_instantiated_fixtures = false
26
43
27 # Add more helper methods to be used by all tests here...
44 # Add more helper methods to be used by all tests here...
45
46 def log_user(login, password)
47 get "/account/login"
48 assert_equal nil, session[:user]
49 assert_response :success
50 assert_template "account/login"
51 post "/account/login", :login => login, :password => password
52 assert_redirected_to "account/my_page"
53 assert_equal login, session[:user].login
54 end
28 end
55 end
@@ -1,10 +1,77
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 require File.dirname(__FILE__) + '/../test_helper'
18 require File.dirname(__FILE__) + '/../test_helper'
2
19
3 class ProjectTest < Test::Unit::TestCase
20 class ProjectTest < Test::Unit::TestCase
4 fixtures :projects
21 fixtures :projects
5
22
6 # Replace this with your real tests.
23 def setup
24 @project = projects(:ecookbook)
25 end
26
7 def test_truth
27 def test_truth
8 assert_kind_of Project, projects(:first)
28 assert_kind_of Project, @project
29 assert_equal "eCookbook", @project.name
30 end
31
32 def test_update
33 assert_equal "eCookbook", @project.name
34 @project.name = "eCook"
35 assert @project.save, @project.errors.full_messages.join("; ")
36 @project.reload
37 assert_equal "eCook", @project.name
38 end
39
40 def test_validate
41 @project.name = ""
42 assert !@project.save
43 assert_equal 1, @project.errors.count
44 assert_equal "can't be blank", @project.errors.on(:name)
45 end
46
47 def test_public_projects
48 public_projects = Project.find(:all, :conditions => ["is_public=?", true])
49 assert_equal 2, public_projects.length
50 assert_equal true, public_projects[0].is_public?
51 end
52
53 def test_destroy
54 @project.destroy
55 assert_raise(ActiveRecord::RecordNotFound) { Project.find(@project.id) }
56 end
57
58 def test_subproject_ok
59 sub = Project.find(2)
60 sub.parent = Project.find(1)
61 assert sub.save
62 assert_equal 1, sub.parent.id
63 assert_equal 2, Project.find(1).projects_count
64 end
65
66 def test_subproject_invalid
67 sub = Project.find(2)
68 sub.parent = projects(:tracker)
69 assert !sub.save
70 end
71
72 def test_subproject_invalid_2
73 sub = Project.find(1)
74 sub.parent = projects(:onlinestore)
75 assert !sub.save
9 end
76 end
10 end
77 end
@@ -1,10 +1,64
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
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
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 require File.dirname(__FILE__) + '/../test_helper'
18 require File.dirname(__FILE__) + '/../test_helper'
2
19
3 class UserTest < Test::Unit::TestCase
20 class UserTest < Test::Unit::TestCase
4 fixtures :users
21 fixtures :users
5
22
6 # Replace this with your real tests.
7 def test_truth
23 def test_truth
8 assert_kind_of User, users(:first)
24 assert_kind_of User, users(:paulochon)
25 end
26
27 def test_update
28 user = User.find(1)
29 assert_equal "admin", user.login
30 user.login = "john"
31 assert user.save, user.errors.full_messages.join("; ")
32 user.reload
33 assert_equal "john", user.login
34 end
35
36 def test_validate
37 user = User.find(1)
38 user.login = ""
39 assert !user.save
40 assert_equal 2, user.errors.count
41 end
42
43 def test_password
44 user = User.try_to_login("admin", "admin")
45 assert_kind_of User, user
46 assert_equal "admin", user.login
47 user.password = "hello"
48 assert user.save
49
50 user = User.try_to_login("admin", "hello")
51 assert_kind_of User, user
52 assert_equal "admin", user.login
53 assert_equal User.hash_password("hello"), user.hashed_password
54 end
55
56 def test_lock
57 user = User.find(1)
58 user.locked = true
59 assert user.save
60
61 user = User.try_to_login("admin", "admin")
62 assert_equal nil, user
9 end
63 end
10 end
64 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
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now