-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathIndex.cshtml
More file actions
432 lines (397 loc) · 22.1 KB
/
Index.cshtml
File metadata and controls
432 lines (397 loc) · 22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
@model cloudscribe.Core.SimpleContent.Integration.ViewModels.ContentSettingsViewModel
@inject ICoreThemeHelper themeHelper
@inject IStringLocalizer<SimpleContent> sr
@inject IOptions<ContentSettingsUIConfig> uiOptionsAccessor
@inject ISummernoteOptionsResolver summernoteOptionsResolver
@inject ICkeditorOptionsResolver editorOptionsResolver
@{
var uiOptions = uiOptionsAccessor.Value;
var themeSettings = themeHelper.GetThemeSettings();
if (themeSettings.AdminSideNavExpanded) { ViewData["SideNavToggle"] = "show"; }
ViewData["SideNavVisible"] = true;
var summernoteOptions = await summernoteOptionsResolver.GetSummernoteOptions();
var ckOptions = await editorOptionsResolver.GetCkeditorOptions();
if (string.IsNullOrWhiteSpace(Model.AboutHeading))
{
Model.AboutHeading = sr["About"];
}
}
<h2>@ViewBag.Title</h2>
<form method="post" class="form-horizontal" role="form" asp-antiforgery="true" data-submit-once="true">
<div asp-validation-summary="All" class="text-danger"></div>
@if (uiOptions.ShowBlogSettings)
{
<div class="mb-3">
<label asp-for="Title">@sr["Blog Page Title"]</label>
<input asp-for="Title" class="form-control" />
<span asp-validation-for="Title" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="Description">@sr["Description"]</label>
<input asp-for="Description" class="form-control" data-bs-toggle="tooltip" title='@sr["The description also is used as the channel description in the RSS feed."]' />
<span asp-validation-for="Description" class="text-danger"></span>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will show the blog title and description at the top of the post list."]'>
<input asp-for="ShowTitle" class="form-check-input" />
<label asp-for="ShowTitle" class="form-check-label">@sr["Show Blog Title and Description"]</label>
</div>
</div>
<div class="mb-3">
<label asp-for="AboutHeading">@sr["About Heading"]</label>
<input asp-for="AboutHeading" class="form-control" data-bs-toggle="tooltip" title='@sr["The heading for the about box in the blog side panel."]' />
<span asp-validation-for="AboutHeading" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="AboutContent">@sr["About Content"]</label>
<textarea asp-for="AboutContent" rows="5"
data-summernote-unobtrusive=""
data-summernote-config-url="@summernoteOptions.CustomConfigPath"
data-summernote-toolbar-config-url="@summernoteOptions.CustomToolbarConfigPath"
data-summernote-config-language="@summernoteOptions.LanguageCode"
data-summernote-config-dropfileuploadurl="@summernoteOptions.DropFileUrl"
data-summernote-config-filebrowserurl="@summernoteOptions.FileBrowseUrl"
data-summernote-config-imagebrowseurl="@summernoteOptions.ImageBrowseUrl">
</textarea>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will show the blog title and description at the top of the post list."]'>
<input asp-for="ShowAboutBox" class="form-check-input" />
<label asp-for="ShowAboutBox" class="form-check-label">@sr["Show About box in side bar of the blog."]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will show the blog title and description at the top of the post list."]'>
<input asp-for="ShowRelatedPosts" class="form-check-input" />
<label asp-for="ShowRelatedPosts" class="form-check-label">@sr["Show related posts in the blog side bar based on categories of the current post."]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will show the blog categories in the side bar"]'>
<input asp-for="ShowBlogCategories" class="form-check-input" />
<label asp-for="ShowBlogCategories" class="form-check-label">@sr["Show the blog categories in the side bar"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will show the blog archives in the side bar"]'>
<input asp-for="ShowArchivedPosts" class="form-check-input" />
<label asp-for="ShowArchivedPosts" class="form-check-label">@sr["Show the blog archives in the side bar"]</label>
</div>
</div>
}
else
{
<input asp-for="Title" type="hidden" />
<input asp-for="Description" type="hidden" />
<input asp-for="ShowTitle" type="hidden" />
<input asp-for="AboutHeading" type="hidden" />
<input asp-for="AboutContent" type="hidden" />
<input asp-for="ShowAboutBox" type="hidden" />
<input asp-for="ShowRelatedPosts" type="hidden" />
}
@if (uiOptions.ShowBlogMenuOptions)
{
<div class="mb-3">
<label asp-for="BlogPageText">@sr["Blog Page Menu Text"]</label>
<input asp-for="BlogPageText" class="form-control" />
<span asp-validation-for="BlogPageText" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="BlogPageNavComponentVisibility">@sr["Blog Page Menu Visibility"]</label>
<input asp-for="BlogPageNavComponentVisibility" class="form-control" data-bs-toggle="tooltip" title='@sr["A comma separated list of navigation component filter names used to filter the blog out of the menu. Leave this blank so the blog menu item is not filtered from any of the menu views. There are some standard filter names like topnav and breadcrumbs but it is also possible to use custom names with custom views. As soon as you populate this field it becomes filtered to only show the blog menu item in the included views, whereas blank means unfiltered."]' />
<span asp-validation-for="BlogPageNavComponentVisibility" class="text-danger"></span>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["Add the blog as a top level menu item. There are multiple other ways of adding the blog to the menu. You can make a page that links to /blog or it can be done from the navigation.xml file. If you see it in the menu more than once it means you have multiple ways it is configured to be added."]'>
<input asp-for="AddBlogToPagesTree" class="form-check-input" />
<label asp-for="AddBlogToPagesTree" class="form-check-label">@sr["Add Blog To Menu"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked the blog menu item will link to the most recent post instead of the post list."]'>
<input asp-for="BlogMenuLinksToNewestPost" class="form-check-input" />
<label asp-for="BlogMenuLinksToNewestPost" class="form-check-label">@sr["Blog Menu Links To Newest Post"]</label>
</div>
</div>
<div class="mb-3">
<label asp-for="BlogPagePosition">@sr["Blog Menu Position"]</label>
<input asp-for="BlogPagePosition" class="form-control" data-bs-toggle="tooltip" title='@sr["The position of the blog within the top level menu."]' />
<span asp-validation-for="BlogPagePosition" class="text-danger"></span>
</div>
}
else
{
<input id="BlogPageText" name="BlogPageText" value="Blog" type="hidden" />
<input id="BlogPageNavComponentVisibility" name="BlogPageNavComponentVisibility" value="" type="hidden" />
<input id="AddBlogToPagesTree" name="AddBlogToPagesTree" value="false" type="hidden" />
<input id="BlogMenuLinksToNewestPost" name="BlogMenuLinksToNewestPost" value="false" type="hidden" />
<input id="BlogPagePosition" name="BlogPagePosition" value="2" type="hidden" />
}
@if (!uiOptions.ShowBlogSettings)
{
<input asp-for="PostsPerPage" type="hidden" />
<input asp-for="PubDateFormat" type="hidden" />
<input asp-for="IncludePubDateInPostUrls" type="hidden" />
}
@if (uiOptions.ShowBlogSettings)
{
<div class="mb-3">
<label asp-for="PostsPerPage">@sr["Posts Per Page"]</label>
<input asp-for="PostsPerPage" class="form-control" data-bs-toggle="tooltip" title='@sr["Number of posts to show per page on the post list."]' />
<span asp-validation-for="PostsPerPage" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="PubDateFormat">@sr["Date Format"]</label>
<input asp-for="PubDateFormat" class="form-control" />
<span asp-validation-for="PubDateFormat" class="text-danger"></span>
</div>
<div class="mb-3">
<div class="form-check">
<input asp-for="IncludePubDateInPostUrls" class="form-check-input" />
<label asp-for="IncludePubDateInPostUrls" class="form-check-label">@sr["Include Date In Post Urls"]</label>
</div>
</div>
@if (Model.TeasersDisabled)
{
<input name="TeaserMode" value="0" type="hidden" />
<input asp-for="TeaserTruncationMode" type="hidden" />
<input asp-for="TeaserTruncationLength" type="hidden" />
}
else
{
<div class="mb-3">
<label asp-for="TeaserMode">@sr["Teaser Mode"]</label>
<select asp-for="TeaserMode" class="form-control" data-bs-toggle="tooltip" title='@sr["If ON, truncated 'teasers' will automatically be generated for blog list views and RSS feed, and a read more link will be shown. You can overide the auto generated teaser per post with a manually created teaser"]'>
<option value="0">@sr["Off"]</option>
<option value="1">@sr["Lists and Feed"]</option>
<option value="2">@sr["Feed Only"]</option>
<option value="3">@sr["List Only"]</option>
</select>
<span asp-validation-for="TeaserMode" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="TeaserTruncationMode">@sr["Teaser Truncation Mode"]</label>
<select asp-for="TeaserTruncationMode" class="form-control" data-bs-toggle="tooltip" title='@sr["Truncate blog posts in lists views and in the feed by character/word/length. Words is recommended."]'>
<option value="0">@sr["Words"]</option>
<option value="1">@sr["Absolute string lenth including white space"]</option>
<option value="2">@sr["Letters or digits"]</option>
</select>
<span asp-validation-for="TeaserTruncationMode" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="TeaserTruncationLength">@sr["Teaser Truncation Length"]</label>
<input asp-for="TeaserTruncationLength" class="form-control" data-bs-toggle="tooltip" title='@sr["Length (character/word/length) to truncate blog posts for teasers."]' />
<span asp-validation-for="TeaserTruncationLength" class="text-danger"></span>
</div>
}
}
<partial name="CommentSystemSettings" model="@Model" />
@if (uiOptions.ShowDefaultContentType)
{
<div class="mb-3">
<label asp-for="DefaultContentType">@sr["Default Content Type"]</label>
<select asp-for="DefaultContentType" class="form-control" data-bs-toggle="tooltip">
<option value="html">html</option>
<option value="markdown">markdown</option>
</select>
<span asp-validation-for="DefaultContentType" class="text-danger"></span>
</div>
}
else
{
<input asp-for="DefaultContentType" type="hidden" />
}
@if (uiOptions.ShowPageSettings)
{
<div class="mb-3">
<label asp-for="DefaultPageSlug">@sr["Default Page"]</label>
<input asp-for="DefaultPageSlug" class="form-control" />
<span asp-validation-for="DefaultPageSlug" class="text-danger"></span>
</div>
}
else
{
<input asp-for="DefaultPageSlug" type="hidden" />
}
@if (uiOptions.ShowBlogSettings && uiOptions.ShowPageSettings)
{
<div class="mb-3">
<div class="form-check">
<input asp-for="ShowRecentPostsOnDefaultPage" class="form-check-input" />
<label asp-for="ShowRecentPostsOnDefaultPage" class="form-check-label">@sr["Show Recent Posts on Default Page"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check">
<input asp-for="ShowFeaturedPostsOnDefaultPage" class="form-check-input" />
<label asp-for="ShowFeaturedPostsOnDefaultPage" class="form-check-label">@sr["Show Featured Posts on Default Page"]</label>
</div>
</div>
}
else
{
<input asp-for="ShowRecentPostsOnDefaultPage" type="hidden" />
<input asp-for="ShowFeaturedPostsOnDefaultPage" type="hidden" />
}
<partial name="MediaPathPartial" model="Model" />
<partial name="CdnUrlPartial" model="Model" />
<div class="mb-3">
<label asp-for="Publisher">@sr["Publisher"]</label>
<input asp-for="Publisher" class="form-control" data-bs-toggle="tooltip" title='@sr["This is used in meta data, see http://schema.org/publisher."]' />
<span asp-validation-for="Publisher" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="PublisherLogoUrl">@sr["Publisher Logo Url"]</label>
<input asp-for="PublisherLogoUrl" class="form-control" data-bs-toggle="tooltip" title='@sr["This is used in meta data, see http://schema.org/logo."]' />
<span asp-validation-for="PublisherLogoUrl" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="PublisherLogoWidth">@sr["Publisher Logo Width"]</label>
<input asp-for="PublisherLogoWidth" class="form-control" />
<span asp-validation-for="PublisherLogoWidth" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="PublisherLogoHeight">@sr["Publisher Logo Height"]</label>
<input asp-for="PublisherLogoHeight" class="form-control" />
<span asp-validation-for="PublisherLogoHeight" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="PublisherEntityType">@sr["Publisher Type"]</label>
<select asp-for="PublisherEntityType" class="form-control" data-bs-toggle="tooltip" title='@sr["This is used in meta data, see http://schema.org/publisher."]'>
<option value="Organization">@sr["Organization"]</option>
<option value="Person">@sr["Person"]</option>
</select>
<span asp-validation-for="PublisherEntityType" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="FacebookAppId">@sr["Facebook App Id"]</label>
<input asp-for="FacebookAppId" class="form-control" data-bs-toggle="tooltip" />
<span asp-validation-for="FacebookAppId" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="SiteName">@sr["Site Name"]</label>
<input asp-for="SiteName" class="form-control" data-bs-toggle="tooltip" title='@sr["Site Name is used in meta data."]' />
<span asp-validation-for="SiteName" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="TwitterPublisher">@sr["Publisher Twitter Handle"]</label>
<input asp-for="TwitterPublisher" class="form-control" data-bs-toggle="tooltip" title='@sr["This is used in meta data."]' />
<span asp-validation-for="TwitterPublisher" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="TwitterCreator">@sr["Creator Twitter Handle"]</label>
<input asp-for="TwitterCreator" class="form-control" data-bs-toggle="tooltip" title='@sr["This is used in meta data."]' />
<span asp-validation-for="TwitterCreator" class="text-danger"></span>
</div>
<div class="mb-3">
<p>@sr["Show / hide the following information below the main content of pages (site default)."]</p>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["Show Created By"]'>
<input asp-for="ShowCreatedBy" class="form-check-input" />
<label asp-for="ShowCreatedBy" class="form-check-label">@sr["Show Created By"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["Show Created Date"]'>
<input asp-for="ShowCreatedDate" class="form-check-input" />
<label asp-for="ShowCreatedDate" class="form-check-label">@sr["Show Created Date"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["Show Last Modified By"]'>
<input asp-for="ShowLastModifiedBy" class="form-check-input" />
<label asp-for="ShowLastModifiedBy" class="form-check-label">@sr["Show Last Modified By"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["Show Last Modified Date"]'>
<input asp-for="ShowLastModifiedDate" class="form-check-input" />
<label asp-for="ShowLastModifiedDate" class="form-check-label">@sr["Show Last Modified Date"]</label>
</div>
</div>
@if (uiOptions.ShowBlogSettings)
{
<fieldset>
<legend>@sr["Feed Settings"]</legend>
<div class="mb-3">
<label asp-for="RemoteFeedUrl">@sr["Feedburner Url"]</label>
<input asp-for="RemoteFeedUrl" class="form-control" />
<span asp-validation-for="RemoteFeedUrl" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="LanguageCode">@sr["Language Code"]</label>
<input asp-for="LanguageCode" class="form-control" />
<span asp-validation-for="LanguageCode" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="ChannelCategoriesCsv">@sr["Comma Separated Channel Categories"]</label>
<input asp-for="ChannelCategoriesCsv" class="form-control" />
<span asp-validation-for="ChannelCategoriesCsv" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="ManagingEditorEmail">@sr["Managing Editor Email"]</label>
<input asp-for="ManagingEditorEmail" class="form-control" />
<span asp-validation-for="ManagingEditorEmail" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="WebmasterEmail">@sr["Webmaster Email"]</label>
<input asp-for="WebmasterEmail" class="form-control" />
<span asp-validation-for="WebmasterEmail" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="DefaultFeedItems">@sr["Default Feed Items"]</label>
<input asp-for="DefaultFeedItems" class="form-control" data-bs-toggle="tooltip" title='@sr["Number of posts to show in the feed by default."]' />
<span asp-validation-for="DefaultFeedItems" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="MaxFeedItems">@sr["Max Feed Items"]</label>
<input asp-for="MaxFeedItems" class="form-control" data-bs-toggle="tooltip" title='@sr["Maximum number of posts to show in the feed. Used to constrain the query string paramter for feed size."]' />
<span asp-validation-for="MaxFeedItems" class="text-danger"></span>
</div>
</fieldset>
}
else
{
<input asp-for="RemoteFeedUrl" type="hidden" />
<input asp-for="LanguageCode" type="hidden" />
<input asp-for="ChannelCategoriesCsv" type="hidden" />
<input asp-for="ManagingEditorEmail" type="hidden" />
<input asp-for="WebmasterEmail" type="hidden" />
}
<div class="mb-3">
<button id="btnSave" name="submit" type="submit" class="btn btn-primary" data-disabled-text='@sr["Working..."]' data-enabled-text='@sr["Save"]'>@sr["Save"]</button>
</div>
</form>
@if (Model.Editors.Count > 0)
{
<h3>@sr["Editors"]</h3>
<ul class="list-unstyled">
@foreach (var user in Model.Editors)
{
<li class="mb-2">
@user.DisplayName - @user.Email
<a class="btn btn-xs btn-primary" asp-action="UserEdit"
asp-controller="UserAdmin"
asp-route-siteId="@user.SiteId"
asp-route-userId="@user.Id">@sr["Manage"]</a>
</li>
}
</ul>
}
@section SideNav {
<partial name="AdminSideNav" />
}
@section Toolbar{
<partial name="AdminSideNavToggle" />
}
@section Scripts {
<partial name="AdminSideNavScripts" />
<script src="~/cr/js/jquery.validate.min.js"></script>
<script src="~/cr/js/jquery.validate.unobtrusive.min.js"></script>
<script src="~/cr/js/jquery.validate.hooks.min.js"></script>
<script src="~/cr/js/jqueryvaildation.submitonce-unobtrusive.min.js"></script>
<script src="~/cr/js/ckeditor4114/ckeditor.js"></script>
<script src="~/cr/js/cloudscribe-ckeditor-unobtrusive.min.js"></script>
<script src="~/cr/js/bootstrap-tooltip-toggle.js"></script>
}