浏览代码

Supresion du modèle ActionClas et de toutes ses dépendances: table, factory, views...

olivier.massot 7 年之前
父节点
当前提交
3dcc54a58b

+ 0 - 7
CD67.FicheCollege.BDD/Actions-CLAS.sql

@@ -1,7 +0,0 @@
-CREATE TABLE [dbo].[Actions-CLAS]
-(
-	[College_Id] INT NOT NULL PRIMARY KEY, 
-    [Action] BIT NULL, 
-    [Commentaire] NTEXT NULL, 
-    CONSTRAINT [FK_Actions-CLAS_College] FOREIGN KEY ([College_Id]) REFERENCES [Colleges]([Id])
-)

+ 0 - 1
CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj

@@ -64,7 +64,6 @@
     <Build Include="Territoires.sql" />
     <Build Include="Colleges.sql" />
     <Build Include="Identites.sql" />
-    <Build Include="Actions-CLAS.sql" />
     <Build Include="Annees.sql" />
   </ItemGroup>
   <ItemGroup>

+ 0 - 29
CD67.FicheCollege.Entity/ActionCLAS.cs

@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     Ce code a été généré à partir d'un modèle.
-//
-//     Des modifications manuelles apportées à ce fichier peuvent conduire à un comportement inattendu de votre application.
-//     Les modifications manuelles apportées à ce fichier sont remplacées si le code est régénéré.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace CD67.FicheCollege.Entity
-{
-    using System;
-    using System.Collections.Generic;
-    
-    public partial class ActionCLAS
-    {
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
-        public ActionCLAS()
-        {
-            this.Action = false;
-        }
-    
-        public int College_Id { get; set; }
-        public bool Action { get; set; }
-        public string Commentaire { get; set; }
-    
-        public virtual College College { get; set; }
-    }
-}

+ 0 - 4
CD67.FicheCollege.Entity/CD67.FicheCollege.Entity.csproj

@@ -59,9 +59,6 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="ActionCLAS.cs">
-      <DependentUpon>EntityModel.tt</DependentUpon>
-    </Compile>
     <Compile Include="Annee.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
@@ -84,7 +81,6 @@
       <DependentUpon>EntityModel.edmx</DependentUpon>
     </Compile>
     <Compile Include="Extend\Annee.cs" />
-    <Compile Include="Extend\ActionCLAS.cs" />
     <Compile Include="Extend\College.cs" />
     <Compile Include="Extend\Territoire.cs" />
     <Compile Include="Extend\Identite.cs" />

+ 0 - 1
CD67.FicheCollege.Entity/College.cs

@@ -35,6 +35,5 @@ namespace CD67.FicheCollege.Entity
         public virtual TypeCollege TypeCollege { get; set; }
         public virtual Identite Identite { get; set; }
         public virtual Annee Annee { get; set; }
-        public virtual ActionCLAS Actions_CLAS { get; set; }
     }
 }

+ 0 - 1
CD67.FicheCollege.Entity/EntityModel.Context.cs

@@ -30,6 +30,5 @@ namespace CD67.FicheCollege.Entity
         public virtual DbSet<College> Colleges { get; set; }
         public virtual DbSet<Identite> Identites { get; set; }
         public virtual DbSet<Annee> Annees { get; set; }
-        public virtual DbSet<ActionCLAS> ActionsCLAS { get; set; }
     }
 }

+ 0 - 61
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -5,14 +5,6 @@
     <!-- SSDL content -->
     <edmx:StorageModels>
     <Schema Namespace="CD67.FicheCollege.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
-        <EntityType Name="Actions-CLAS">
-          <Key>
-            <PropertyRef Name="College_Id" />
-          </Key>
-          <Property Name="College_Id" Type="int" Nullable="false" />
-          <Property Name="Action" Type="bit" />
-          <Property Name="Commentaire" Type="ntext" />
-        </EntityType>
         <EntityType Name="Annees">
           <Key>
             <PropertyRef Name="Id" />
@@ -97,18 +89,6 @@
           <Property Name="Libelle" Type="nvarchar" MaxLength="255" Nullable="false" />
           <Property Name="Ordre" Type="int" Nullable="false" />
         </EntityType>
-        <Association Name="FK_Actions-CLAS_College">
-          <End Role="Colleges" Type="Self.Colleges" Multiplicity="1" />
-          <End Role="Actions-CLAS" Type="Self.Actions-CLAS" Multiplicity="0..1" />
-          <ReferentialConstraint>
-            <Principal Role="Colleges">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Actions-CLAS">
-              <PropertyRef Name="College_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         <Association Name="FK_Annees_Colleges">
           <End Role="Annees" Type="Self.Annees" Multiplicity="1" />
           <End Role="Colleges" Type="Self.Colleges" Multiplicity="*" />
@@ -158,16 +138,11 @@
           </ReferentialConstraint>
         </Association>
         <EntityContainer Name="CD67FicheCollegeStoreContainer">
-          <EntitySet Name="Actions-CLAS" EntityType="Self.Actions-CLAS" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Annees" EntityType="Self.Annees" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Colleges" EntityType="Self.Colleges" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Identites" EntityType="Self.Identites" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Territoires" EntityType="Self.Territoires" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="TypesCollege" EntityType="Self.TypesCollege" Schema="dbo" store:Type="Tables" />
-          <AssociationSet Name="FK_Actions-CLAS_College" Association="Self.FK_Actions-CLAS_College">
-            <End Role="Colleges" EntitySet="Colleges" />
-            <End Role="Actions-CLAS" EntitySet="Actions-CLAS" />
-          </AssociationSet>
           <AssociationSet Name="FK_Annees_Colleges" Association="Self.FK_Annees_Colleges">
             <End Role="Annees" EntitySet="Annees" />
             <End Role="Colleges" EntitySet="Colleges" />
@@ -211,11 +186,6 @@
             <End Role="Annee" EntitySet="Annees" />
             <End Role="College" EntitySet="Colleges" />
           </AssociationSet>
-          <EntitySet Name="ActionsCLAS" EntityType="CD67.FicheCollege.ActionCLAS" />
-          <AssociationSet Name="FK_Actions_CLAS_College" Association="CD67.FicheCollege.FK_Actions_CLAS_College">
-            <End Role="College" EntitySet="Colleges" />
-            <End Role="Actions_CLAS" EntitySet="ActionsCLAS" />
-          </AssociationSet>
           </EntityContainer>
         <EntityType Name="TypeCollege">
           <Key>
@@ -265,7 +235,6 @@
           <NavigationProperty Name="TypeCollege" Relationship="CD67.FicheCollege.FK_Colleges_TypesCollege" FromRole="College" ToRole="TypeCollege" />
           <NavigationProperty Name="Identite" Relationship="CD67.FicheCollege.FK_FicheIdentite_College" FromRole="College" ToRole="Identite" />
           <NavigationProperty Name="Annee" Relationship="CD67.FicheCollege.AnneeCollege" FromRole="College" ToRole="Annee" />
-          <NavigationProperty Name="Actions_CLAS" Relationship="CD67.FicheCollege.FK_Actions_CLAS_College" FromRole="College" ToRole="Actions_CLAS" />
         </EntityType>
         <Association Name="FK_Colleges_Territoires">
           <End Type="CD67.FicheCollege.Territoire" Role="Territoire" Multiplicity="0..1" />
@@ -358,27 +327,6 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <EntityType Name="ActionCLAS">
-          <Key>
-            <PropertyRef Name="College_Id" />
-          </Key>
-          <Property Name="College_Id" Type="Int32" Nullable="false" />
-          <Property Name="Action" Type="Boolean" Nullable="false" DefaultValue="false" />
-          <Property Name="Commentaire" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
-          <NavigationProperty Name="College" Relationship="CD67.FicheCollege.FK_Actions_CLAS_College" FromRole="Actions_CLAS" ToRole="College" />
-        </EntityType>
-        <Association Name="FK_Actions_CLAS_College">
-          <End Type="CD67.FicheCollege.College" Role="College" Multiplicity="1" />
-          <End Type="CD67.FicheCollege.ActionCLAS" Role="Actions_CLAS" Multiplicity="0..1" />
-          <ReferentialConstraint>
-            <Principal Role="College">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Actions_CLAS">
-              <PropertyRef Name="College_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -474,15 +422,6 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
-          <EntitySetMapping Name="ActionsCLAS">
-            <EntityTypeMapping TypeName="CD67.FicheCollege.ActionCLAS">
-              <MappingFragment StoreEntitySet="Actions-CLAS">
-                <ScalarProperty Name="Commentaire" ColumnName="Commentaire" />
-                <ScalarProperty Name="Action" ColumnName="Action" />
-                <ScalarProperty Name="College_Id" ColumnName="College_Id" />
-              </MappingFragment>
-            </EntityTypeMapping>
-          </EntitySetMapping>
   </EntityContainerMapping>
 </Mapping></edmx:Mappings>
   </edmx:Runtime>

+ 0 - 2
CD67.FicheCollege.Entity/EntityModel.edmx.diagram

@@ -14,8 +14,6 @@
         <AssociationConnector Association="CD67.FicheCollege.FK_FicheIdentite_College" />
         <EntityTypeShape EntityType="CD67.FicheCollege.Annee" Width="1.5" PointX="3" PointY="0.5" />
         <AssociationConnector Association="CD67.FicheCollege.AnneeCollege" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.ActionCLAS" Width="1.5" PointX="6.125" PointY="1.125" />
-        <AssociationConnector Association="CD67.FicheCollege.FK_Actions_CLAS_College" />
         </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 0 - 6
CD67.FicheCollege.Entity/EntityModel.edmx.sql

@@ -17,9 +17,6 @@ GO
 -- Dropping existing FOREIGN KEY constraints
 -- --------------------------------------------------
 
-IF OBJECT_ID(N'[dbo].[FK_Actions-CLAS_College]', 'F') IS NOT NULL
-    ALTER TABLE [dbo].[Actions-CLAS] DROP CONSTRAINT [FK_Actions-CLAS_College];
-GO
 IF OBJECT_ID(N'[dbo].[FK_Colleges_Territoires]', 'F') IS NOT NULL
     ALTER TABLE [dbo].[Colleges] DROP CONSTRAINT [FK_Colleges_Territoires];
 GO
@@ -34,9 +31,6 @@ GO
 -- Dropping existing tables
 -- --------------------------------------------------
 
-IF OBJECT_ID(N'[dbo].[Actions-CLAS]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[Actions-CLAS];
-GO
 IF OBJECT_ID(N'[dbo].[Colleges]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Colleges];
 GO

+ 0 - 30
CD67.FicheCollege.Entity/Extend/ActionCLAS.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CD67.FicheCollege.Entity
-{
-    /// <summary>
-    /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
-    /// </summary>
-    [MetadataType(typeof(ActionCLAS_Metadata))]
-    public partial class ActionCLAS
-    {
-        public int Id { get { return College_Id; } }
-    }
-
-    /// <summary>
-    /// Classe contenant les DataAnnotations pour chaque champ
-    /// </summary>
-    public class ActionCLAS_Metadata
-    {
-        //[UIHint("YesNoBool")]
-        public bool? Action { get; set; }
-
-        [DataType(DataType.MultilineText)]
-        public string Commentaire { get; set; }
-    }
-}

+ 0 - 30
CD67.FicheCollege.Factory/ActionCLASFactory.cs

@@ -1,30 +0,0 @@
-using CD67.FicheCollege.Entity;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Data.Entity;
-
-namespace CD67.FicheCollege.Factory
-{
-    public partial class ActionCLASFactory : Internal.BaseFactory<ActionCLAS>
-    {
-        public override ActionCLAS getById(params object[] keyValues)
-        {
-            //si l'élément n'existe pas, on le créé
-            ActionCLAS item = base.getById(keyValues);
-            if(item == null)
-            {
-                int id = (int)keyValues[0];
-                item = new ActionCLAS()
-                {
-                    College_Id = id
-                };
-                this.add(ref item);
-                dbContext.Entry(item).Reference(i => i.College).Load();
-            }
-
-            return item;
-        }
-    }
-}

+ 0 - 4
CD67.FicheCollege.Factory/CD67.FicheCollege.Factory.csproj

@@ -56,11 +56,7 @@
   <ItemGroup>
     <Compile Include="AnneeFactory.cs" />
     <Compile Include="CollegeFactory.cs" />
-    <Compile Include="ActionCLASFactory.cs" />
     <Compile Include="IdentiteFactory.cs" />
-    <Compile Include="Internal\ActionCLASFactory.cs">
-      <DependentUpon>GenericFactories.tt</DependentUpon>
-    </Compile>
     <Compile Include="Internal\AnneeFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>

+ 0 - 9
CD67.FicheCollege.Factory/CollegeFactory.cs

@@ -21,15 +21,6 @@ namespace CD67.FicheCollege.Factory
                 identiteFactory.delete(ref identite);
             }
 
-            //ActionsCLAS
-            ActionCLASFactory actionCLASFactory = new ActionCLASFactory(dbContext);
-            if (entity.Actions_CLAS == null) dbContext.Entry(entity).Reference(i => i.Actions_CLAS).Load();
-            if (entity.Actions_CLAS != null)
-            {
-                Entity.ActionCLAS actionCLAS = entity.Actions_CLAS;
-                actionCLASFactory.delete(ref actionCLAS);
-            }
-
             base.delete(ref entity);
         }
     }

+ 0 - 21
CD67.FicheCollege.Factory/Internal/ActionCLASFactory.cs

@@ -1,21 +0,0 @@
-using CD67.FicheCollege.Entity;
-using System.Linq;
-
-namespace CD67.FicheCollege.Factory
-{
-	/// <summary>
-    /// NE PAS MODIFIER
-    /// C'est une classe partielle, elle peut être complétée avec une classe partielle du même nom
-    /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
-    /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
-    /// </summary>
-	public partial class ActionCLASFactory : Internal.BaseFactory<Entity.ActionCLAS>
-	{
-		/// <summary>
-        /// Constructeur public lié au constructeur de base
-        /// </summary>
-        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
-		public ActionCLASFactory(Entities dbContext) : base(dbContext) { }
-	}
-}
-	

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

@@ -156,7 +156,6 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="App_Start\BundleConfig.cs" />
-    <Compile Include="Controllers\ActionsCLASController.cs" />
     <Compile Include="Controllers\AdminController.cs" />
     <Compile Include="Controllers\CollegesController.cs" />
     <Compile Include="Controllers\GestionActionsController.cs" />
@@ -173,7 +172,6 @@
     <Compile Include="Internal\MvcHtmlHelpers.cs" />
     <Compile Include="Internal\Navigation.cs" />
     <Compile Include="Internal\UtilisateurConnecteFactory.cs" />
-    <Compile Include="Models\ActionClasViewModel.cs" />
     <Compile Include="Models\IdentiteViewModel.cs" />
     <Compile Include="Models\CollegeViewModel.cs" />
     <Compile Include="Models\AnneeViewModel.cs" />
@@ -392,8 +390,6 @@
     <Content Include="Views\Colleges\Edit.cshtml" />
     <Content Include="Views\Identites\Details.cshtml" />
     <Content Include="Views\Identites\Edit.cshtml" />
-    <Content Include="Views\ActionsCLAS\Details.cshtml" />
-    <Content Include="Views\ActionsCLAS\Edit.cshtml" />
     <Content Include="Views\GestionActions\Index.cshtml" />
     <Content Include="Views\Annees\Details.cshtml" />
     <Content Include="Views\Annees\Index.cshtml" />

+ 0 - 81
CD67.FicheCollege.MVC/Controllers/ActionsCLASController.cs

@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Data.Entity;
-using System.Linq;
-using System.Net;
-using System.Web;
-using System.Web.Mvc;
-using CD67.FicheCollege.Entity;
-using CD67.FicheCollege.Factory;
-using CD67.FicheCollege.MVC.Models;
-
-namespace CD67.FicheCollege.MVC.Controllers
-{
-    public class ActionsCLASController : Controller
-    {
-        private Entities db = new Entities();
-
-        // GET: ActionCLAS/Details/5
-        public ActionResult Details(int? id)
-        {
-            if (id == null)
-            {
-                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
-            }
-            ActionCLASFactory actionClasFactory = new ActionCLASFactory(db);
-            ActionCLAS actionClas = actionClasFactory.getById(id);
-            if (actionClas == null)
-            {
-                return HttpNotFound();
-            }
-
-            ActionClasViewModel model = new ActionClasViewModel(actionClas);
-            return View(model);
-        }
-
-        // GET: ActionCLAS/Edit/5
-        public ActionResult Edit(int? id)
-        {
-            if (id == null)
-            {
-                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
-            }
-            ActionCLASFactory actionClasFactory = new ActionCLASFactory(db);
-            Entity.ActionCLAS actionClas = actionClasFactory.getById(id);
-            if (actionClas == null)
-            {
-                return HttpNotFound();
-            }
-            ActionClasViewModel model = new ActionClasViewModel(actionClas, ModeAcces.Modification);
-            return View(model);
-        }
-
-        // POST: ActionCLAS/Edit/5
-        // Afin de déjouer les attaques par sur-validation, activez les propriétés spécifiques que vous voulez lier. Pour 
-        // plus de détails, voir  http://go.microsoft.com/fwlink/?LinkId=317598.
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public ActionResult Edit(ActionCLAS actionClas)
-        {
-            if (ModelState.IsValid)
-            {
-                ActionCLASFactory actionClasFactory = new ActionCLASFactory(db);
-                actionClasFactory.update(ref actionClas);
-                return RedirectToAction("Details", new { id = actionClas.College_Id });
-            }
-
-            ActionClasViewModel model = new ActionClasViewModel(actionClas, ModeAcces.Modification);
-            return View(model);
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                db.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-    }
-}

+ 0 - 15
CD67.FicheCollege.MVC/Models/ActionClasViewModel.cs

@@ -1,15 +0,0 @@
-using CD67.FicheCollege.Entity;
-using System.Collections.Generic;
-
-namespace CD67.FicheCollege.MVC.Models
-{
-    public class ActionClasViewModel : BaseViewModel<ActionCLAS>
-    {
-
-        public ActionClasViewModel(ActionCLAS model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
-        {
-        }
-
-        public override string Annee_Lib { get { return Obj.College.Annee.Libelle; } }
-    }
-}

+ 0 - 41
CD67.FicheCollege.MVC/Views/ActionsCLAS/Details.cshtml

@@ -1,41 +0,0 @@
-@using CD67.FicheCollege.MVC.Models
-@model ActionClasViewModel
-
-@{
-    ViewBag.Title = "Details";
-    Layout = "~/Views/Shared/_Layout.cshtml";
-    ActionCLAS actionClas = Model.Obj;
-}
-
-<h1>
-    Actions éducatives, sportives et culturelles
-    <br /><span>du @actionClas.College.Libelle</span>
-</h1>
-
-<fieldset>
-    <legend>
-        Actions CLAS
-        @if (Model.Acces == ModeAcces.Lecture)
-        {
-            <div class="pull-right">
-                @Html.ActionLink("Modifier", "Edit", "ActionsCLAS", new { Id = actionClas.College_Id }, new { @class = "btn btn-default" })
-            </div>
-        }
-    </legend>
-
-    <dl class="dl-horizontal">
-        <dt>
-            @Html.DisplayNameFor(model => actionClas.Action)
-        </dt>
-
-        <dd>
-            @Html.DisplayFor(model => actionClas.Action)
-        </dd>
-
-        <dt>
-            @Html.DisplayNameFor(model => actionClas.Commentaire)
-        </dt>
-
-        <dd style="white-space: pre-line;">@Html.DisplayFor(model => actionClas.Commentaire)</dd>
-    </dl>
-</fieldset>

+ 0 - 54
CD67.FicheCollege.MVC/Views/ActionsCLAS/Edit.cshtml

@@ -1,54 +0,0 @@
-@using CD67.FicheCollege.MVC.Models
-@model ActionClasViewModel
-
-@{
-    ViewBag.Title = "Edit";
-    Layout = "~/Views/Shared/_Layout.cshtml";
-    ActionCLAS actionClas = Model.Obj;
-}
-
-<h1>@actionClas.College.Libelle</h1>
-
-@using (Html.BeginForm())
-{
-    @Html.AntiForgeryToken()
-    
-        <fieldset>
-        <legend>
-            Actions CLAS - @Model.Acces.ToString()
-        </legend>
-        <div class="form-horizontal">
-            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
-            @Html.HiddenFor(model => actionClas.College_Id)
-
-            <div class="form-group">
-                @Html.LabelFor(model => actionClas.Action, htmlAttributes: new { @class = "control-label col-md-2" })
-                <div class="col-md-10">
-                    <div class="checkbox">
-                        @Html.EditorFor(model => actionClas.Action)
-                        @Html.ValidationMessageFor(model => actionClas.Action, "", new { @class = "text-danger" })
-                    </div>
-                </div>
-            </div>
-
-            <div class="form-group">
-                @Html.LabelFor(model => actionClas.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
-                <div class="col-md-10">
-                    @Html.EditorFor(model => actionClas.Commentaire, new { htmlAttributes = new { @class = "form-control", @rows = 10 } })
-                    @Html.ValidationMessageFor(model => actionClas.Commentaire, "", new { @class = "text-danger" })
-                </div>
-            </div>
-
-            <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" /> |
-                    @Html.ActionLink("Annuler", "Details", new { Id = actionClas.College_Id })
-                </div>
-            </div>
-        </div>
-    </fieldset>
-}
-
-@section Scripts {
-    @Scripts.Render("~/bundles/jqueryval")
-}

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

@@ -10,6 +10,4 @@
 
 <h1>Accueil @(Model.Obj.Libelle)</h1>
 
-@Html.ActionLink("Les collèges", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)<br />
-@Html.ActionLink("Les actions éducatives, sportives et culturelles", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)<br />
-@Html.ActionLink("La page d'administration du site", "Index", "Admin")<br />
+@Html.ActionLink("Les collèges", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)<br />

+ 1 - 16
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -105,20 +105,6 @@
                         </div>
                     </a>
                 </li>
-                <li>
-                    <a href="@Url.Action("Index", "GestionActions", new { })">
-                        <div class="menu-1">
-                            <span class="fa fa-graduation-cap title">Actions</span>
-                        </div>
-                    </a>
-                </li>
-                <li>
-                    <a href="@Url.Action("Index", "Admin", new { })">
-                        <div class="menu-1">
-                            <span class="fa fa-cog title">Administration</span>
-                        </div>
-                    </a>
-                </li>
             </ul>
         </sidebar>
     </header>
@@ -133,13 +119,12 @@
         </div>
 
         <!-- Menu de niveau 2 -->
-        @if (Model.Obj is College | Model.Obj is Identite | Model.Obj is ActionCLAS)
+        @if (@Model.ModeAcces != 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>
-                    <li><a id="" class="@(controllerName == "ActionsCLAS" ? "active":"") btn-sm menu-color-@controllerName" href="@Url.Action("Details", "ActionsCLAS", new { id = Model.Obj.Id })/">Actions</a></li>
                 </ul>
             </div>
         }