Explorar el Código

Reprise page d'accueil: ok

olivier.massot hace 7 años
padre
commit
701b6ec4da
Se han modificado 1 ficheros con 33 adiciones y 22 borrados
  1. 33 22
      CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

+ 33 - 22
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -2,6 +2,7 @@
 
 @{
     string url = Request.Url.ToString();
+    bool isProd = (Request.ServerVariables["SERVER_NAME"] == "fichecollege.bas-rhin.fr");
     var controllerName = ViewContext.RouteData.Values["controller"].ToString();
     var actionName = ViewContext.RouteData.Values["action"].ToString();
 
@@ -38,17 +39,26 @@
 </head>
 <body>
     <div class="main-container-cache"></div>
+
+    @* Entete de page *@
     <header>
         <nav class="navbar-fixed-top navbar-default no-margin">
             <div id="topbar" class="navbar navbar-inner">
-                <div id="open-button" class="menu-button"><span>Menu invisible</span></div>
+
+                @* Logo menu déroulant *@
+                <div id="open-button" class="menu-button"><span>Menu</span></div>
+
+                @* Titre et année en cours *@
                 <ul id="titre" class="nav navbar ">
                     <li>
                         <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">
+
+                    @* Barre de recherche rapide *@
                     <li class="search">
                         <form action="@Url.Action("Index", "Recherche", new { })" class="search-form">
                             <label for="recherche" class="search-field">
@@ -58,6 +68,7 @@
                         </form>
                     </li>
 
+                    @* Panneau utilisateur *@
                     <li class="dropdown">
                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                             <span class="glyphicon glyphicon-user"></span>
@@ -89,26 +100,38 @@
 
             </div>
         </nav>
+
+        @* Menu déroulant *@
         <sidebar class="no-print navbar-collapse collapse hidden" >
             <ul class="sidebar-nav nav-stacked menu_principal">
                 <li>
-                    <a href="@Url.Action("Index", "home", new { })">
+                    <a href="@Url.Action("Index", "home", new { annee_id = Model.Obj.Id })">
                         <div class="menu-1">
                             <span class="fa fa-home title">Accueil</span>
                         </div>
                     </a>
                 </li>
                 <li>
-                    <a href="@Url.Action("Index", "Colleges", new { })">
+                    <a href="@Url.Action("Index", "Colleges", new { annee_id = Model.Obj.Id })">
                         <div class="menu-1">
                             <span class="fa fa-building title">Collèges</span>
                         </div>
                     </a>
                 </li>
+                <li>
+                    <a href="@Url.Action("Index", "ActionsEdu", new { annee_id = Model.Obj.Id })">
+                        <div class="menu-1">
+                            <span class="fa fa-building title">Actions</span>
+                        </div>
+                    </a>
+                </li>
             </ul>
         </sidebar>
     </header>
+
     <div id="wrapper">
+
+        @* Breadcrumb *@
         <div class="page-wrap no-print" >
             <ul class="background-color1" id="breadcrumbs-one">
                 <li><a href="/">Accueil</a><span class="divider"></span></li>
@@ -118,22 +141,13 @@
             @*@Html.MvcSiteMap().SiteMapPath()*@
         </div>
 
-        <!-- Menu de niveau 2 -->
-        @if (@Model.Acces != ModeAcces.Creation & (Model.Obj is College | Model.Obj is Identite))
-        {
-            <div>
-                <ul id="menu-l2">
-                    <li><a id="" class="@(controllerName == "Colleges" ? "active":"") btn-sm menu-color-@controllerName" href="@Url.Action("Details", "Colleges", new { id = Model.Obj.Id })">Général</a></li>
-                    <li><a id="" class="@(controllerName == "Identites" ? "active":"") btn-sm menu-color-@controllerName" href="@Url.Action("Details", "Identites", new { id = Model.Obj.Id })/">Identité</a></li>
-                </ul>
-            </div>
-        }
         <div id="content" >
-            @*@Html.Partial("_Flash")*@
             @RenderBody()
             <br /><br />
         </div>
     </div>
+
+    @* Pied de page *@
     <footer>
         <div class="container">
             <div class="row">
@@ -143,20 +157,17 @@
                     </div>
                     <div class="col-md-2">
                         <ul class="brand">
-                            @if (url.StartsWith("http://t-") == true || url.StartsWith("https://t-") == true)
-                            {
-                                <li><a href="/" title="Retour à l'accueil"><img src="~/Images/LogoCD67Recette.png" width="148" height="51" alt="CD67"></a></li>
-                            }
-                            else
-                            {
-                                <li><a href="/" title="Retour à l'accueil"><img src="~/Images/LogoCD67.png" width="148" height="51" alt="CD67"></a></li>
-                            }
+                            <li><a href="/" title="Retour à l'accueil">
+                            @if (isProd) { <img src="~/Images/LogoCD67.png" width="148" height="51" alt="CD67">;
+                            } else { <img src="~/Images/LogoCD67Recette.png" width="148" height="51" alt="CD67">; }
+                            </a></li>
                         </ul>
                     </div>
                 </div>
             </div>
         </div>
     </footer>
+
     @Scripts.Render("~/bundles/jquery")
     @RenderSection("Scripts", false)
 </body>