Fixed problem between myWebLog and MyWebLog directories
This commit is contained in:
55
src/MyWebLog/views/admin/category/edit.html
Normal file
55
src/MyWebLog/views/admin/category/edit.html
Normal file
@@ -0,0 +1,55 @@
|
||||
@Master['admin/admin-layout']
|
||||
|
||||
@Section['Content']
|
||||
<form action="/category/@Model.Category.Id/edit" method="post">
|
||||
@AntiForgeryToken
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<a href="/categories" class="btn btn-default">
|
||||
<i class="fa fa-list-ul"></i> @Translate.BackToCategoryList
|
||||
</a>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="Name">@Translate.Name</label>
|
||||
<input type="text" class="form-control" id="Name" name="Name" value="@Model.Form.Name" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="Slug">@Translate.Slug</label>
|
||||
<input type="text" class="form-control" id="Slug" name="Slug" value="@Model.Form.Slug" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="Description">@Translate.Description</label>
|
||||
<textarea class="form-control" rows="4" id="Description" name="Description">@Model.Form.Description</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="ParentId">@Translate.ParentCategory</label>
|
||||
<select class="form-control" id="ParentId" name="ParentId">
|
||||
<option value="">— @Translate.NoParent —</option>
|
||||
@Each.Categories
|
||||
@Current.Option
|
||||
@EndEach
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<p class="text-center">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="fa fa-floppy-o"></i> @Translate.Save
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@EndSection
|
||||
|
||||
@Section['Scripts']
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready(function () { $("#Name").focus() })
|
||||
/* ]] */
|
||||
</script>
|
||||
@EndSection
|
||||
51
src/MyWebLog/views/admin/category/list.html
Normal file
51
src/MyWebLog/views/admin/category/list.html
Normal file
@@ -0,0 +1,51 @@
|
||||
@Master['admin/admin-layout']
|
||||
|
||||
@Section['Content']
|
||||
<div class="row">
|
||||
<p><a class="btn btn-primary" href="/category/new/edit"><i class="fa fa-plus"></i> @Translate.AddNew</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>@Translate.Action</th>
|
||||
<th>@Translate.Category</th>
|
||||
<th>@Translate.Description</th>
|
||||
</tr>
|
||||
@Each.Categories
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/category/@Current.Category.Id/edit">@Translate.Edit</a>
|
||||
<a href="javascript:void(0)" onclick="deleteCategory('@Current.Category.Id', '@Current.Category.Name')">
|
||||
@Translate.Delete
|
||||
</a>
|
||||
</td>
|
||||
<td>@Current.ListName</td>
|
||||
<td>
|
||||
@If.HasDescription
|
||||
@Current.Category.Description.Value
|
||||
@EndIf
|
||||
@IfNot.HasDescription
|
||||
|
||||
@EndIf
|
||||
</td>
|
||||
</tr>
|
||||
@EndEach
|
||||
</table>
|
||||
</div>
|
||||
<form method="post" id="deleteForm">
|
||||
@AntiForgeryToken
|
||||
</form>
|
||||
@EndSection
|
||||
|
||||
@Section['Scripts']
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
function deleteCategory(id, title) {
|
||||
if (confirm('@Translate.CategoryDeleteWarning "' + title + '"?')) {
|
||||
document.getElementById("deleteForm").action = "/category/" + id + "/delete"
|
||||
document.getElementById("deleteForm").submit()
|
||||
}
|
||||
}
|
||||
/* ]] */
|
||||
</script>
|
||||
@EndSection
|
||||
Reference in New Issue
Block a user