hidden activity

This commit is contained in:
Paul Schneider 2017-02-20 15:53:25 +01:00
commit 6ca18b65f4
25 changed files with 5706 additions and 13 deletions

View file

@ -57,6 +57,15 @@
<span asp-validation-for="SettingsClassName" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Hidden" class="col-md-2 control-label">
@SR["Hidden"]
</label>
<div class="col-md-10">
<input asp-for="Hidden" class="form-control" />
<span asp-validation-for="Hidden" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />

View file

@ -31,7 +31,7 @@
@act.Description </p>
<a asp-route-id="@act.Code">
@foreach (Activity c in act.Children) {
@Html.DisplayFor(subact=>c);
@if (!c.Hidden) { @Html.DisplayFor(subact=>c) }
}
</a>
}
@ -60,4 +60,3 @@
<span class="sr-only">Suivant</span>
</a>
</div>

View file

@ -0,0 +1,74 @@
@model Yavsc.Models.Messaging.Notification
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<form asp-action="Create">
<div class="form-horizontal">
<h4>Notification</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="body" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="body" class="form-control" />
<span asp-validation-for="body" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="click_action" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="click_action" class="form-control" />
<span asp-validation-for="click_action" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="color" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="color" class="form-control" />
<span asp-validation-for="color" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="icon" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="icon" class="form-control" />
<span asp-validation-for="icon" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="sound" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="sound" class="form-control" />
<span asp-validation-for="sound" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="tag" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="tag" class="form-control" />
<span asp-validation-for="tag" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="title" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="title" class="form-control" />
<span asp-validation-for="title" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>

View file

@ -0,0 +1,64 @@
@model Yavsc.Models.Messaging.Notification
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Notification</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.body)
</dt>
<dd>
@Html.DisplayFor(model => model.body)
</dd>
<dt>
@Html.DisplayNameFor(model => model.click_action)
</dt>
<dd>
@Html.DisplayFor(model => model.click_action)
</dd>
<dt>
@Html.DisplayNameFor(model => model.color)
</dt>
<dd>
@Html.DisplayFor(model => model.color)
</dd>
<dt>
@Html.DisplayNameFor(model => model.icon)
</dt>
<dd>
@Html.DisplayFor(model => model.icon)
</dd>
<dt>
@Html.DisplayNameFor(model => model.sound)
</dt>
<dd>
@Html.DisplayFor(model => model.sound)
</dd>
<dt>
@Html.DisplayNameFor(model => model.tag)
</dt>
<dd>
@Html.DisplayFor(model => model.tag)
</dd>
<dt>
@Html.DisplayNameFor(model => model.title)
</dt>
<dd>
@Html.DisplayFor(model => model.title)
</dd>
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>

View file

@ -0,0 +1,60 @@
@model Yavsc.Models.Messaging.Notification
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Notification</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.body)
</dt>
<dd>
@Html.DisplayFor(model => model.body)
</dd>
<dt>
@Html.DisplayNameFor(model => model.click_action)
</dt>
<dd>
@Html.DisplayFor(model => model.click_action)
</dd>
<dt>
@Html.DisplayNameFor(model => model.color)
</dt>
<dd>
@Html.DisplayFor(model => model.color)
</dd>
<dt>
@Html.DisplayNameFor(model => model.icon)
</dt>
<dd>
@Html.DisplayFor(model => model.icon)
</dd>
<dt>
@Html.DisplayNameFor(model => model.sound)
</dt>
<dd>
@Html.DisplayFor(model => model.sound)
</dd>
<dt>
@Html.DisplayNameFor(model => model.tag)
</dt>
<dd>
@Html.DisplayFor(model => model.tag)
</dd>
<dt>
@Html.DisplayNameFor(model => model.title)
</dt>
<dd>
@Html.DisplayFor(model => model.title)
</dd>
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>

View file

@ -0,0 +1,75 @@
@model Yavsc.Models.Messaging.Notification
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>Notification</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="body" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="body" class="form-control" />
<span asp-validation-for="body" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="click_action" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="click_action" class="form-control" />
<span asp-validation-for="click_action" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="color" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="color" class="form-control" />
<span asp-validation-for="color" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="icon" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="icon" class="form-control" />
<span asp-validation-for="icon" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="sound" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="sound" class="form-control" />
<span asp-validation-for="sound" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="tag" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="tag" class="form-control" />
<span asp-validation-for="tag" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="title" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="title" class="form-control" />
<span asp-validation-for="title" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>

View file

@ -0,0 +1,68 @@
@model IEnumerable<Yavsc.Models.Messaging.Notification>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.body)
</th>
<th>
@Html.DisplayNameFor(model => model.click_action)
</th>
<th>
@Html.DisplayNameFor(model => model.color)
</th>
<th>
@Html.DisplayNameFor(model => model.icon)
</th>
<th>
@Html.DisplayNameFor(model => model.sound)
</th>
<th>
@Html.DisplayNameFor(model => model.tag)
</th>
<th>
@Html.DisplayNameFor(model => model.title)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.body)
</td>
<td>
@Html.DisplayFor(modelItem => item.click_action)
</td>
<td>
@Html.DisplayFor(modelItem => item.color)
</td>
<td>
@Html.DisplayFor(modelItem => item.icon)
</td>
<td>
@Html.DisplayFor(modelItem => item.sound)
</td>
<td>
@Html.DisplayFor(modelItem => item.tag)
</td>
<td>
@Html.DisplayFor(modelItem => item.title)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</table>

View file

@ -35,6 +35,18 @@
@RenderSection("header", required: false)
</head>
<body>
@if (ViewData ["Notify"] != null) {
foreach (Notification n in ViewData ["Notify"] as IEnumerable<Notification>) {
<div class="alert alert-info alert-dismissable">
<strong>@n.title</strong> @n.body
@if (n.click_action!=null) {
<a class="close" data-dismiss="alert" aria-label="close" onclick="notifClick(@n.Id)">@SR[n.click_action]</a>
} else {
<a class="close" data-dismiss="alert" aria-label="close" >@SR[n.click_action]</a>
}
</div>
}
}
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">

View file

@ -13,6 +13,7 @@
@using Yavsc.Models.Access;
@using Yavsc.Models.Auth;
@using Yavsc.Models.Google;
@using Yavsc.Models.Messaging;
@using Yavsc.Models.Musical;
@using Yavsc.Models.Musical.Profiles;
@using Yavsc.Models.Market;