Explorar el Código

Colleges: crud style ok

olivier.massot hace 7 años
padre
commit
340c3b2f7d

+ 17 - 6
CD67.FicheCollege.MVC/Views/Colleges/Details.cshtml

@@ -7,9 +7,10 @@
     College college = Model.Obj;
 }
 
-<h1>
-    Informations générales <br/><span>du @college.Libelle</span>
-</h1>
+
+<header>
+    <h2>@college.Libelle</h2>
+</header>
 
 @if(Model.Acces==ModeAcces.Suppression) {
     <h2 class="text-danger">Voulez-vous vraiment supprimer cet élément?</h2>
@@ -20,7 +21,7 @@
 
 <fieldset>
     <legend>
-        Données de base
+        Informations générales
         @if (Model.Acces == ModeAcces.Lecture)
         {
             <div class="pull-right">
@@ -114,8 +115,18 @@
         @Html.AntiForgeryToken()
 
         <div class="form-actions no-color">
-            <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" /> |
-            @Html.ActionLink("Annuler", "Details", new { Id = college.Id })
+            <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" />
         </div>
+
+        <br/>
+        <div>@Html.ActionLink("Annuler", "Details", new { Id = college.Id })</div>
+
     }
+
 }
+else
+{
+    <div>
+        @Html.ActionLink("Retour à la liste", "Index", new { annee_id = college.Annee_Id })
+    </div>
+}

+ 12 - 12
CD67.FicheCollege.MVC/Views/Colleges/Edit.cshtml

@@ -7,14 +7,17 @@
     College college = Model.Obj;
 }
 
-@if (Model.Acces == ModeAcces.Modification)
-{
-    <h1>@college.Libelle</h1>
-}
-else
-{
-    <h1>Nouveau collège</h1>
-}
+
+<header>
+    @if (Model.Acces == ModeAcces.Modification)
+    {
+        <h2>@college.Libelle</h2>
+    }
+    else
+    {
+        <h2>Nouveau collège</h2>
+    }
+</header>
 
 @using (Html.BeginForm())
 {
@@ -27,9 +30,6 @@ else
         </legend>
 
         <div class="form-horizontal">
-            <h4>Collège</h4>
-            <hr />
-
             @Html.ValidationSummary(true, "", new { @class = "text-danger" })
 
             @if (Model.Acces == ModeAcces.Modification)
@@ -152,7 +152,7 @@ else
 
             <div class="form-group">
                 <div class="col-md-offset-2 col-md-10">
-                    <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" /> |
+                    <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" />
                     @if (Model.Acces == ModeAcces.Creation)
                     { @Html.ActionLink("Annuler", "Index") }
                     else

+ 1 - 1
CD67.FicheCollege.MVC/Views/Colleges/Index.cshtml

@@ -20,7 +20,7 @@
     <thead>
         <tr>
             <th>
-                @Html.DisplayNameFor(model => college_model.Id)
+                RNE
             </th>
             <th>
                 @Html.DisplayNameFor(model => college_model.Libelle)