Browse Source

maj style story_form

olivier.massot 7 năm trước cách đây
mục cha
commit
b14e8edc16
3 tập tin đã thay đổi với 133 bổ sung113 xóa
  1. 95 78
      main/static/css/custom.css
  2. 22 22
      main/templates/story_details.html
  3. 16 13
      main/templates/story_form.html

+ 95 - 78
main/static/css/custom.css

@@ -1,79 +1,96 @@
-/* Transversal */
-
-.error {
-	color: red;
-	font-weight: 700;
-}
-
-.valid {
-	color: green;
-}
-
-.annotation {
-	color: #595959;
-	font-size: 0.8em;
-}
-
-.datatable {
-	width: 100% !important;
-}
-
-.flex-row{
-    display: flex;
-    flex-direction: row;
-}
-
-.flex-col{
-    display: flex;
-    flex-direction: column;
-}
-
-.flex-extend{
-	flex: 1;
-}
-
-.flex-end{
-    align-self: flex-end;
-}
-
-.hidden {
-    display: none;
-}
-
-.disabled{
-    pointer-events: none;
-}
-
-.fa {
-	margin-right: 0.3em;
-}
-
-.tool-btn {
-	padding-top: 0;
-	padding-right: 1em;
-	height: 2.5em;
-	font-size: 1em;
-	line-height: 2.5em;
-}
-
-.description {
-	padding: 1em;
-	margin: 1em 1em 2em 1em;
-}
-
-.description h1, h2, h3, h4, h5 {
-	color: #333333;
-}
-
-/* Index */
-
-.issue-title a {
-	color: #2e2e2e;
-	font-size: 14px;
-	font-wright: 600;
-	text-decoration: none;
-}
-
-.issue-title a:hover {
-	text-decoration: underline;
+/* Transversal */
+
+.error {
+	color: red;
+	font-weight: 700;
+}
+
+.valid {
+	color: green;
+}
+
+.annotation {
+	color: #595959;
+	font-size: 0.8em;
+}
+
+.datatable {
+	width: 100% !important;
+}
+
+.flex-row{
+    display: flex;
+    flex-direction: row;
+}
+
+.flex-col{
+    display: flex;
+    flex-direction: column;
+}
+
+.flex-extend{
+	flex: 1;
+}
+
+.flex-end{
+    justify-content: flex-end;
+}
+
+.hidden {
+    display: none;
+}
+
+.disabled{
+    pointer-events: none;
+}
+
+.fa {
+	margin-right: 0.3em;
+}
+
+select[multiple] {
+	padding-top: 0.8em;
+	min-height: 5em;
+}
+
+.tool-btn {
+	padding-top: 0;
+	padding-right: 1em;
+	height: 2.5em;
+	font-size: 1em;
+	line-height: 2.5em;
+}
+
+.description {
+	padding: 1em;
+	margin: 1em 1em 2em 1em;
+}
+
+.description h1, h2, h3, h4, h5 {
+	color: #333333;
+}
+
+.tags-list {
+	list-style: none;
+}
+
+.tags-list li {
+	display: inline;
+}
+
+.tags-list li:not(:first-child) {
+	border-left: solid 1px #bfbfbf;
+}
+
+/* Index */
+
+.issue-title a {
+	color: #2e2e2e;
+	font-size: 14px;
+	font-wright: 600;
+	text-decoration: none;
+}
+
+.issue-title a:hover {
+	text-decoration: underline;
 }

+ 22 - 22
main/templates/story_details.html

@@ -1,23 +1,23 @@
-{% extends '_layout.html' %}
-
-{% block main %}
-	{% load martortags %}
-	
-	<header class="flex-row">
-		<h2 class="flex-extend">{{ story.name }}</h2>
-	
-		<ul class="actions small">
-			<li><a class="button special icon fa-edit tool-btn" href="{% url 'story_edit' story_id=story.id %}"></a></li>
-			<li><a class="button icon fa-trash tool-btn" href="{% url 'story_delete' story_id=story.id %}"></a></li>
-		</ul>
-	</header>
-	
-	<div class="description">
-		{{ story.description|safe_markdown }}
-	</div>
-
-	<div>Auteur: {{ story.author.get_full_name }}</div>
-	<div>Assignée à: {% for user in story.assignees.all %}{{ user.get_full_name }}{% empty %}(Aucun){% endfor %}</div>
-	<div>Sprints: {% for sprint in story.sprints.all %}{{ sprint }}{% empty %}(Aucun){% endfor %}</div>
-
+{% extends '_layout.html' %}
+
+{% block main %}
+	{% load martortags %}
+	
+	<header class="flex-row">
+		<h2 class="flex-extend">{{ story.name }}</h2>
+	
+		<ul class="actions small">
+			<li><a class="button special icon fa-edit tool-btn" href="{% url 'story_edit' story_id=story.id %}"></a></li>
+			<li><a class="button icon fa-trash tool-btn" href="{% url 'story_delete' story_id=story.id %}"></a></li>
+		</ul>
+	</header>
+	
+	<div class="description">
+		{{ story.description|safe_markdown }}
+	</div>
+
+	<p>Auteur: {{ story.author.get_full_name }}</p>
+	<p>Assignée à: <ul class="tags-list">{% for user in story.assignees.all %}<li>{{ user.get_full_name }}</li>{% empty %}<li>(Aucun)</li>{% endfor %}</ul></p>
+	<p>Sprints: <ul class="tags-list">{% for sprint in story.sprints.all %}<li>{{ sprint }}</li>{% empty %}<li>(Aucun)</li>{% endfor %}</ul></p>
+	
 {% endblock %}

+ 16 - 13
main/templates/story_form.html

@@ -1,14 +1,17 @@
-{% extends '_layout.html' %}
-
-{% block main %}
-	
-	<h2>Nouvelle Story</h2>
-	<form action="." method="post" enctype="multipart/form-data">
-	{% csrf_token %}
-	
-	{{ form.as_p }}
-
-	<input type="submit" value="Enregistrer">
-	</form>
-		
+{% extends '_layout.html' %}
+
+{% block main %}
+	
+	<h2>Nouvelle Story</h2>
+	<form action="." method="post" enctype="multipart/form-data">
+	{% csrf_token %}
+	
+	{{ form.as_p }}
+
+	<div class="flex-row flex-end">
+		<input type="submit" value="Enregistrer">
+	</div>
+	
+	</form>
+		
 {% endblock %}