Browse Source

Améliorations diverses

omassot 7 years ago
parent
commit
84745ecfb4

+ 1 - 1
main/forms.py

@@ -47,7 +47,7 @@ class StoryForm(forms.ModelForm):
  
     class Meta:
         model = Story
-        widgets = {'epic': forms.HiddenInput(), 'author': forms.HiddenInput()}
+        widgets = {'author': forms.HiddenInput()}
         fields = ('epic', 'author', 'name', 'weight', 'description', 'assignees', 'sprints')
         
     def __init__(self, *args, **kwargs):

+ 1 - 1
main/static/css/custom.css

@@ -59,7 +59,7 @@ a.anchor {
     visibility: hidden;
 }
 
-@media screen and (max-width: 1280px) {
+@media screen and (max-width: 1400px) {
 	.hide-on-small-screen {
 		display: none;
 	}

+ 8 - 2
main/static/js/custom.js

@@ -1,7 +1,13 @@
 $(document).ready( function () {
 	
-	$('[data-url]').on('click', function() {
-		window.location.href = $(this).data('url');
+	$('[data-url]').on('click', function(e) {
+    	window.location.href = $(this).data('url');
+	});
+	
+	$('option').mousedown(function(e) {
+	    e.preventDefault();
+	    $(this).prop('selected', !$(this).prop('selected'));
+	    return false;
 	});
 	
 	var loc_uri = URI.parse(window.location.href);

+ 14 - 8
main/templates/_layout.html

@@ -56,8 +56,12 @@
 				    	<input name="q" type="text" placeholder="Rechercher...">
 				    </form>
 	        		
-	        		<a class="tool-btn" href="{% url 'story_index' %}?assignee={{ request.user.id }}" style="margin-right: 2em;" title="Mes Stories">
-	        			<i class="fa fa-check-square-o" style="color:#4183c4;"></i><span class="hide-on-small-screen"> Mes stories</span>
+	        		<a class="tool-btn" href="{% url 'story_create' %}" style="margin-right: 1em;" title="Nouvelle Story">
+	        			<i class="fa fa-plus" style="color:#4183c4;"></i><span class="hide-on-small-screen"> Nouvelle Story</span>
+	        		</a>
+	        		
+	        		<a class="tool-btn" href="{% url 'story_index' %}?assignee={{ request.user.id }}" style="margin-right: 1em;" title="Mes Stories">
+	        			<i class="fa fa-check-square-o" style="color:#4183c4;"></i><span class="hide-on-small-screen"> Mes Stories</span>
 	        		</a>
 	        		
 	        		<div id="user-panel" class="dropdown">
@@ -80,12 +84,14 @@
 	    <!-- Menu -->
 		<nav id="menu">
 			<ul class="links">
-				<li><a href="{% url 'index' %}">Accueil</a></li>
-				<li><a href="{% url 'story_index' %}">Toutes les Stories</a></li>
-				<li><a href="{% url 'sprint_end' %}">Cloture de sprint</a></li>
-				<li><a href="{% url 'reports' %}">Rapports</a></li>
-				<li><a href="{% url 'backlog_editor' %}">Modifier le Backlog</a></li>
-				<li><a href="{% url 'admin:index' %}">Administration</a></li>
+				<li><a href="{% url 'index' %}"><i class="fa fa-home" style=""margin-right: 0.2em;"></i> Accueil</a></li>
+				<li><a href="{% url 'story_index' %}"><i class="fa fa-check-square" style=""margin-right: 0.2em;"></i> Stories</a></li>
+				<li><a href="{% url 'sprint_end' %}"><i class="fa fa-flag" style=""margin-right: 0.2em;"></i> Cloture de sprint</a></li>
+				<li><a href="{% url 'report_projects' %}"><i class="fa fa-line-chart" style=""margin-right: 0.2em;"></i> Suivi de projets</a></li>
+				<li><a href="{% url 'report_activity' %}"><i class="fa fa-line-chart" style=""margin-right: 0.2em;"></i> Rapport d'Activité</a></li>
+				<li><a href="{% url 'report_sprints' %}"><i class="fa fa-line-chart" style=""margin-right: 0.2em;"></i> Suivi des Sprints</a></li>
+				<li><a href="{% url 'backlog_editor' %}"><i class="fa fa-pencil-square" style=""margin-right: 0.2em;"></i> Modifier le Backlog</a></li>
+				<li><a href="{% url 'admin:index' %}"><i class="fa fa-gear" style=""margin-right: 0.2em;"></i> Administration</a></li>
 			</ul>
 		</nav>
 		

+ 10 - 2
main/templates/index.html

@@ -33,15 +33,23 @@
 		
 		<tbody>
 			{% for epic in epics %}
+			
 			<tr data-url="{% url 'epic_details' epic_id=epic.id %}">
 				<td>
 					<i class="fa fa-circle" style="margin-right: 0.5em; color:{{ epic.project.color }};" title="{{ epic.project.name }}"></i> 
-					<b>{{ epic.name }}</b>
+					<a href="{% url 'epic_details' epic_id=epic.id %}">
+						{% if epic.value > 0 %}
+							<b>{{ epic.name }}</b>
+						{% else %}
+							<i style="color: grey;">{{ epic.name }}</i>
+						{% endif %}
+					</a>
 				</td>
 				<td{% if 'L' in epic.size %} style="font-weight:700;"{% endif %}>{{ epic.size }}</td>
-				<td>{{ epic.contributors_str }}</td>
+				<td style="font-size: 0.8em;">{{ epic.contributors_str }}</td>
 				<td>{{ epic.nb_stories }}</td>
 			</tr>
+			
 			{% endfor %}
 		
 		</tbody>

+ 32 - 32
main/templates/search_results.html

@@ -1,33 +1,33 @@
-{% extends '_layout.html' %}
-
-{% block breadcrumb %}
-	<li><a href="{% url 'index' %}">Accueil</a></li>
-	<li><a>Résultat de la recherche</a></li>
-{% endblock %}
-
-{% block main %}
-
-	<ul class="alt">
-	{% for r in results %}
-		<li>
-			<span style="display: inline-block; width: 50px;"><b>{{ r.model_name|title }}</b></span>
-			{% if r.model_name == 'EPIC' %}
-				<a href="{% url 'epic_details' epic_id=r.id %}">  {{ r.name }}</a>
-			{% else %}
-				<a href="{% url 'story_details' story_id=r.id %}">{{ r.name }}</a>
-			{% endif %}
-		</li>
-	{% endfor %}
-	</ul>
-
-	<div class="pagination">
-    	{% for numpage in pages %}
-    		{% if numpage == stories.number %}
-    			<a style="color: grey;">{{ numpage }}</a>
-    		{% else %}
-    			<a href="?page={{ numpage }}">{{ numpage }}</a>
-    		{% endif %}
-    	{% endfor %}
-	</div>
-	 
+{% extends '_layout.html' %}
+
+{% block breadcrumb %}
+	<li><a href="{% url 'index' %}">Accueil</a></li>
+	<li><a>Résultat de la recherche</a></li>
+{% endblock %}
+
+{% block main %}
+
+	<ul class="alt">
+	{% for r in results %}
+		<li>
+			<span style="display: inline-block; width: 50px;"><b>{{ r.model_name|title }}</b></span>
+			{% if r.model_name == 'epic'|lower %}
+				<a href="{% url 'epic_details' epic_id=r.id %}">  {{ r.name }}</a>
+			{% else %}
+				<a href="{% url 'story_details' story_id=r.id %}">{{ r.name }}</a>
+			{% endif %}
+		</li>
+	{% endfor %}
+	</ul>
+
+	<div class="pagination">
+    	{% for numpage in pages %}
+    		{% if numpage == stories.number %}
+    			<a style="color: grey;">{{ numpage }}</a>
+    		{% else %}
+    			<a href="?page={{ numpage }}">{{ numpage }}</a>
+    		{% endif %}
+    	{% endfor %}
+	</div>
+	 
 {% endblock %}

+ 10 - 1
main/templates/story_form.html

@@ -31,8 +31,17 @@
 		{% csrf_token %}
 
 		{{ form.non_field_errors }}
-    	{{ form.epic }}
     	{{ form.author }}
+
+		{% if not form.instance.epic %}
+		<p>
+		    {{ form.epic.errors }}
+		    {{ form.epic.label_tag }}
+		    {{ form.epic }}
+		</p>
+		{% else %}
+			{{ form.epic.as_hidden }}
+		{% endif %}
 		
 		<p>
 		    {{ form.name.errors }}

+ 1 - 1
main/templates/story_index.html

@@ -13,7 +13,7 @@
 
 	<header class="flex-row" style="margin-bottom: 2em;">
 		<h2 class="flex-extend">Stories</h2>
-		<a class="button icon fa-plus tool-btn" href="{% url 'story_create' %}" title="Nouvelle Story"></a>
+		<a class="button icon fa-plus tool-btn alt" href="{% url 'story_create' %}" title="Nouvelle Story">Nouvelle Story</a>
 	</header>
 
 	<div id="stories">