Bläddra i källkod

Merge branch 'develop'

julien.legrand 9 år sedan
förälder
incheckning
d6e1781fb6

+ 141 - 34
.gitignore

@@ -1,30 +1,57 @@
-#################
-## Visual Studio
-#################
 
+# Created by https://www.gitignore.io/api/visualstudio
+
+### VisualStudio ###
 ## Ignore Visual Studio temporary files, build results, and
 ## files generated by popular Visual Studio add-ons.
 
 # User-specific files
 *.suo
 *.user
+*.userosscache
 *.sln.docstates
 
-# Build results
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
 
+# Build results
 [Dd]ebug/
+[Dd]ebugPublic/
 [Rr]elease/
+[Rr]eleases/
 x64/
-build/
+x86/
+bld/
 [Bb]in/
 [Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
 
 # MSTest test Results
 [Tt]est[Rr]esult*/
 [Bb]uild[Ll]og.*
 
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
 *_i.c
 *_p.c
+*_i.h
 *.ilk
 *.meta
 *.obj
@@ -44,21 +71,31 @@ build/
 *.vssscc
 .builds
 *.pidb
-*.log
+*.svclog
 *.scc
 
+# Chutzpah Test files
+_Chutzpah*
+
 # Visual C++ cache files
 ipch/
 *.aps
 *.ncb
+*.opendb
 *.opensdf
 *.sdf
 *.cachefile
+*.VC.db
+*.VC.VC.opendb
 
 # Visual Studio profiler
 *.psess
 *.vsp
 *.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
 
 # Guidance Automation Toolkit
 *.gpState
@@ -66,6 +103,10 @@ ipch/
 # ReSharper is a .NET coding add-in
 _ReSharper*/
 *.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
 
 # TeamCity is a build add-in
 _TeamCity*
@@ -74,8 +115,16 @@ _TeamCity*
 *.dotCover
 
 # NCrunch
-*.ncrunch*
+_NCrunch_*
 .*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
 
 # Installshield output folder
 [Ee]xpress/
@@ -94,60 +143,118 @@ DocProject/Help/html
 publish/
 
 # Publish Web Output
-*.Publish.xml
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
 *.pubxml
 *.publishproj
 
-# NuGet Packages Directory
-## TODO: If you have NuGet Package Restore enabled, uncomment the next line
-#packages/
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
 
-# Windows Azure Build Output
-csx
+# Microsoft Azure Build Output
+csx/
 *.build.csdef
 
-# Windows Store app package directory
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
 AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
 
 # Others
-sql/
-*.Cache
 ClientBin/
-[Ss]tyle[Cc]op.*
 ~$*
 *~
 *.dbmdl
-*.[Pp]ublish.xml
+*.dbproj.schemaview
 *.pfx
 *.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
 
 # RIA/Silverlight projects
 Generated_Code/
 
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
 _UpgradeReport_Files/
 Backup*/
 UpgradeLog*.XML
 UpgradeLog*.htm
 
 # SQL Server files
-App_Data/*.mdf
-App_Data/*.ldf
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
 
-#############
-## Windows detritus
-#############
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
 
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
 
-# Folder config file
-Desktop.ini
+# FAKE - F# Make
+.fake/
 
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
+# JetBrains Rider
+.idea/
+*.sln.iml
 
-# Mac crap
-.DS_Store
+# CodeRush
+.cr/

+ 1 - 1
CG67.FicheCollege.sln

@@ -19,7 +19,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CG67.FicheCollege.Interface
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CG67.FicheCollege.Testeur", "Core\CG67.FicheCollege.Testeur\CG67.FicheCollege.Testeur.csproj", "{9E6B935E-7CAA-422E-AD37-248C12CC0C09}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CG67.FicheCollege.Tools", "CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj", "{6B4DE9CB-C532-4501-B626-F51663EC4E17}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CG67.FicheCollege.Tools", "Core\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj", "{6B4DE9CB-C532-4501-B626-F51663EC4E17}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 13 - 0
Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -818,6 +818,19 @@ namespace CG67.FicheCollege.Domaine
                 return retour;
             }
         }
+
+        public string GestionnaireInterimEmail
+        {
+            get
+            {
+                string retour = string.Empty;
+                foreach (Contact cont in Contacts)
+                    if (cont.Fonction.ToLower() == "gestionnaire par intérim")
+                        retour = cont.Email;
+                return retour;
+            }
+        }
+
         /// <summary>
         /// retourne le conseiller general de l'établissement
         /// </summary>

+ 1 - 1
Core/CG67.FicheCollege.Entrepot/CG67.FicheCollege.Entrepot.csproj

@@ -81,7 +81,7 @@
     <Compile Include="Utile.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
+    <ProjectReference Include="..\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
       <Project>{6B4DE9CB-C532-4501-B626-F51663EC4E17}</Project>
       <Name>CG67.FicheCollege.Tools</Name>
     </ProjectReference>

+ 1 - 1
Core/CG67.FicheCollege.Testeur/CG67.FicheCollege.Testeur.csproj

@@ -53,7 +53,7 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
+    <ProjectReference Include="..\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
       <Project>{6B4DE9CB-C532-4501-B626-F51663EC4E17}</Project>
       <Name>CG67.FicheCollege.Tools</Name>
     </ProjectReference>

+ 6 - 3
Web/CG67.FicheCollege.Web/CG67.FicheCollege.Web.csproj

@@ -27,11 +27,12 @@
     </UpgradeBackupLocation>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <TargetFrameworkProfile />
-    <UseIISExpress>false</UseIISExpress>
+    <UseIISExpress>true</UseIISExpress>
     <IISExpressSSLPort />
-    <IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
+    <IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
     <IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
     <IISExpressUseClassicPipelineMode>true</IISExpressUseClassicPipelineMode>
+    <UseGlobalApplicationHostFile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -71,6 +72,7 @@
   <ItemGroup>
     <Content Include="css\fichecollege.css" />
     <Content Include="Default.aspx" />
+    <Content Include="errors\unauthorized.html" />
     <Content Include="FicheCollege.aspx" />
     <Content Include="GenerationFiche.aspx" />
     <Content Include="images\bandeau-fiche-college.png" />
@@ -131,7 +133,7 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
+    <ProjectReference Include="..\..\Core\CG67.FicheCollege.Tools\CG67.FicheCollege.Tools.csproj">
       <Project>{6B4DE9CB-C532-4501-B626-F51663EC4E17}</Project>
       <Name>CG67.FicheCollege.Tools</Name>
     </ProjectReference>
@@ -233,6 +235,7 @@
   <ItemGroup>
     <None Include="pdf\Pilotes.pdf" />
     <None Include="Properties\PublishProfiles\admin.meneu.pubxml" />
+    <None Include="Properties\PublishProfiles\Etud.pubxml" />
     <None Include="Properties\PublishProfiles\Prod.pubxml" />
     <None Include="Properties\PublishProfiles\profildeploiement.pubxml" />
     <None Include="xls\Pilotes.xls" />

+ 6 - 10
Web/CG67.FicheCollege.Web/Default.aspx

@@ -28,23 +28,19 @@
 </head>
 <body id="Default">
     <form id="form1" runat="server">
-    <div id="header_index">
-        <img id="logo" src="images/bandeau-fiche-college.png" alt="Logo du CG67"></img>
-        
-    </div>
-    <div id="blank"><h3 id="Default">Veuillez sélectionner un établissement</h3></div>
-    <div id="conteneur">
+        <div id="header_index">
+            <img id="logo" src="images/bandeau-fiche-college.png" alt="Logo du CD67"></img>
+        </div>
+        <div id="blank"><h3>Veuillez sélectionner un établissement</h3></div>
+    
         <asp:DropDownList ID="ddlChoixCollege" runat="server" DataSourceID="ObjectDataSource1" DataTextField="NomCollegePourPresentation" DataValueField="CodeRNE">
         </asp:DropDownList><asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
             SelectMethod="GetAllEtablissement" TypeName="CG67.FicheCollege.Service.ServiceFiche">
         </asp:ObjectDataSource>
         <br />
 
-    <br />
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <br />
         <asp:Button ID="btnGeneration" runat="server" OnClick="Button1Click" Text="Générer la fiche" />
-    </div>       
-    
     </form>
 </body>
 </html>

+ 11 - 3
Web/CG67.FicheCollege.Web/Web.config

@@ -27,9 +27,7 @@
     </httpHandlers>
 
     <compilation debug="true" targetFramework="4.0"/>
-    <authentication mode="Forms">
-      <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
-    </authentication>
+    <authentication mode="Windows" />
     <membership>
       <providers>
         <clear/>
@@ -49,6 +47,12 @@
         <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
       </providers>
     </roleManager>
+    <authorization>
+      <allow roles="CG67\GS - Fiches collèges - exception" />
+      <deny roles="CG67\GS - Fiches collèges - exclusion" />
+      <allow roles="CG67\GS - Fiches collèges" />
+      <deny users="*" />
+    </authorization>
   </system.web>
   <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
@@ -57,6 +61,10 @@
              resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32"/>
       <add name="FileDownloadHandler" path="file.download" verb="*" type="CG67.FicheCollege.FileDownloadHandler, CG67.FicheCollege" allowPathInfo="false"  preCondition="integratedMode,runtimeVersionv4.0" />
     </handlers>
+    <httpErrors errorMode="DetailedLocalOnly">
+      <remove statusCode="401" subStatusCode="-1" />
+      <error statusCode="401" prefixLanguageFilePath="" path="/errors/unauthorized.html" responseMode="ExecuteURL" />
+    </httpErrors>
     <!--<staticContent>
       <mimeMap fileExtension="" mimeType="" />
     </staticContent>-->

+ 26 - 0
Web/CG67.FicheCollege.Web/errors/unauthorized.html

@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN"
+          "http://www.w3.org/TR/html4/strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <title>
+        Fiche de synthèse collège
+    </title>
+    <link href="../css/fichecollegev2.css" rel="stylesheet" type="text/css" />
+    <link href="../css/Print.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="Default">
+    <div id="header_index">
+        <img id="logo" src="../images/bandeau-fiche-college.png" alt="Logo du CG67" />
+    </div>
+    <div>
+        <h1>Accès non authorisé à la fiche collège</h1>
+        Pour obtenir l'accès, veuillez vous adresser au contacter le secrétariat du secteur collège :
+        <ul>
+            <li>Diana SBAFFI</li>
+            <li>Marie-Christine OBRY</li>
+        </ul>
+    </div>
+</body>
+</html>

+ 14 - 6
Web/CG67.FicheCollege.Web/xslt/FicheCollegev2.xslt

@@ -7,7 +7,7 @@
 
   <xsl:template match="college">
     <div id="conteneur">
-      <img id="logo" src="images/bandeau-fiche-college.png" alt="Logo du CG67"></img>
+      <img id="logo" src="images/bandeau-fiche-college.png" alt="Logo du CD67"></img>
       <div id="header_fiche">
         <div id="entete_fiche">
           <h1 id="fiche">
@@ -161,15 +161,23 @@
                   </a>
                 </br>
               </td>
+            </tr>
 
-              <xsl:if test ="Etablissement/GestionnaireInterim!=''">
+            <xsl:if test ="Etablissement/GestionnaireInterim!=''">
+              <tr>
                 <td class="td_head">Gestionnaire par interim</td>
                 <td>
                   <xsl:value-of select="Etablissement/GestionnaireInterim"></xsl:value-of>
+                  <br>
+                    <xsl:text>Email </xsl:text>
+                    <a href="mailto:{Etablissement/GestionnaireInterimEmail}">
+                      <xsl:value-of select="Etablissement/GestionnaireInterimEmail"/>
+                    </a>
+                  </br>
                 </td>
-
-              </xsl:if>
-            </tr>
+              </tr>
+            </xsl:if>
+              
             <tr>
               <td class="td_head">Conseillers Départementaux siégeant au CA </td>
               <td>
@@ -472,7 +480,7 @@
             <td>
               <xsl:text>Nombre de logements </xsl:text><xsl:value-of select="Etablissement/Logement/NbrLogements"/>
               <xsl:text> dont </xsl:text>
-              <xsl:value-of select="Etablissement/Logement/NbrAgentsLoges"/> agent(s) du CG logé(s)
+              <xsl:value-of select="Etablissement/Logement/NbrAgentsLoges"/> agent(s) du CD logé(s)
             </td>
           </tr>
           <tr>

+ 0 - 0
CG67.FicheCollege.Tools/CG67.FicheCollege.Tools.csproj → core/CG67.FicheCollege.Tools/CG67.FicheCollege.Tools.csproj


+ 0 - 0
CG67.FicheCollege.Tools/CG67.FicheCollege.Tools.csproj.vspscc → core/CG67.FicheCollege.Tools/CG67.FicheCollege.Tools.csproj.vspscc


+ 0 - 0
CG67.FicheCollege.Tools/Impersonation.cs → core/CG67.FicheCollege.Tools/Impersonation.cs


+ 0 - 0
CG67.FicheCollege.Tools/LogonProvider.cs → core/CG67.FicheCollege.Tools/LogonProvider.cs


+ 0 - 0
CG67.FicheCollege.Tools/LogonSessionType.cs → core/CG67.FicheCollege.Tools/LogonSessionType.cs


+ 0 - 0
CG67.FicheCollege.Tools/Properties/AssemblyInfo.cs → core/CG67.FicheCollege.Tools/Properties/AssemblyInfo.cs