Browse Source

Style index colleges: ok

olivier.massot 7 years ago
parent
commit
2f91e0b7f9

+ 0 - 1
CD67.FicheCollege.MVC/CD67.FicheCollege.MVC.csproj

@@ -381,7 +381,6 @@
     <Content Include="Views\Shared\_Layout.cshtml" />
     <Content Include="Views\Shared\DisplayTemplates\YesNoInt.cshtml" />
     <Content Include="Views\Shared\EditorTemplates\YesNoInt.cshtml" />
-    <Content Include="Views\Home\Index.cshtml" />
     <Content Include="Views\Shared\DisplayTemplates\YesNoBool.cshtml" />
     <Content Include="Views\Shared\EditorTemplates\YesNoBool.cshtml" />
     <Content Include="Views\_ViewStart.cshtml" />

+ 58 - 11
CD67.FicheCollege.MVC/Content/cd67-custom.less

@@ -1,36 +1,37 @@
-@focus-color : #629DD1;
+@color1 : #629DD1;
+@color2 : #23527c;
 
 /* Breadcrumb et mise en avant */
 .color1 {
-    color: @focus-color;
+    color: @color1;
 }
 
 .menu_principal a, .menu_principal div {
-    background-color: @focus-color;
+    background-color: @color1;
 }
 
 .submenu a{
     background-color: #fff;
-    color: @focus-color;
+    color: @color1;
 }
 
 .menu-button{
-    background: @focus-color;
-    border-color: @focus-color;
+    background: @color1;
+    border-color: @color1;
 }
 
 .input-group-addon{
-    background-color: @focus-color;
-    border-color: @focus-color;
+    background-color: @color1;
+    border-color: @color1;
 }
 
 .menu_principal a:hover, .menu_principal div:hover {
-    background-color: darken(@focus-color, 25%);
+    background-color: darken(@color1, 25%);
 }
 
 legend {
     height: 40px !important;
-    border-color: @focus-color;
+    border-color: @color1;
 }
 
 #breadcrumbs-one a {
@@ -103,11 +104,16 @@ header nav{
     padding: 0 1em 0 1em;
 }
 
-.home-content {
+#content {
     margin: 4em auto;
     width: 80%;
 }
 
+/* Home */
+.home-content {
+    width: 100%;
+}
+
 .home-content .row {
     margin: 2em auto;
     height: 100%;
@@ -136,4 +142,45 @@ header nav{
 .home-content .card .input-search {
     width: 30%;
     min-width: 300px;
+}
+
+.breadcrumb-arrow {
+    float: left;
+    padding: 0.7em 0.5em 0.7em 0.5em;
+}
+
+/* Colleges */
+
+#content header {
+    display: flex;
+    flex-direction: row;
+    color: @color2;
+}
+
+#content header h2 {
+    flex: 2;
+    font-size: 1.8em;
+    margin: 0;
+}
+
+#content header a {
+    flex: 1;
+    padding: 0 1em;
+}
+
+/* Actions */
+
+.action-edu-tree {
+}
+
+.action-edu-tree h3 {
+    color: @color2;
+}
+
+.action-edu-tree h4 {
+    padding-left: 30px;
+}
+
+.action-edu-tree .action-edu-item {
+    padding-left: 30px;
 }

+ 27 - 27
CD67.FicheCollege.MVC/Views/ActionsEdu/Index.cshtml

@@ -11,32 +11,32 @@
     int cur_th_id = -1;
 }
 
-<h2>Les Actions</h2>
-
-@foreach (ActionEdu item in Model.Obj.ActionsEdu.OrderBy(a => a.ActionEduThematique.ActionEduAxe.Ordre).ThenBy(a => a.ActionEduThematique.Ordre).ThenBy(a => a.Ordre))
-{
-    if (item.ActionEduThematique.ActionEduAxe.Id != cur_axe_id){
-        cur_axe_id = item.ActionEduThematique.ActionEduAxe.Id;
-        <h3>@item.ActionEduThematique.ActionEduAxe.Nom</h3>
-    }
-    if (item.ActionEduThematique.Id != cur_th_id)
+<header>
+    <h2>Les Actions</h2>
+    <span>
+        <a href="@Url.Action("Index", "ActionEduAxes")"> <span class="glyphicon glyphicon-cog color1"></span> Axes</a>
+        <a href="@Url.Action("Index", "ActionEduThematiques")"> <span class="glyphicon glyphicon-cog color1"></span> Thématiques</a>
+    </span>
+</header>
+
+<div class="action-edu-tree">
+    @foreach (ActionEdu item in Model.Obj.ActionsEdu.OrderBy(a => a.ActionEduThematique.ActionEduAxe.Ordre).ThenBy(a => a.ActionEduThematique.Ordre).ThenBy(a => a.Ordre))
     {
-        cur_th_id = item.ActionEduThematique.Id;
-        <h4>@item.ActionEduThematique.Nom</h4>
+        if (item.ActionEduThematique.ActionEduAxe.Id != cur_axe_id){
+            cur_axe_id = item.ActionEduThematique.ActionEduAxe.Id;
+            <h3>@item.ActionEduThematique.ActionEduAxe.Nom</h3>
+        }
+        if (item.ActionEduThematique.Id != cur_th_id)
+        {
+            cur_th_id = item.ActionEduThematique.Id;
+            <h4>@item.ActionEduThematique.Nom</h4>
+        }
+
+        <div class="action-edu-item">
+            <span>
+                <a href="@Url.Action("Details", new { id = item.Id })">@Html.DisplayFor(modelItem => item.Numero) - @Html.DisplayFor(modelItem => item.Nom)</a>
+            </span>
+            <i>Collèges concernés: @item.ActionsEduColleges.Count()</i>
+        </div>
     }
-
-    <div>
-        <span>
-            <a href="@Url.Action("Details", new { id = item.Id })">@Html.DisplayFor(modelItem => item.Numero) - @Html.DisplayFor(modelItem => item.Nom)</a>
-        </span>
-        <i>Collèges concernés: @item.ActionsEduColleges.Count()</i>
-    </div>
-}
-
-
-<h3>Administration</h3>
-
-<ul>
-    <li>@Html.ActionLink("Les axes", "Index", "ActionEduAxes")</li>
-    <li>@Html.ActionLink("Les thématiques", "Index", "ActionEduThematiques")</li>
-</ul>
+</div>

+ 1 - 1
CD67.FicheCollege.MVC/Views/Annees/Details.cshtml

@@ -37,7 +37,7 @@
             
             <ul>
                 <li><input type="text" class="form-control input-search" name="recherche" id="recherche" placeholder="Rechercher une action..." data-auto="" value="@Request["recherche_action"]"></li>
-                <li>@Html.ActionLink("Voir toutes les actions", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)</li>
+                <li>@Html.ActionLink("Voir toutes les actions", "Index", "ActionsEdu", new { annee_id = Model.Obj.Id }, null)</li>
             </ul>
         </div>
     </div>

+ 40 - 43
CD67.FicheCollege.MVC/Views/Colleges/Index.cshtml

@@ -7,16 +7,17 @@
     College college_model = new College();
 }
 
-<h2>Les collèges @Model.Annee_Lib</h2>
-
-<p>
-    <a href="@Url.Action("Create", new { annee_id = Model.Obj.Id })">
-        <span class="glyphicon glyphicon-plus-sign fa-2x color1" style="vertical-align: middle" aria-hidden="true"></span>
-        Ajouter un nouveau collège
-    </a>
-</p>
+<header>
+    <h2>Les collèges @Model.Annee_Lib</h2>
+    <span>
+        <a href="@Url.Action("Create", new { annee_id = Model.Obj.Id })"> <span class="glyphicon glyphicon-plus-sign color1"></span> Nouveau collège</a>
+        <a href="@Url.Action("Index", "TypeCollege")"> <span class="glyphicon glyphicon-cog color1"></span> Types de collège</a>
+        <a href="@Url.Action("Index", "Territoire")"> <span class="glyphicon glyphicon-cog color1"></span> Territoires</a>
+    </span>
+</header>
 
 <table class="table">
+    <caption>  </caption>
     <tr>
         <th>
             @Html.DisplayNameFor(model => college_model.Id)
@@ -47,41 +48,37 @@
         </th>
     </tr>
 
-@foreach (College college in Model.Obj.Colleges) {
-    <tr>
-        <td>
-            @Html.ActionLink(college.CodeRne.ToString(), "Details", new { id = college.Id })
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.Libelle)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.AdresseComplete)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.CDC)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.Tel)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.Fax)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.Email)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.Territoire.Libelle)
-        </td>
-        <td>
-            @Html.DisplayFor(modelcollege => college.TypeCollege.Libelle)
-        </td>
-    </tr>
-}
+    @foreach (College college in Model.Obj.Colleges) {
+        <tr>
+            <td>
+                @Html.ActionLink(college.CodeRne.ToString(), "Details", new { id = college.Id })
+            </td>
+            <td>
+                @Html.ActionLink(college.Libelle.ToString(), "Details", new { id = college.Id })
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.AdresseComplete)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.CDC)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.Tel)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.Fax)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.Email)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.Territoire.Libelle)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.TypeCollege.Libelle)
+            </td>
+        </tr>
+    }
 
 </table>
 
-<h3>Administation</h3>
-
-@Html.ActionLink("Types de collège", "Index", "TypeCollege")<br />
-@Html.ActionLink("Territoires", "Index", "Territoire")<br />

+ 0 - 12
CD67.FicheCollege.MVC/Views/Home/Index.cshtml

@@ -1,12 +0,0 @@
-<title>Accueil</title>
-
-@{
-    ViewBag.Title = "Accueil";
-    Layout = "~/Views/Shared/_Layout.cshtml";
-}
-
-<h1>Accueil</h1>
-
-@Html.ActionLink("Les collèges", "Index", "Colleges")<br />
-@Html.ActionLink("Les actions éducatives, sportives et culturelles", "Index", "Colleges")<br />
-@Html.ActionLink("La page d'administration du site", "Index", "Admin")<br />

+ 2 - 3
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -54,7 +54,6 @@
                         <h1 id="app-title">Fiches collège <a href="/Annees">@Model.Annee_Lib <sup class="fa fa-edit sup"></sup></a></h1>
                     </li>
                 </ul>
-
                 
                 <ul class="nav navbar-nav navbar-right">
 
@@ -135,13 +134,13 @@
         <div class="no-print" >
             <ul class="background-color1" id="breadcrumbs-one">
                 <li><a href="/">Accueil</a><span class="divider"></span></li>
-                <li><a>&gt;</a><span class="divider"></span></li>
+                <li><i class="breadcrumb-arrow">&gt;</i><span class="divider"></span></li>
                 <li>@Html.ActionLink("Collèges", "Index", "Colleges")</li>
             </ul>
             @*@Html.MvcSiteMap().SiteMapPath()*@
         </div>
 
-        <div id="content container">
+        <div id="content" class="container">
             @RenderBody()
         </div>
     </div>