* style.css:
* style.css:
* UsersInRole.aspx: refactoring

* HomeController.cs: Fixes the restricted area error page

* PostActions.ascx: html structure

* TagControl.ascx: Tags reside in a list here, treat it as an Html one

* RestrictedArea.aspx: Shows allowed users or/and roles in the error
  page

* Web.csproj: cleaning
main
Paul Schneider 10 years ago
parent cec3ce2330
commit a62cff223c
10 changed files with 60 additions and 21 deletions

@ -6,9 +6,6 @@ body {
background-color: black; background-color: black;
color: #D0FFD0; color: #D0FFD0;
} }
.tagname { color: #D0FFD0; }
.tagname+.tagname:before { content: ', '; }
.tagname:hover { cursor:pointer; background-color: red; }
.rate { .rate {
@ -101,7 +98,6 @@ main video, main img {
aside { aside {
display: inline-block; display: inline-block;
float: right; float: right;
max-width: 40em;
} }
.postpreview { .postpreview {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

@ -4,9 +4,7 @@ body {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.tagname+.tagname:before { content: ', '; }
.tagname:hover { cursor:pointer; }
/* Start by setting display:none to make this hidden. /* Start by setting display:none to make this hidden.
Then we position it in relation to the viewport window Then we position it in relation to the viewport window
@ -27,6 +25,7 @@ body {
no-repeat; no-repeat;
overflow: auto; overflow: auto;
} }
.dispmodal { .dispmodal {
position: fixed; position: fixed;
z-index: 1000; z-index: 1000;
@ -140,9 +139,32 @@ display: inline-block;
.c2 { font-size: small; font-style: italic; } .c2 { font-size: small; font-style: italic; }
.c3 { font-size: x-small; font-style: italic; } .c3 { font-size: x-small; font-style: italic; }
.rate { width:5em; cursor: pointer; text-align:center; } .rate {
display:inline-bloc; width:5em; cursor: pointer; text-align:center;
}
h2 select { font-size: large; } h2 select { font-size: large; }
ul.editablelist {
display: inline;
}
ul.editablelist>li {
display: inline;
margin:.5em;
padding:.2em;
border: solid grey 1px;
border-radius: 1em;
}
ul.editablelist>li:hover {
background-color: rgba(128,0,0,0.5);
cursor:pointer;
}
ul.editablelist>li:hover:after {
font-family: 'FontAwesome';
content: "\f00d";
}
@media print { @media print {
body {background-color:white;color:black;} body {background-color:white;color:black;}
.control, .actionlink, .menuitem, nav { display:none;} .control, .actionlink, .menuitem, nav { display:none;}

@ -1,3 +1,21 @@
2015-11-18 Paul Schneider <paul@pschneider.fr>
* style.css:
* style.css:
* UsersInRole.aspx: refactoring
* HomeController.cs: Fixes the restricted area error page
* PostActions.ascx: html structure
* TagControl.ascx: Tags reside in a list here, treat it as an
Html one
* RestrictedArea.aspx: Shows allowed users or/and roles in the
error page
* Web.csproj: cleaning
2015-11-17 Paul Schneider <paul@pschneider.fr> 2015-11-17 Paul Schneider <paul@pschneider.fr>
* RateControl.ascx: A rate control for the Front Office * RateControl.ascx: A rate control for the Front Office

@ -90,9 +90,7 @@ namespace Yavsc.Controllers
TagInfo ti = BlogManager.GetTagInfo (tagname); TagInfo ti = BlogManager.GetTagInfo (tagname);
// TODO specialyze BlogEntry creating a PhotoEntry // TODO specialyze BlogEntry creating a PhotoEntry
ViewData [tagname] = ti; ViewData [tagname] = ti;
} }
return View (); return View ();
} }
/// <summary> /// <summary>
@ -103,6 +101,10 @@ namespace Yavsc.Controllers
return View (); return View ();
} }
public ActionResult RestrictedArea ()
{
return View ();
}
/// <summary> /// <summary>
/// Contact the specified email, reason and body. /// Contact the specified email, reason and body.
/// </summary> /// </summary>

@ -11,11 +11,10 @@
</h1> </h1>
</asp:Content> </asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server"> <asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<ul> <ul class="editablelist userlist">
<%foreach (string username in (string[]) ViewData["UsersInRole"]){ %> <%foreach (string username in (string[]) ViewData["UsersInRole"]){ %>
<li><%= username %></li> <li><%= username %></li>
<% } %> <% } %>
</ul> </ul>
<%= Html.Partial("AddUserToRole") %> <%= Html.Partial("AddUserToRole") %>
</asp:Content> </asp:Content>

@ -10,15 +10,14 @@
<%= Html.Partial("TagControl",Model)%> <%= Html.Partial("TagControl",Model)%>
<% if (Model is BlogEntry) { %> <% if (Model is BlogEntry) { %>
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i> <i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
<aside class="control" class="hidden">
<% using (Html.BeginForm("Comment","Blogs")) { %> <% using (Html.BeginForm("Comment","Blogs")) { %>
<filedset>
<%=Html.Hidden("Author")%> <%=Html.Hidden("Author")%>
<%=Html.Hidden("Title")%> <%=Html.Hidden("Title")%>
<%=Html.TextArea("CommentText","")%> <%=Html.TextArea("CommentText","")%>
<%=Html.Hidden("PostId",Model.Id)%> <%=Html.Hidden("PostId",Model.Id)%>
<input type="submit" value="Poster un commentaire"/> <input type="submit" value="Poster un commentaire"/>
<% } %> </filedset> <% } %>
</aside>
<% } %> <% } %>
<a href="<%= Url.RouteUrl("Default", new { action = "EditId", postid = Model.Id })%>" class="actionlink"> <a href="<%= Url.RouteUrl("Default", new { action = "EditId", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i> <i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>

@ -1,10 +1,10 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<p id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="fa fa-tag"> <ul id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="editablelist ">
<% if (Model.Tags != null) { <% if (Model.Tags != null) {
foreach ( var tagname in Model.Tags) { %> foreach ( var tagname in Model.Tags) { %>
<span class="tagname"><%=tagname%></span> <% <li class="tagname fa fa-tag"><%=tagname%></li> <%
%><% } } %> %><% } } %>
</p> </ul>
<% if (Membership.GetUser()!=null) { %> <% if (Membership.GetUser()!=null) { %>
<% if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin")) <% if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ // grant all permissions: to choose a given set of tags, also create some new tags %> { // grant all permissions: to choose a given set of tags, also create some new tags %>

@ -1,7 +1,11 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server"> <asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Ce contenu est d'accès restreint : &lt;<%= Html.Encode(ViewData["ControllerName"]) %>/<%= Html.Encode(ViewData["ActionName"]) %>&gt; Ce contenu est d'accès restreint :<br>
&lt;<%= Html.Encode(ViewData["ControllerName"]) %>/<%= Html.Encode(ViewData["ActionName"]) %>&gt;<br>
Demandez à l'administrateur les autorisations suffisantes pour accèder à cet emplacement.
Ci après les tièrces parties autorisée actuellement :<br>
Roles autorisés :<%= Html.Encode(ViewData["Roles"]) %><br>
Utilisateurs autorisés :<%= Html.Encode(ViewData["Users"]) %><br>
</asp:Content> </asp:Content>

@ -483,7 +483,6 @@
<Content Include="Views\Admin\UserCard.ascx" /> <Content Include="Views\Admin\UserCard.ascx" />
<Content Include="App_Themes\dark\style.css" /> <Content Include="App_Themes\dark\style.css" />
<Content Include="Views\Home\Contact.template.aspx" /> <Content Include="Views\Home\Contact.template.aspx" />
<Content Include="Views\Home\Contact.totem.aspx" />
<Content Include="Views\Home\RestrictedArea.aspx" /> <Content Include="Views\Home\RestrictedArea.aspx" />
<Content Include="Views\FrontOffice\Skills.aspx" /> <Content Include="Views\FrontOffice\Skills.aspx" />
<Content Include="Views\Blogs\RateControl.ascx" /> <Content Include="Views\Blogs\RateControl.ascx" />

Loading…