BuildFeed/Areas/admin/Views/meta/create.cshtml
2015-01-30 09:44:06 +00:00

71 lines
2.3 KiB
Plaintext

@model BuildFeed.Models.MetaItem
@{
ViewBag.Title = string.Format("Add metadata for {0} | BuildFeed", Model.Id.Value);
}
<h2>@string.Format("Add metadata for {0}", Model.Id.Value)</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.Id.Type);
@Html.HiddenFor(model => model.Id.Value);
<div class="form-horizontal">
<div class="form-group">
@Html.LabelFor(model => model.MetaDescription, htmlAttributes: new { @class = "control-label col-sm-2" })
<div class="col-sm-10">
<div class="row">
<div class="col-sm-8">
@Html.TextAreaFor(model => model.MetaDescription, new { @class = "form-control", rows = "2" })
</div>
</div>
@Html.ValidationMessageFor(model => model.MetaDescription)
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.PageContent, new { @class = "control-label col-sm-2" })
<div class="col-sm-10">
<div class="row">
<div class="col-sm-8">
@Html.TextAreaFor(model => model.PageContent, new { @class = "form-control" })
</div>
</div>
@Html.ValidationMessageFor(model => model.PageContent)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" value="Add metadata" class="btn btn-primary" />
</div>
</div>
</div>
}
@section Scripts
{
<script src="~/Scripts/trumbowyg/trumbowyg.min.js" type="text/javascript"></script>
<link href="~/Scripts/trumbowyg/ui/trumbowyg.min.css" rel="stylesheet" type="text/css" />
@Scripts.Render("~/bundles/jqueryval")
<script type="text/javascript">
$(function () {
var btnsGrps = $.trumbowyg.btnsGrps;
$("#@Html.IdFor(model => model.PageContent)").trumbowyg({
semantic: true,
autogrow: true,
btns: ['viewHTML',
'|', 'strong', 'em',
'|', 'link',
'|', btnsGrps.justify,
'|', btnsGrps.lists]
});
})
</script>
}