olivier.massot 7 gadi atpakaļ
vecāks
revīzija
3759317def

+ 3 - 1
CD67.FicheCollege.Entity/ActionEduActeur.cs

@@ -18,8 +18,10 @@ namespace CD67.FicheCollege.Entity
         public string Nom { get; set; }
         public string Sid { get; set; }
         public int RoleId { get; set; }
+        public string Commentaire { get; set; }
         public int ActionEduId { get; set; }
     
-        public virtual ActionEdu ActionsEdu { get; set; }
+        public virtual ActionEdu ActionEdu { get; set; }
+        public virtual ActionEduActeurRole ActionEduActeurRole { get; set; }
     }
 }

+ 30 - 0
CD67.FicheCollege.Entity/ActionEduActeurRole.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <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 ActionEduActeurRole
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public ActionEduActeurRole()
+        {
+            this.ActionEduActeurs = new HashSet<ActionEduActeur>();
+        }
+    
+        public int Id { get; set; }
+        public string Libelle { get; set; }
+        public int Ordre { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionEduActeur> ActionEduActeurs { get; set; }
+    }
+}

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

@@ -87,6 +87,9 @@
     <Compile Include="ActionEduActeur.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
+    <Compile Include="ActionEduActeurRole.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
     <Compile Include="ActionEduAxe.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>

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

@@ -36,5 +36,6 @@ namespace CD67.FicheCollege.Entity
         public virtual DbSet<ActionEduMission> ActionEduMissions { get; set; }
         public virtual DbSet<ActionEduActeur> ActionEduActeurs { get; set; }
         public virtual DbSet<ActionEduStatut> ActionEduStatuts { get; set; }
+        public virtual DbSet<ActionEduActeurRole> ActionEduActeurRoles { get; set; }
     }
 }

+ 65 - 2
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -5,6 +5,14 @@
     <!-- 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="ActionEduActeurRoles">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="Libelle" Type="varchar" MaxLength="50" Nullable="false" />
+          <Property Name="Ordre" Type="int" Nullable="false" />
+        </EntityType>
         <EntityType Name="ActionEduActeurs">
           <Key>
             <PropertyRef Name="Id" />
@@ -13,6 +21,7 @@
           <Property Name="Nom" Type="varchar(max)" Nullable="false" />
           <Property Name="Sid" Type="nvarchar" MaxLength="7" />
           <Property Name="RoleId" Type="int" Nullable="false" />
+          <Property Name="Commentaire" Type="varchar(max)" />
           <Property Name="ActionEduId" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="ActionEduAxes">
@@ -59,7 +68,6 @@
           <Property Name="Numero" Type="nvarchar(max)" Nullable="false" />
           <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
           <Property Name="Montant" Type="decimal" Precision="18" Scale="0" />
-          <Property Name="TiersSid" Type="nvarchar" MaxLength="7" />
           <Property Name="Description" Type="nvarchar(max)" />
           <Property Name="CommentaireInterne" Type="nvarchar(max)" />
           <Property Name="CommentairePublic" Type="nvarchar(max)" />
@@ -136,6 +144,18 @@
           <Property Name="Libelle" Type="nvarchar" MaxLength="255" Nullable="false" />
           <Property Name="Ordre" Type="int" Nullable="false" />
         </EntityType>
+        <Association Name="FK_ActionEduActeurs_ActionEduActeurRoles">
+          <End Role="ActionEduActeurRoles" Type="Self.ActionEduActeurRoles" Multiplicity="1" />
+          <End Role="ActionEduActeurs" Type="Self.ActionEduActeurs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionEduActeurRoles">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="ActionEduActeurs">
+              <PropertyRef Name="RoleId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_ActionEduActionEduActeur">
           <End Role="ActionsEdu" Type="Self.ActionsEdu" Multiplicity="1" />
           <End Role="ActionEduActeurs" Type="Self.ActionEduActeurs" Multiplicity="*" />
@@ -269,6 +289,7 @@
           </ReferentialConstraint>
         </Association>
         <EntityContainer Name="CD67FicheCollegeStoreContainer">
+          <EntitySet Name="ActionEduActeurRoles" EntityType="Self.ActionEduActeurRoles" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="ActionEduActeurs" EntityType="Self.ActionEduActeurs" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="ActionEduAxes" EntityType="Self.ActionEduAxes" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="ActionEduMissions" EntityType="Self.ActionEduMissions" Schema="dbo" store:Type="Tables" />
@@ -280,6 +301,10 @@
           <EntitySet Name="Colleges" EntityType="Self.Colleges" 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_ActionEduActeurs_ActionEduActeurRoles" Association="Self.FK_ActionEduActeurs_ActionEduActeurRoles">
+            <End Role="ActionEduActeurRoles" EntitySet="ActionEduActeurRoles" />
+            <End Role="ActionEduActeurs" EntitySet="ActionEduActeurs" />
+          </AssociationSet>
           <AssociationSet Name="FK_ActionEduActionEduActeur" Association="Self.FK_ActionEduActionEduActeur">
             <End Role="ActionsEdu" EntitySet="ActionsEdu" />
             <End Role="ActionEduActeurs" EntitySet="ActionEduActeurs" />
@@ -385,6 +410,11 @@
             <End Role="ActionEduStatut1" EntitySet="ActionEduStatuts" />
             <End Role="ActionEdu" EntitySet="ActionsEdu" />
           </AssociationSet>
+          <EntitySet Name="ActionEduActeurRoles" EntityType="CD67.FicheCollege.ActionEduActeurRole" />
+          <AssociationSet Name="FK_ActionEduActeurs_ActionEduActeurRoles" Association="CD67.FicheCollege.FK_ActionEduActeurs_ActionEduActeurRoles">
+            <End Role="ActionEduActeurRole" EntitySet="ActionEduActeurRoles" />
+            <End Role="ActionEduActeur" EntitySet="ActionEduActeurs" />
+          </AssociationSet>
           </EntityContainer>
         <EntityType Name="TypeCollege">
           <Key>
@@ -635,8 +665,10 @@
           <Property Name="Nom" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
           <Property Name="Sid" Type="String" MaxLength="7" FixedLength="false" Unicode="true" />
           <Property Name="RoleId" Type="Int32" Nullable="false" />
+          <Property Name="Commentaire" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
           <Property Name="ActionEduId" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="ActionsEdu" Relationship="CD67.FicheCollege.FK_ActionEduActionEduActeur" FromRole="ActionEduActeur" ToRole="ActionEdu" />
+          <NavigationProperty Name="ActionEdu" Relationship="CD67.FicheCollege.FK_ActionEduActionEduActeur" FromRole="ActionEduActeur" ToRole="ActionEdu" />
+          <NavigationProperty Name="ActionEduActeurRole" Relationship="CD67.FicheCollege.FK_ActionEduActeurs_ActionEduActeurRoles" FromRole="ActionEduActeur" ToRole="ActionEduActeurRole" />
         </EntityType>
         <EntityType Name="ActionEduStatut">
           <Key>
@@ -670,6 +702,27 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <EntityType Name="ActionEduActeurRole">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Libelle" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Ordre" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionEduActeurs" Relationship="CD67.FicheCollege.FK_ActionEduActeurs_ActionEduActeurRoles" FromRole="ActionEduActeurRole" ToRole="ActionEduActeur" />
+        </EntityType>
+        <Association Name="FK_ActionEduActeurs_ActionEduActeurRoles">
+          <End Type="CD67.FicheCollege.ActionEduActeurRole" Role="ActionEduActeurRole" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.ActionEduActeur" Role="ActionEduActeur" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionEduActeurRole">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="ActionEduActeur">
+              <PropertyRef Name="RoleId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -801,6 +854,7 @@
           <EntitySetMapping Name="ActionEduActeurs">
             <EntityTypeMapping TypeName="CD67.FicheCollege.ActionEduActeur">
               <MappingFragment StoreEntitySet="ActionEduActeurs">
+                <ScalarProperty Name="Commentaire" ColumnName="Commentaire" />
                 <ScalarProperty Name="ActionEduId" ColumnName="ActionEduId" />
                 <ScalarProperty Name="RoleId" ColumnName="RoleId" />
                 <ScalarProperty Name="Sid" ColumnName="Sid" />
@@ -817,6 +871,15 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="ActionEduActeurRoles">
+            <EntityTypeMapping TypeName="CD67.FicheCollege.ActionEduActeurRole">
+              <MappingFragment StoreEntitySet="ActionEduActeurRoles">
+                <ScalarProperty Name="Ordre" ColumnName="Ordre" />
+                <ScalarProperty Name="Libelle" ColumnName="Libelle" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
           </EntityContainerMapping>
 </Mapping></edmx:Mappings>
   </edmx:Runtime>

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

@@ -27,6 +27,8 @@
         <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduStatut" Width="2.5" PointX="11.25" PointY="4.875" />
         <AssociationConnector Association="CD67.FicheCollege.FK_ActionEduActionEduActeur" />
         <AssociationConnector Association="CD67.FicheCollege.FK_ActionsEdu_ActionEduStatuts" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduActeurRole" Width="2.625" PointX="14.875" PointY="6.75" />
+        <AssociationConnector Association="CD67.FicheCollege.FK_ActionEduActeurs_ActionEduActeurRoles" />
         </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 2 - 0
CD67.FicheCollege.Entity/Extend/ActionEduActeur.cs

@@ -30,6 +30,8 @@ namespace CD67.FicheCollege.Entity
         [Required(ErrorMessage = "Obligatoire")]
         public int RoleId { get; set; }
 
+        public string Commentaire { get; set; }
+
         [Display(Name = "Action Educative")]
         public string ActionEduId { get; set; }
 

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

@@ -84,6 +84,9 @@
     <Compile Include="Internal\ActionEduActeurFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
+    <Compile Include="Internal\ActionEduActeurRoleFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
     <Compile Include="Internal\ActionEduAxeFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>

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

@@ -0,0 +1,21 @@
+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 ActionEduActeurRoleFactory : Internal.BaseFactory<Entity.ActionEduActeurRole>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionEduActeurRoleFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+	

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

@@ -178,6 +178,7 @@
   <ItemGroup>
     <Compile Include="App_Start\BundleConfig.cs" />
     <Compile Include="Controllers\ActionEduAxesController.cs" />
+    <Compile Include="Controllers\ActionsEduActeursController.cs" />
     <Compile Include="Controllers\ActionsEduCollegeController.cs" />
     <Compile Include="Controllers\ActionsEduController.cs" />
     <Compile Include="Controllers\ActionEduThematiquesController.cs" />
@@ -195,6 +196,7 @@
     <Compile Include="Internal\MvcHtmlHelpers.cs" />
     <Compile Include="Internal\Navigation.cs" />
     <Compile Include="Internal\UtilisateurConnecteFactory.cs" />
+    <Compile Include="Models\ActionEduActeurViewModel.cs" />
     <Compile Include="Models\ActionEduMissionViewModel.cs" />
     <Compile Include="Models\ActionEduCollegeViewModel.cs" />
     <Compile Include="Models\ActionEduAxeViewModel.cs" />
@@ -459,6 +461,10 @@
     <Content Include="Views\Shared\_AdminLayout.cshtml" />
     <Content Include="Views\Colleges\Import.cshtml" />
     <Content Include="Views\ActionsEdu\Import.cshtml" />
+    <Content Include="Views\ActionsEduActeurs\Create.cshtml" />
+    <Content Include="Views\ActionsEduActeurs\Delete.cshtml" />
+    <Content Include="Views\ActionsEduActeurs\Details.cshtml" />
+    <Content Include="Views\ActionsEduActeurs\Edit.cshtml" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="App_Data\" />

+ 131 - 0
CD67.FicheCollege.MVC/Controllers/ActionsEduActeursController.cs

@@ -0,0 +1,131 @@
+using CD67.FicheCollege.Entity;
+using CD67.FicheCollege.Factory;
+using CD67.FicheCollege.MVC.Models;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Web;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Controllers
+{
+    public class ActionsEduActeursController : Controller
+    {
+        private Entities db = new Entities();
+
+        // GET: ActionsEdu/Details/5
+        public ActionResult Details(int? id)
+        {
+            if (id == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+            ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+            Entity.ActionEduActeur actionEduActeur = fact.getById(id);
+            if (actionEduActeur == null)
+            {
+                return HttpNotFound();
+            }
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db);
+
+            return View(model);
+        }
+
+        // GET: ActionEduCollege/Create
+        public ActionResult Create(int? actionEdu_id)
+        {
+            if (actionEdu_id == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+            ActionEduActeur actionEduActeur = new ActionEduActeur();
+            actionEduActeur.ActionEduId = actionEdu_id.Value;
+            ActionEduFactory fact = new ActionEduFactory(db);
+            actionEduActeur.ActionEdu = fact.getById(actionEdu_id);
+
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db, ModeAcces.Creation);
+            return View(model);
+        }
+
+        // POST: ActionEduAxe/Create
+        // 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 Create(ActionEduActeur actionEduActeur)
+        {
+            if (ModelState.IsValid)
+            {
+                ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+                fact.add(ref actionEduActeur);
+                return RedirectToAction("Details", "ActionsEdu", new { Id = actionEduActeur.ActionEduId });
+            }
+
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db, ModeAcces.Creation);
+            return View(model);
+        }
+
+        // GET: ActionEduAxe/Edit/5
+        public ActionResult Edit(int? id)
+        {
+            if (id == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+            ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+            ActionEduActeur actionEduActeur = fact.getById(id.Value);
+            if (actionEduActeur == null)
+            {
+                return HttpNotFound();
+            }
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db, ModeAcces.Modification);
+            return View(model);
+        }
+
+        // POST: ActionEduAxe/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(ActionEduActeur actionEduActeur)
+        {
+            if (ModelState.IsValid)
+            {
+                ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+                fact.update(ref actionEduActeur);
+                return RedirectToAction("Details", new { id = actionEduActeur.Id });
+            }
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db, ModeAcces.Modification);
+            return View(model);
+        }
+
+        // GET: ActionEduAxe/Delete/5
+        public ActionResult Delete(int? id)
+        {
+            if (id == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+            ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+            ActionEduActeur actionEduActeur = fact.getById(id.Value);
+            if (actionEduActeur == null)
+            {
+                return HttpNotFound();
+            }
+            ActionEduActeurViewModel model = new ActionEduActeurViewModel(actionEduActeur, db);
+            return View(model);
+        }
+
+        // POST: ActionEduAxe/Delete/5
+        [HttpPost, ActionName("Delete")]
+        [ValidateAntiForgeryToken]
+        public ActionResult DeleteConfirmed(int id)
+        {
+            ActionEduActeurFactory fact = new ActionEduActeurFactory(db);
+            ActionEduActeur actionEduActeur = fact.getById(id);
+            fact.delete(ref actionEduActeur);
+            return RedirectToAction("Details", "ActionsEdu", new { id = actionEduActeur.ActionEduId });
+        }
+
+    }
+}

+ 23 - 0
CD67.FicheCollege.MVC/Models/ActionEduActeurViewModel.cs

@@ -0,0 +1,23 @@
+using CD67.FicheCollege.Entity;
+using CD67.FicheCollege.Factory;
+using CD67.FicheCollege.MVC.Internal;
+using System.Collections.Generic;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Models
+{
+    public class ActionEduActeurViewModel : BaseViewModel<ActionEduActeur>
+    {
+        public SelectList Sel_Role;
+
+        public ActionEduActeurViewModel(ActionEduActeur model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
+        {
+            ActionEduActeurRoleFactory fact = new ActionEduActeurRoleFactory(dbContext);
+            Sel_Role = new SelectList(fact.getAll(), "Id", "Libelle", Obj.RoleId);
+        }
+        
+        public override int Annee_Id { get { return Obj.ActionEdu.Annee.Id; } }
+        public override string Annee_Lib { get { return Obj.ActionEdu.Annee.Libelle; } }
+    }
+
+}

+ 29 - 3
CD67.FicheCollege.MVC/Views/ActionsEdu/Details.cshtml

@@ -44,9 +44,6 @@
         <dt>Elèves concernés </dt>
         <dd>@actionEdu.totalEleves</dd>
                 
-        <dt>Tiers </dt>
-        <dd>@Html.DisplayFor(model => actionEdu.tiers.Id) - @Html.DisplayFor(model => actionEdu.tiers.Nom)</dd>
-
         <dt>@Html.DisplayNameFor(model => actionEdu.Description)</dt>
         <dd>@Html.DisplayFor(model => actionEdu.Description)</dd>
         
@@ -63,6 +60,35 @@
 
 @if (Model.Acces == ModeAcces.Lecture)
 {
+    <legend>
+        Acteurs
+        <span class="pull-right">
+            <a class="btn btn-default" href="@Url.Action("Create", "ActionsEduActeurs", new { actionEdu_id = actionEdu.Id })">
+                <i class="fa fa-plus"></i> Ajouter
+            </a>
+        </span>
+    </legend>
+
+    <table class="table datatable">
+        <thead>
+            <tr>
+                <th>Acteur</th>
+                <th>Rôle</th>
+                <th>Commentaire</th>
+            </tr>
+        </thead>
+        <tbody>
+            @foreach (ActionEduActeur item in Model.Obj.ActionEduActeurs)
+            {
+                <tr data-url="@Url.Action("Details", "ActionsEduActeurs", new { Id = item.Id })">
+                    <td>@Html.DisplayFor(model => item.Nom)</td>
+                    <td>@Html.DisplayFor(model => item.ActionEduActeurRole.Libelle)</td>
+                    <td>@Html.DisplayFor(model => item.Commentaire)</td>
+                </tr>
+            }
+        </tbody>
+    </table>
+
     <legend>
         Collège(s) concerné(s)
         <span class="pull-right">

+ 53 - 0
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Create.cshtml

@@ -0,0 +1,53 @@
+@using CD67.FicheCollege.MVC.Models
+@model ActionEduActeurViewModel
+
+@{
+    ViewBag.Title = "Création";
+    Layout = "~/Views/Shared/_Layout.cshtml";
+    ActionEduActeur actionEduActeur = Model.Obj;
+}
+
+<header>
+    <h2>Action '@actionEduActeur.ActionEdu.Nom': Ajouter un acteur</h2>
+</header>
+
+@using (Html.BeginForm()) 
+{
+    @Html.AntiForgeryToken()
+    
+    <div class="form-horizontal">
+        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
+        @Html.HiddenFor(model => actionEduActeur.Id)
+        @Html.HiddenFor(model => actionEduActeur.ActionEduId)
+        
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.EditorFor(model => actionEduActeur.Nom, new { htmlAttributes = new { @class = "form-control" } })
+                @Html.ValidationMessageFor(model => actionEduActeur.Nom, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.RoleId, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.DropDownListFor(model => actionEduActeur.RoleId, Model.Sel_Role, htmlAttributes: new { @class = "form-control" })
+                @Html.ValidationMessageFor(model => actionEduActeur.RoleId, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.EditorFor(model => actionEduActeur.Commentaire, new { htmlAttributes = new { @class = "form-control" } })
+                @Html.ValidationMessageFor(model => actionEduActeur.Commentaire, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            <div class="col-md-offset-2 col-md-10">
+                <input type="submit" value="Créer" class="btn btn-default" />
+            </div>
+        </div>
+    </div>
+}

+ 30 - 0
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Delete.cshtml

@@ -0,0 +1,30 @@
+@using CD67.FicheCollege.MVC.Models
+@model ActionEduActeurViewModel
+
+@{
+    ViewBag.Title = "Suppression";
+    Layout = "~/Views/Shared/_Layout.cshtml";
+    ActionEduActeur actionEduActeur = Model.Obj;
+}
+
+<header>
+    <h2>Suppression</h2>
+</header>
+
+<h3>Retirer l'acteur</h3>
+<div>
+    @using (Html.BeginForm()) {
+        @Html.AntiForgeryToken()
+
+        <p>Voulez-vous vraiment retirer l'acteur: <b>@actionEduActeur.Nom</b>?</p>
+
+        <div class="form-actions no-color">
+            <input type="submit" value="Supprimer" class="btn btn-default" />
+        </div>
+    }
+</div>
+
+<br/>
+<div>
+    @Html.ActionLink("Annuler", "Details", new { id = actionEduActeur.Id })
+</div>

+ 35 - 0
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Details.cshtml

@@ -0,0 +1,35 @@
+@using CD67.FicheCollege.MVC.Models
+@model ActionEduActeurViewModel
+
+@{
+    ViewBag.Title = "Details";
+    Layout = "~/Views/Shared/_Layout.cshtml";
+    ActionEduActeur actionEduActeur = Model.Obj;
+}
+
+<header>
+    <h2>Acteur '@actionEduActeur.Nom'</h2>
+</header>
+
+<fieldset>
+    <legend>
+        Informations
+        @if (Model.Acces == ModeAcces.Lecture)
+        {
+            <span class="pull-right">
+                @Html.ActionLink("Supprimer", "Delete", "ActionsEduActeurs", new { Id = actionEduActeur.Id }, new { @class = "btn btn-danger" })
+                @Html.ActionLink("Modifier", "Edit", "ActionsEduActeurs", new { Id = actionEduActeur.Id }, new { @class = "btn btn-default" })
+            </span>
+        }
+    </legend>
+    <dl class="dl-horizontal">
+        <dt>@Html.DisplayNameFor(model => actionEduActeur.ActionEduActeurRole.Libelle)</dt>
+        <dd>@Html.DisplayFor(model => actionEduActeur.ActionEduActeurRole.Libelle)</dd>
+
+        <dt>@Html.DisplayNameFor(model => actionEduActeur.Commentaire)</dt>
+        <dd>@Html.DisplayFor(model => actionEduActeur.Commentaire)</dd>
+    </dl>
+</fieldset>
+
+
+<a href="@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEdu.Id })">Retour à l'index</a>

+ 55 - 0
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Edit.cshtml

@@ -0,0 +1,55 @@
+@using CD67.FicheCollege.MVC.Models
+@model ActionEduActeurViewModel
+
+@{
+    ViewBag.Title = "Modification";
+    Layout = "~/Views/Shared/_Layout.cshtml";
+    ActionEduActeur actionEduActeur = Model.Obj;
+}
+
+<header>
+    <h2>Action '@actionEduActeur.ActionEdu.Nom': Modifier l'acteur</h2>
+</header>
+
+@using (Html.BeginForm()) 
+{
+    @Html.AntiForgeryToken()
+    
+    <div class="form-horizontal">
+        <h4>Actions</h4>
+        <hr />
+        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
+        @Html.HiddenFor(model => actionEduActeur.Id)
+        @Html.HiddenFor(model => actionEduActeur.ActionEduId)
+        
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.EditorFor(model => actionEduActeur.Nom, new { htmlAttributes = new { @class = "form-control" } })
+                @Html.ValidationMessageFor(model => actionEduActeur.Nom, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.RoleId, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.DropDownListFor(model => actionEduActeur.RoleId, Model.Sel_Role, htmlAttributes: new { @class = "form-control" })
+                @Html.ValidationMessageFor(model => actionEduActeur.RoleId, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            @Html.LabelFor(model => actionEduActeur.Commentaire, htmlAttributes: new { @class = "control-label col-md-2" })
+            <div class="col-md-10">
+                @Html.EditorFor(model => actionEduActeur.Commentaire, new { htmlAttributes = new { @class = "form-control" } })
+                @Html.ValidationMessageFor(model => actionEduActeur.Commentaire, "", new { @class = "text-danger" })
+            </div>
+        </div>
+
+        <div class="form-group">
+            <div class="col-md-offset-2 col-md-10">
+                <input type="submit" value="Enregistrer" class="btn btn-default" />
+            </div>
+        </div>
+    </div>
+}