Error executing template "QueryPublisher/EntityItems.cshtml"
System.IO.IOException: The process cannot access the file 'd:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\Designs\Blogtheme\json\AllEntitiesTest.json' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at CompiledRazorTemplates.Dynamic.RazorEngine_a785733b522946009a4297b2e3439249.Execute() in d:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\QueryPublisher\EntityItems.cshtml:line 70
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using System.Web
2 @using System.Net;
3 @using Newtonsoft.Json;
4 @using Newtonsoft.Json.Linq;
5
6
7 @functions {
8 public class RootObject
9 {
10 public string tableName { get; set; }
11 public List<Entity> entityList { get; set; }
12 }
13
14 public class Entity
15 {
16 public string Id { get; set; }
17 public int Sort { get; set; }
18 public string ItemInstanceType { get; set; }
19 public string Title { get; set; }
20 public string Type { get; set; }
21 public string Description { get; set; }
22 public string Image { get; set; }
23 public string Culture { get; set; }
24 public string Greek_Subcultures { get; set; }
25 public string Roman_Republican_Subcultures { get; set; }
26 public string Roman_Imperial_Subcultures { get; set; }
27 public string Celtic_Subcultures { get; set; }
28 public string Roman_Provincial_Subcultures { get; set; }
29 public string Islamic_Subcultures { get; set; }
30 public string Eastern_Subcultures { get; set; }
31 public string European_Medieval_Subcultures { get; set; }
32 public string Indian_Subcultures { get; set; }
33 public string Byzantine_Subcultures { get; set; }
34 public string Phoenician_Subcultures { get; set; }
35 public string Chinese_Subcultures { get; set; }
36 public string Zone { get; set; }
37 public string Region { get; set; }
38 public string Location { get; set; }
39 public string Modern_Location { get; set; }
40 public string Ruler_Title { get; set; }
41 public string Ruler_Title_English { get; set; }
42 public string Epithet { get; set; }
43 public string EpithetEnglish { get; set; }
44 public string Domain { get; set; }
45 public string Doman_English { get; set; }
46 public string StartOf_Rule { get; set; }
47 public string EndOf_Rule { get; set; }
48 public string OwnerID { get; set; }
49 public string OwnerName { get; set; }
50 public string ShortDescription { get; set; }
51 public string Focus { get; set; }
52 public string IsPatron { get; set; }
53 public string IsFolder { get; set; }
54 public string IsDeleted { get; set; }
55 public string MetalsList { get; set; }
56 public string MintedByList { get; set; }
57 public string IncludeInMenu { get; set; }
58 public string NameReadable { get; set; }
59 public string PreviousText { get; set; }
60 public string NextText { get; set; }
61 public string RelevantPageID { get; set; }
62 public string RelevantParagraphID { get; set; }
63 public string RelevantAreaID { get; set; }
64 }
65
66 }
67
68
69 @{
70 string AllEntitiesRaw = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Blogtheme/json/AllEntitiesTest.json"));
71 int AllEntitiesRawLength = AllEntitiesRaw.Length;
72
73 var AllEntitiesJSON = JsonConvert.DeserializeObject<List<Entity>>(@AllEntitiesRaw.Substring(49, @AllEntitiesRawLength - 55));
74 }
75
76 @{
77 string[] stringSeparators = new string[] { ", ", " and ", "|", "," };
78
79 string Mint = System.Web.HttpContext.Current.Request.QueryString["Mint"];
80 string[] mints;
81
82 if (!string.IsNullOrWhiteSpace(@Mint))
83 {
84 mints = Mint.Split(stringSeparators, StringSplitOptions.None);
85 }
86 else
87 {
88 mints = new string[] { };
89 }
90 string Zone = System.Web.HttpContext.Current.Request.QueryString["Zone"];
91 string Region = System.Web.HttpContext.Current.Request.QueryString["Region"];
92 string lat = "";
93 string lng = "";
94
95 string Denomination = System.Web.HttpContext.Current.Request.QueryString["Denomination"];
96 string[] denominations;
97
98 if (!string.IsNullOrWhiteSpace(@Denomination))
99 {
100 denominations = Denomination.Split(stringSeparators, StringSplitOptions.None);
101 }
102 else
103 {
104 denominations = new string[] { };
105 }
106
107 string Category = System.Web.HttpContext.Current.Request.QueryString["Category"];
108 string Subcategory = System.Web.HttpContext.Current.Request.QueryString["Subcategory"];
109 string SortBy = System.Web.HttpContext.Current.Request.QueryString["SortBy"];
110 string Metal = System.Web.HttpContext.Current.Request.QueryString["Metal"];
111 string Ruler = System.Web.HttpContext.Current.Request.QueryString["Ruler"];
112 string BelongsToUser = System.Web.HttpContext.Current.Request.QueryString["BelongsToUser"];
113 string Folder = System.Web.HttpContext.Current.Request.QueryString["Folder"];
114 string print = System.Web.HttpContext.Current.Request.QueryString["print"];
115
116 string ParentID = System.Web.HttpContext.Current.Request.QueryString["ParentID"];
117
118 string[] entitytitles;
119
120 string Culture = "";
121 string subculturetype = "";
122 string subculture = "";
123
124 string next = "";
125 string previous = "";
126
127 bool InfoRendered = false;
128 bool HasSubfolders = false;
129
130 string RenderPID = "8"; @* ID of the page to render on *@
131
132 string AbsoluteURL = @GetGlobalValue("Global:Request.AbsoluteUri");
133 string[] UrlParameters = @GetGlobalValue("Global:Pageview.Url.Raw").Split('&');
134 string userfilterstring = "&BelongsToUser=6&SortBy=" + @SortBy;
135 string returnlink = "";
136
137 string ogtitle = "";
138 string ogdescription = "";
139 string ogimage = "";
140
141 }
142
143
144 @foreach (var entity in GetLoop("QueryResultItem"))
145 {
146 string title = entity.GetString("Entity_Title");
147 entitytitles = title.Split(stringSeparators, StringSplitOptions.None);
148
149 next = entity.GetString("Entity_NextText");
150 previous = entity.GetString("Entity_PreviousText");
151
152 Culture = entity.GetString("Entity_Culture");
153 subculturetype = "Entity_" + @Culture + "_Subcultures";<div>@* Constructs a string to retrieve the appropriate subculture *@</div>
154 subculture = @entity.GetString(@subculturetype);
155
156 string type = @entity.GetString("Entity_Type");
157
158 <div></div>
159
160 @* Strips BelongsToUser URL parameters and sort parameters from absolute URL in order to return users with the right parameters after using the button to show only their coins *@
161 if (@AbsoluteURL.EndsWith(@userfilterstring))
162 {
163 returnlink = @AbsoluteURL.Substring(0, @AbsoluteURL.LastIndexOf(@userfilterstring));
164 }
165
166
167 @* ------------------Category info: check for Subcategory & Title means this section won't be rendered if a Title & Subcategory needs a Category check to render properly------------------ *@
168 if (@type == "Category" && title == @Category && string.IsNullOrWhiteSpace(@Subcategory) && string.IsNullOrWhiteSpace(@Ruler) && string.IsNullOrWhiteSpace(@Denomination))
169 {
170 <!--Title & Navigation-->
171 <div class="col-md-12 header-bar">
172 <span class="font-title">@title.Replace("_", " ") Coins</span>
173 <!--Navigation-->
174 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
175 <!--Previous-->
176 @if (!string.IsNullOrWhiteSpace(@previous))
177 {
178 if (@type == "Subcategory" && @Category == @Culture ||
179 @type == "Authority" && @Culture != "Roman_Provincial" ||
180 @type == "Authority" && @Culture != "Roman_Imperial")
181 {
182 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
183 }
184 else
185 {
186 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
187 }
188
189 }
190 else
191 {
192 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
193 }
194 <!--Up-->
195 @if (@type == "Subcategory")
196 {
197 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
198 }
199 else if (@type == "Ruler")
200 {
201 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
202 }
203 else if (@type == "Region")
204 {
205 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
206 }
207 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
208 {
209 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
210 }
211 else if (@type == "Mint")
212 {
213 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
214 }
215 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
216 {
217 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
218 }
219 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
220 {
221 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
222 }
223 else
224 {
225 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
226 }
227
228 <!--Next-->
229 @if (!string.IsNullOrWhiteSpace(@next))
230 {
231 if (@type == "Subcategory" && @Category == @Culture ||
232 @type == "Authority" && @Culture != "Roman_Provincial" ||
233 @type == "Authority" && @Culture != "Roman_Imperial")
234 {
235 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
236 }
237 else
238 {
239 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
240 }
241 }
242 else
243 {
244 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
245 }
246 </div>
247 </div>
248 <!--Description & Image-->
249 <div class="col-md-12 row">
250 <div class="col-md-8">
251 <span class="font-normal">@entity.GetString("Entity_Description")</span>
252 </div>
253 <div class="col-md-4 text-center">
254 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
255 {
256 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
257 }
258 else
259 {
260 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
261 }
262 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
263 </div>
264 <div class="col-md-12">
265 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
266 {
267 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
268 }
269 </div>
270 </div>
271 <!--Action buttons-->
272 <div class="col-md-12 btn-group-sm header-bar" align="center">
273 @{
274 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
275
276 }
277
278 <!--Filter-->
279 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
280 {
281 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
282 {
283 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
284 }
285 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
286 {
287 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
288 }
289 else
290 {
291 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
292 }
293
294 }
295 else
296 {
297 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
298 }
299 <!--Add Coin-->
300 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
301 {
302 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
303 }
304 else
305 {
306 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
307 }
308 <!--Edit Entity-->
309 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
310 {
311 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
312 {
313 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
314 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
315 }
316 }
317
318 <!--Collection buttons -->
319 @if (type == "Collection")
320 {
321 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
322 {
323 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
324 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
325 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
326 if (string.IsNullOrWhiteSpace(@Folder))
327 {
328 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
329 }
330 else
331 {
332 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
333 }
334 }
335
336 if (@SortBy == "CustomSortValue")
337 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
338 else
339 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
340 if (@SortBy == "TitleSortValue")
341 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
342 else
343 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
344
345 }
346 </div>
347
348 <!--OG data-->
349 ogtitle = @title.Replace("_", " ") + " Coins";
350 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
351 ogimage = @entity.GetString("Entity_Image");
352
353 InfoRendered = true;
354 }
355 @* ------------------Subcategory info: checks type and that entity culture matches the category passed ------------------ *@
356 if (@type == "Subcategory" && @Category == @Culture)
357 {
358 string SubCatTitle = "";
359 if (@Culture == "Islamic")
360 {
361 SubCatTitle = title.Replace("_", " ") + " " + "Coins";
362 }
363 else
364 {
365 SubCatTitle = "Coins from " + title.Replace("_", " ");
366 }
367
368 <!--Title & Navigation-->
369 <div class="col-md-12 header-bar">
370 <span class="font-title">@SubCatTitle</span>
371 <!--Navigation-->
372 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
373 <!--Previous-->
374 @if (!string.IsNullOrWhiteSpace(@previous))
375 {
376 if (@type == "Subcategory" && @Category == @Culture ||
377 @type == "Authority" && @Culture != "Roman_Provincial" ||
378 @type == "Authority" && @Culture != "Roman_Imperial")
379 {
380 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
381 }
382 else
383 {
384 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
385 }
386
387 }
388 else
389 {
390 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
391 }
392 <!--Up-->
393 @if (@type == "Subcategory")
394 {
395 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
396 }
397 else if (@type == "Ruler")
398 {
399 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
400 }
401 else if (@type == "Region")
402 {
403 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
404 }
405 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
406 {
407 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
408 }
409 else if (@type == "Mint")
410 {
411 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
412 }
413 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
414 {
415 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
416 }
417 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
418 {
419 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
420 }
421 else
422 {
423 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
424 }
425
426 <!--Next-->
427 @if (!string.IsNullOrWhiteSpace(@next))
428 {
429 if (@type == "Subcategory" && @Category == @Culture ||
430 @type == "Authority" && @Culture != "Roman_Provincial" ||
431 @type == "Authority" && @Culture != "Roman_Imperial")
432 {
433 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
434 }
435 else
436 {
437 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
438 }
439 }
440 else
441 {
442 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
443 }
444 </div>
445 </div>
446 <!--Description & Image-->
447 <div class="col-md-12 row">
448
449 <div class="col-md-8">
450 <span class="font-normal">@entity.GetString("Entity_Description")</span>
451 </div>
452 <div class="col-md-4 text-center">
453 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
454 {
455 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
456 }
457 else
458 {
459 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
460 }
461 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
462 </div>
463 <div class="col-md-12">
464 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
465 {
466 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
467 }
468 </div>
469
470 </div>
471 <!--Action buttons-->
472 <div class="col-md-12 btn-group-sm header-bar" align="center">
473 @{
474 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
475
476 }
477
478 <!--Filter-->
479 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
480 {
481 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
482 {
483 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
484 }
485 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
486 {
487 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
488 }
489 else
490 {
491 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
492 }
493
494 }
495 else
496 {
497 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
498 }
499 <!--Add Coin-->
500 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
501 {
502 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
503 }
504 else
505 {
506 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
507 }
508 <!--Edit Entity-->
509 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
510 {
511 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
512 {
513 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
514 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
515 }
516 }
517
518 <!--Collection buttons -->
519 @if (type == "Collection")
520 {
521 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
522 {
523 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
524 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
525 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
526 if (string.IsNullOrWhiteSpace(@Folder))
527 {
528 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
529 }
530 else
531 {
532 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
533 }
534 }
535
536 if (@SortBy == "CustomSortValue")
537 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
538 else
539 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
540 if (@SortBy == "TitleSortValue")
541 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
542 else
543 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
544
545 }
546 </div>
547
548 <!--OG data-->
549 ogtitle = SubCatTitle;
550 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
551 ogimage = @entity.GetString("Entity_Image");
552
553 InfoRendered = true;
554 }
555
556 @* ------------------Authority info------------------ *@
557 if (title == @Ruler && @type == "Ruler" && @Culture == @Category ||
558 title == @Ruler && @type == "Ruler" && @Culture == "Roman_Imperial" && @Category != "Roman_Republican" && @Category != "Byzantine" ||
559 title == @Ruler && @type == "Ruler" && @Culture == "Roman_Provincial"
560 )
561 {
562 <!--Title-->
563 <div class="col-md-12 header-bar">
564 <span class="font-title">
565 @title.Replace("_", " ")
566
567 </span>
568 <span class="font-description">
569 — @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Ruler_Title_English")))
570 {
571 <span>@entity.GetString("Entity_Ruler_Title_English") of</span>
572 }
573 else
574 {
575 <span>Authority in</span>
576 } @entity.GetString("Entity_Doman_English")
577 </span>
578 <span class="font-description">
579 from @entity.GetString("Entity_StartOf_Rule") to @entity.GetString("Entity_EndOf_Rule").
580 </span>
581 <!--Navigation-->
582 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
583 <!--Previous-->
584 @if (!string.IsNullOrWhiteSpace(@previous))
585 {
586 if (@type == "Subcategory" && @Category == @Culture ||
587 @type == "Authority" && @Culture != "Roman_Provincial" ||
588 @type == "Authority" && @Culture != "Roman_Imperial")
589 {
590 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
591 }
592 else
593 {
594 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
595 }
596
597 }
598 else
599 {
600 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
601 }
602 <!--Up-->
603 @if (@type == "Subcategory")
604 {
605 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
606 }
607 else if (@type == "Ruler")
608 {
609 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
610 }
611 else if (@type == "Region")
612 {
613 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
614 }
615 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
616 {
617 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
618 }
619 else if (@type == "Mint")
620 {
621 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
622 }
623 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
624 {
625 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
626 }
627 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
628 {
629 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
630 }
631 else
632 {
633 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
634 }
635
636 <!--Next-->
637 @if (!string.IsNullOrWhiteSpace(@next))
638 {
639 if (@type == "Subcategory" && @Category == @Culture ||
640 @type == "Authority" && @Culture != "Roman_Provincial" ||
641 @type == "Authority" && @Culture != "Roman_Imperial")
642 {
643 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
644 }
645 else
646 {
647 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
648 }
649 }
650 else
651 {
652 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
653 }
654 </div>
655
656 </div>
657 <!--Description & Image-->
658 <div class="col-md-12 row">
659 <div class="col-md-8">
660 <span class="font-normal">@entity.GetString("Entity_Description")</span>
661 </div>
662 <div class="col-md-4 text-center">
663 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
664 {
665 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
666 }
667 else
668 {
669 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
670 }
671 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
672 </div>
673 <div class="col-md-12">
674 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
675 {
676 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
677 }
678 </div>
679
680 </div>
681 <!--Action buttons-->
682 <div class="col-md-12 btn-group-sm header-bar" align="center">
683 @{
684 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
685
686 }
687
688 <!--Filter-->
689 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
690 {
691 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
692 {
693 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
694 }
695 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
696 {
697 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
698 }
699 else
700 {
701 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
702 }
703
704 }
705 else
706 {
707 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
708 }
709 <!--Add Coin-->
710 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
711 {
712 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
713 }
714 else
715 {
716 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
717 }
718 <!--Edit Entity-->
719 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
720 {
721 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
722 {
723 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
724 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
725 }
726 }
727
728 <!--Collection buttons -->
729 @if (type == "Collection")
730 {
731 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
732 {
733 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
734 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
735 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
736 if (string.IsNullOrWhiteSpace(@Folder))
737 {
738 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
739 }
740 else
741 {
742 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
743 }
744 }
745
746 if (@SortBy == "CustomSortValue")
747 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
748 else
749 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
750 if (@SortBy == "TitleSortValue")
751 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
752 else
753 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
754
755 }
756 </div>
757
758 <!--OG data-->
759 ogtitle = title.Replace("_", " ");
760 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
761 ogimage = @entity.GetString("Entity_Image");
762
763
764 InfoRendered = true;
765 }
766
767 @* ------------------Denomination info------------------ *@
768
769 if (@entitytitles.Any(denominations.Contains) && @type == "Denomination")
770 {
771 <div class="col-md-12 header-bar">
772
773 <!--Title-->
774 <span class="font-title">The @denominations[0] denomination</span>
775 @if (@entitytitles.Length > 1)
776 {
777 <span class="font-description"> — Variants: </span>
778 }
779 @foreach (var titleElement in @entitytitles)
780 {
781 if (@titleElement != @denominations[0])
782 {
783 <span class="font-description">@titleElement</span>
784 if (@titleElement == entitytitles.Last())
785 {
786 <span></span>
787 }
788 else
789 {
790 <span>-</span>
791 }
792 }
793 }
794 <!--Navigation-->
795 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
796 <!--Previous-->
797 @if (!string.IsNullOrWhiteSpace(@previous))
798 {
799 if (@type == "Subcategory" && @Category == @Culture ||
800 @type == "Authority" && @Culture != "Roman_Provincial" ||
801 @type == "Authority" && @Culture != "Roman_Imperial")
802 {
803 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
804 }
805 else
806 {
807 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
808 }
809
810 }
811 else
812 {
813 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
814 }
815 <!--Up-->
816 @if (@type == "Subcategory")
817 {
818 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
819 }
820 else if (@type == "Ruler")
821 {
822 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
823 }
824 else if (@type == "Region")
825 {
826 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
827 }
828 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
829 {
830 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
831 }
832 else if (@type == "Mint")
833 {
834 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
835 }
836 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
837 {
838 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
839 }
840 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
841 {
842 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
843 }
844 else
845 {
846 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
847 }
848
849 <!--Next-->
850 @if (!string.IsNullOrWhiteSpace(@next))
851 {
852 if (@type == "Subcategory" && @Category == @Culture ||
853 @type == "Authority" && @Culture != "Roman_Provincial" ||
854 @type == "Authority" && @Culture != "Roman_Imperial")
855 {
856 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
857 }
858 else
859 {
860 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
861 }
862 }
863 else
864 {
865 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
866 }
867 </div>
868
869 </div>
870 <!--Description & Image-->
871 <div class="col-md-12 row" style="padding-top:5px">
872 <div class="col-md-8">
873 <span class="font-normal">@entity.GetString("Entity_Description")</span>
874 </div>
875 <div class="col-md-4 text-center">
876 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
877 {
878 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
879 }
880 else
881 {
882 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
883 }
884 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
885 </div>
886 <div class="col-md-12">
887 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
888 {
889 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
890 }
891 </div>
892 </div>
893 <!--Action buttons-->
894 <div class="col-md-12 btn-group-sm header-bar" align="center">
895 @{
896 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
897
898 }
899
900 <!--Filter-->
901 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
902 {
903 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
904 {
905 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
906 }
907 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
908 {
909 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
910 }
911 else
912 {
913 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
914 }
915
916 }
917 else
918 {
919 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
920 }
921 <!--Add Coin-->
922 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
923 {
924 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
925 }
926 else
927 {
928 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
929 }
930 <!--Edit Entity-->
931 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
932 {
933 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
934 {
935 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
936 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
937 }
938 }
939
940 <!--Collection buttons -->
941 @if (type == "Collection")
942 {
943 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
944 {
945 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
946 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
947 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
948 if (string.IsNullOrWhiteSpace(@Folder))
949 {
950 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
951 }
952 else
953 {
954 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
955 }
956 }
957
958 if (@SortBy == "CustomSortValue")
959 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
960 else
961 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
962 if (@SortBy == "TitleSortValue")
963 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
964 else
965 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
966
967 }
968 </div>
969
970 <!--OG data-->
971 ogtitle = "The " + @denominations[0] + " denomination";
972 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
973 ogimage = @entity.GetString("Entity_Image");
974
975 InfoRendered = true;
976 }
977
978 @* ------------------Region & Zone info------------------ *@
979 if (title == @Region && !string.IsNullOrWhiteSpace(@Region) && InfoRendered == false && @type == "Region" ||
980 title == @Zone && !string.IsNullOrWhiteSpace(@Zone) && InfoRendered == false && @type == "Zone"
981 )
982 {
983 <!--Title & Navigation-->
984 <div class="col-md-12 header-bar">
985 <span class="font-title">Coins from @title.Replace("_", " ")</span>
986 <!--Navigation-->
987 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
988 <!--Previous-->
989 @if (!string.IsNullOrWhiteSpace(@previous))
990 {
991 if (@type == "Subcategory" && @Category == @Culture ||
992 @type == "Authority" && @Culture != "Roman_Provincial" ||
993 @type == "Authority" && @Culture != "Roman_Imperial")
994 {
995 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
996 }
997 else
998 {
999 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1000 }
1001
1002 }
1003 else
1004 {
1005 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
1006 }
1007 <!--Up-->
1008 @if (@type == "Subcategory")
1009 {
1010 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1011 }
1012 else if (@type == "Ruler")
1013 {
1014 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1015 }
1016 else if (@type == "Region")
1017 {
1018 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1019 }
1020 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
1021 {
1022 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1023 }
1024 else if (@type == "Mint")
1025 {
1026 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1027 }
1028 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
1029 {
1030 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1031 }
1032 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
1033 {
1034 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1035 }
1036 else
1037 {
1038 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1039 }
1040
1041 <!--Next-->
1042 @if (!string.IsNullOrWhiteSpace(@next))
1043 {
1044 if (@type == "Subcategory" && @Category == @Culture ||
1045 @type == "Authority" && @Culture != "Roman_Provincial" ||
1046 @type == "Authority" && @Culture != "Roman_Imperial")
1047 {
1048 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1049 }
1050 else
1051 {
1052 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1053 }
1054 }
1055 else
1056 {
1057 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
1058 }
1059 </div>
1060
1061 </div>
1062 <!--Description & Image-->
1063 <div class="col-md-12 row">
1064 <div class="col-md-8">
1065 <span class="font-normal">@entity.GetString("Entity_Description")</span>
1066 </div>
1067 <div class="col-md-4 text-center">
1068 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
1069 {
1070 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1071 }
1072 else
1073 {
1074 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1075 }
1076 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
1077 </div>
1078 <div class="col-md-12">
1079 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
1080 {
1081 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
1082 }
1083 </div>
1084 </div>
1085 <!--Action buttons-->
1086 <div class="col-md-12 btn-group-sm header-bar" align="center">
1087 @{
1088 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
1089
1090 }
1091
1092 <!--Filter-->
1093 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
1094 {
1095 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
1096 {
1097 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
1098 }
1099 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
1100 {
1101 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1102 }
1103 else
1104 {
1105 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1106 }
1107
1108 }
1109 else
1110 {
1111 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
1112 }
1113 <!--Add Coin-->
1114 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1115 {
1116 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
1117 }
1118 else
1119 {
1120 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
1121 }
1122 <!--Edit Entity-->
1123 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
1124 {
1125 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
1126 {
1127 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1128 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1129 }
1130 }
1131
1132 <!--Collection buttons -->
1133 @if (type == "Collection")
1134 {
1135 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1136 {
1137 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1138 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1139 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
1140 if (string.IsNullOrWhiteSpace(@Folder))
1141 {
1142 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
1143 }
1144 else
1145 {
1146 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
1147 }
1148 }
1149
1150 if (@SortBy == "CustomSortValue")
1151 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
1152 else
1153 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1154 if (@SortBy == "TitleSortValue")
1155 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
1156 else
1157 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1158
1159 }
1160 </div>
1161
1162 <!--OG data-->
1163 ogtitle = @title.Replace("_", " ");
1164 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
1165 ogimage = @entity.GetString("Entity_Image");
1166
1167 InfoRendered = true;
1168
1169 }
1170
1171 @* ------------------Mint info------------------ *@
1172 if (@entitytitles.Any(mints.Contains) && @type == "Mint")
1173 {
1174
1175 string[] coordinates;
1176 coordinates = @entity.GetString("Entity_Location").Split(':');
1177 string[] latarray = coordinates[1].Split(',');
1178 string[] longarray = coordinates[2].Split(',');
1179 lat = latarray[0];
1180 lng = longarray[0];
1181
1182 <!--Title-->
1183 <div class="col-md-12 header-bar">
1184 <span class="font-title">@mints[0]</span>
1185 <span class="font-description"> — A settlement in <span class="font-subtitle"><a href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'>@entity.GetString("Entity_Region").Replace("_", " ")</a></span></span>
1186 @if (@entitytitles.Length > 1)
1187 {
1188 <span class="font-description"> also known as </span>
1189 }
1190 @foreach (var titleElement in @entitytitles)
1191 {
1192 if (@titleElement != @mints[0])
1193 {
1194 <span class="font-subtitle">@titleElement</span>
1195 if (@titleElement == entitytitles.Last())
1196 {
1197 <span></span>
1198 }
1199 else
1200 {
1201 <span>-</span>
1202 }
1203 }
1204 }
1205
1206 <!--Navigation-->
1207 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
1208 <!--Previous-->
1209 @if (!string.IsNullOrWhiteSpace(@previous))
1210 {
1211 if (@type == "Subcategory" && @Category == @Culture ||
1212 @type == "Authority" && @Culture != "Roman_Provincial" ||
1213 @type == "Authority" && @Culture != "Roman_Imperial")
1214 {
1215 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1216 }
1217 else
1218 {
1219 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1220 }
1221
1222 }
1223 else
1224 {
1225 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
1226 }
1227 <!--Up-->
1228 @if (@type == "Subcategory")
1229 {
1230 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1231 }
1232 else if (@type == "Ruler")
1233 {
1234 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1235 }
1236 else if (@type == "Region")
1237 {
1238 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1239 }
1240 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
1241 {
1242 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1243 }
1244 else if (@type == "Mint")
1245 {
1246 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1247 }
1248 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
1249 {
1250 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1251 }
1252 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
1253 {
1254 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1255 }
1256 else
1257 {
1258 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1259 }
1260
1261 <!--Next-->
1262 @if (!string.IsNullOrWhiteSpace(@next))
1263 {
1264 if (@type == "Subcategory" && @Category == @Culture ||
1265 @type == "Authority" && @Culture != "Roman_Provincial" ||
1266 @type == "Authority" && @Culture != "Roman_Imperial")
1267 {
1268 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1269 }
1270 else
1271 {
1272 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1273 }
1274 }
1275 else
1276 {
1277 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
1278 }
1279 </div>
1280 </div>
1281
1282 <!--Description & Image-->
1283 <div class="col-md-12 row">
1284 <div class="col-md-8">
1285 <span class="font-normal">@entity.GetString("Entity_Description")</span>
1286 </div>
1287 <div class="col-md-4 text-center" id="googleMap" style="height:350px;"></div>
1288 <div class="col-md-12">
1289 <br>
1290 <span class="font-subtitle">Modern location:</span> <span class="font-description">@entity.GetString("Entity_Modern_Location")</span>
1291 </div>
1292 </div>
1293 <!--Action buttons-->
1294 <div class="col-md-12 btn-group-sm header-bar" align="center">
1295 @{
1296 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
1297
1298 }
1299
1300 <!--Filter-->
1301 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
1302 {
1303 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
1304 {
1305 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
1306 }
1307 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
1308 {
1309 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1310 }
1311 else
1312 {
1313 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1314 }
1315
1316 }
1317 else
1318 {
1319 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
1320 }
1321 <!--Add Coin-->
1322 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1323 {
1324 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
1325 }
1326 else
1327 {
1328 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
1329 }
1330 <!--Edit Entity-->
1331 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
1332 {
1333 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
1334 {
1335 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1336 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1337 }
1338 }
1339
1340 <!--Collection buttons -->
1341 @if (type == "Collection")
1342 {
1343 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1344 {
1345 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1346 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1347 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
1348 if (string.IsNullOrWhiteSpace(@Folder))
1349 {
1350 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
1351 }
1352 else
1353 {
1354 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
1355 }
1356 }
1357
1358 if (@SortBy == "CustomSortValue")
1359 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
1360 else
1361 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1362 if (@SortBy == "TitleSortValue")
1363 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
1364 else
1365 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1366
1367 }
1368 </div>
1369
1370 <!--OG data-->
1371 ogtitle = mints[0];
1372 ogdescription = entity.GetString("Entity_Description").Replace('"', ' ');
1373 ogimage = @entity.GetString("Entity_Image");
1374
1375 InfoRendered = true;
1376 }
1377 @* ------------------Metal info------------------ *@
1378 if (@title == @Metal && !string.IsNullOrWhiteSpace(@Metal) && string.IsNullOrWhiteSpace(@Denomination))
1379 {
1380 <!--Title & Navigation-->
1381 <div class="col-md-12 header-bar">
1382 <span class="font-title">@title.Replace("_", " ") Coinage</span>
1383 </div>
1384 <!--Description & Image-->
1385 <div class="col-md-12 row">
1386 <div class="col-md-8">
1387 <span class="font-normal">@entity.GetString("Entity_Description")</span>
1388 </div>
1389 <div class="col-md-4 text-center">
1390 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
1391 {
1392 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1393 }
1394 else
1395 {
1396 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1397 }
1398 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
1399 </div>
1400 <div class="col-md-12">
1401 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
1402 {
1403 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
1404 }
1405 </div>
1406 </div>
1407 <!--Action buttons-->
1408 <div class="col-md-12 btn-group-sm header-bar" align="center">
1409 @{
1410 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
1411
1412 }
1413
1414 <!--Filter-->
1415 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
1416 {
1417 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
1418 {
1419 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
1420 }
1421 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
1422 {
1423 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1424 }
1425 else
1426 {
1427 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1428 }
1429
1430 }
1431 else
1432 {
1433 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
1434 }
1435 <!--Add Coin-->
1436 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1437 {
1438 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
1439 }
1440 else
1441 {
1442 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
1443 }
1444 <!--Edit Entity-->
1445 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
1446 {
1447 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
1448 {
1449 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1450 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1451 }
1452 }
1453
1454 <!--Collection buttons -->
1455 @if (type == "Collection")
1456 {
1457 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1458 {
1459 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1460 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1461 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
1462 if (string.IsNullOrWhiteSpace(@Folder))
1463 {
1464 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
1465 }
1466 else
1467 {
1468 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
1469 }
1470 }
1471
1472 if (@SortBy == "CustomSortValue")
1473 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
1474 else
1475 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1476 if (@SortBy == "TitleSortValue")
1477 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
1478 else
1479 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1480
1481 }
1482 </div>
1483
1484 <!--OG data-->
1485 ogtitle = @title.Replace("_", " ") + " Coinage";
1486 ogdescription = entity.GetString("Entity_Description").Replace('"',' ');
1487 ogimage = @entity.GetString("Entity_Image");
1488
1489 InfoRendered = true;
1490 }
1491
1492
1493 <!--Folders-->
1494 if (@title == @Folder && entity.GetBoolean("Entity_IsFolder") == true && type == "Collection" && entity.GetString("Entity_OwnerID") == @BelongsToUser && entity.GetBoolean("Entity_IsDeleted") != true && InfoRendered == false)
1495 {
1496 <!--Title & Navigation-->
1497 <div class="col-md-12 header-bar">
1498 <span class="font-title">@title.Replace("_", " ")</span>
1499 <!--Navigation-->
1500 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
1501 <!--Previous-->
1502 @if (!string.IsNullOrWhiteSpace(@previous))
1503 {
1504 if (@type == "Subcategory" && @Category == @Culture ||
1505 @type == "Authority" && @Culture != "Roman_Provincial" ||
1506 @type == "Authority" && @Culture != "Roman_Imperial")
1507 {
1508 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1509 }
1510 else
1511 {
1512 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1513 }
1514
1515 }
1516 else
1517 {
1518 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
1519 }
1520 <!--Up-->
1521 @if (@type == "Subcategory")
1522 {
1523 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1524 }
1525 else if (@type == "Ruler")
1526 {
1527 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1528 }
1529 else if (@type == "Region")
1530 {
1531 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1532 }
1533 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
1534 {
1535 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1536 }
1537 else if (@type == "Mint")
1538 {
1539 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1540 }
1541 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
1542 {
1543 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1544 }
1545 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
1546 {
1547 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1548 }
1549 else
1550 {
1551 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1552 }
1553
1554 <!--Next-->
1555 @if (!string.IsNullOrWhiteSpace(@next))
1556 {
1557 if (@type == "Subcategory" && @Category == @Culture ||
1558 @type == "Authority" && @Culture != "Roman_Provincial" ||
1559 @type == "Authority" && @Culture != "Roman_Imperial")
1560 {
1561 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1562 }
1563 else
1564 {
1565 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1566 }
1567 }
1568 else
1569 {
1570 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
1571 }
1572 </div>
1573 </div>
1574 <!--Description & Image-->
1575 <div class="col-md-12 row">
1576 <div class="col-md-8">
1577 <span class="font-normal">@entity.GetString("Entity_Description")</span>
1578 </div>
1579 <div class="col-md-4 text-center">
1580 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
1581 {
1582 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1583 }
1584 else
1585 {
1586 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1587 }
1588 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
1589 </div>
1590 <div class="col-md-12">
1591 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
1592 {
1593 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
1594 }
1595 </div>
1596 </div>
1597 <!--Action buttons-->
1598 <div class="col-md-12 btn-group-sm header-bar" align="center">
1599 @{
1600 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
1601
1602 }
1603
1604 <!--Filter-->
1605 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
1606 {
1607 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
1608 {
1609 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
1610 }
1611 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
1612 {
1613 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1614 }
1615 else
1616 {
1617 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1618 }
1619
1620 }
1621 else
1622 {
1623 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
1624 }
1625 <!--Add Coin-->
1626 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1627 {
1628 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
1629 }
1630 else
1631 {
1632 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
1633 }
1634 <!--Edit Entity-->
1635 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
1636 {
1637 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
1638 {
1639 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1640 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1641 }
1642 }
1643
1644 <!--Collection buttons -->
1645 @if (type == "Collection")
1646 {
1647 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1648 {
1649 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1650 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1651 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
1652 if (string.IsNullOrWhiteSpace(@Folder))
1653 {
1654 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
1655 }
1656 else
1657 {
1658 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
1659 }
1660 }
1661
1662 if (@SortBy == "CustomSortValue")
1663 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
1664 else
1665 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1666 if (@SortBy == "TitleSortValue")
1667 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
1668 else
1669 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1670
1671 }
1672 </div>
1673
1674 <!--OG data-->
1675 ogtitle = @title.Replace("'","");
1676 ogdescription = entity.GetString("Entity_Description").Replace("<","");
1677 ogimage = @entity.GetString("Entity_Image");
1678
1679 InfoRendered = true;
1680 }
1681
1682 @* ------------------Render Collections------------------ *@
1683 if (type == "Collection" && @entity.GetString("Entity_OwnerID") == @BelongsToUser && entity.GetBoolean("Entity_IsFolder") != true && InfoRendered == false && string.IsNullOrWhiteSpace(Folder))
1684 {
1685 <!--Title-->
1686 <div class="col-md-12 header-bar">
1687 <span class="font-title">@title</span>
1688 <!--Navigation-->
1689 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
1690 <!--Previous-->
1691 @if (!string.IsNullOrWhiteSpace(@previous))
1692 {
1693 if (@type == "Subcategory" && @Category == @Culture ||
1694 @type == "Authority" && @Culture != "Roman_Provincial" ||
1695 @type == "Authority" && @Culture != "Roman_Imperial")
1696 {
1697 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous&Category=@Culture'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1698 }
1699 else
1700 {
1701 <a class="btn btn-light" title='@previous.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&@type=@previous'><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
1702 }
1703
1704 }
1705 else
1706 {
1707 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
1708 }
1709 <!--Up-->
1710 @if (@type == "Subcategory")
1711 {
1712 <a class="btn btn-light" title='@Culture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1713 }
1714 else if (@type == "Ruler")
1715 {
1716 <a class="btn btn-light" title='@subculture.Replace("_"," ")' href='/Default.aspx?ID=@RenderPID&Subcategory=@subculture&Category=@Culture'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1717 }
1718 else if (@type == "Region")
1719 {
1720 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&Zone=@entity.GetString("Entity_Zone")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1721 }
1722 else if (@type == "Zone" || @type == "Denomination" || @type == "Category")
1723 {
1724 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1725 }
1726 else if (@type == "Mint")
1727 {
1728 <a class="btn btn-light " href='/Default.aspx?ID=8&Region=@entity.GetString("Entity_Region")'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1729 }
1730 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1")
1731 {
1732 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1733 }
1734 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true)
1735 {
1736 <a class="btn btn-light " href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&SortBy=CustomSortValue'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1737 }
1738 else
1739 {
1740 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1741 }
1742
1743 <!--Next-->
1744 @if (!string.IsNullOrWhiteSpace(@next))
1745 {
1746 if (@type == "Subcategory" && @Category == @Culture ||
1747 @type == "Authority" && @Culture != "Roman_Provincial" ||
1748 @type == "Authority" && @Culture != "Roman_Imperial")
1749 {
1750 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next&Category=@Culture'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1751 }
1752 else
1753 {
1754 <a class="btn btn-light" title='@next.Replace("_", " ")' href='/Default.aspx?ID=@RenderPID&@type=@next'><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
1755 }
1756 }
1757 else
1758 {
1759 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
1760 }
1761 </div>
1762
1763 </div>
1764 <!--Description & Image-->
1765 <div class="col-md-12 row">
1766 <div class="col-md-8">
1767 <span class="font-normal">@entity.GetString("Entity_Description")</span>
1768 </div>
1769 <div class="col-md-4 text-center">
1770 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image")))
1771 {
1772 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='@entity.GetValue("Entity_Image")' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1773 }
1774 else
1775 {
1776 <div class="col-md-12"><img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/NoRulerBust.jpg' alt='@entity.GetString("Entity_Title").Replace("_"," ")'></div>
1777 }
1778 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span>
1779 </div>
1780 <div class="col-md-12">
1781 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet")))
1782 {
1783 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span>
1784 }
1785 </div>
1786 </div>
1787
1788 <!--Action buttons-->
1789 <div class="col-md-12 btn-group-sm header-bar" align="center">
1790 @{
1791 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
1792
1793 }
1794
1795 <!--Filter-->
1796 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")))
1797 {
1798 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser))
1799 {
1800 <a class="btn btn-light" title='Show only your coins' href='@GetGlobalValue("Global:Request.AbsoluteUri")&BelongsToUser=@user.ID&SortBy=CustomSortValue'><i class="fa fa-filter" aria-hidden="true"></i></a>
1801 }
1802 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser))
1803 {
1804 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1805 }
1806 else
1807 {
1808 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a>
1809 }
1810
1811 }
1812 else
1813 {
1814 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button>
1815 }
1816 <!--Add Coin-->
1817 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1818 {
1819 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button>
1820 }
1821 else
1822 {
1823 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>
1824 }
1825 <!--Edit Entity-->
1826 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null)
1827 {
1828 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection")
1829 {
1830 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1831 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit Image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1832 }
1833 }
1834
1835 <!--Collection buttons -->
1836 @if (type == "Collection")
1837 {
1838 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID"))
1839 {
1840 <a href='/Default.aspx?ID=1028&PID=252&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection description" class="btn btn-light"><i class="fas fa-edit fa-lg" aria-hidden="true"></i></a>
1841 <a href='/Default.aspx?ID=1104&PID=257&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")' title="Edit collection image" class="btn btn-light"><i class="fas fa-image fa-lg" aria-hidden="true"></i></a>
1842 <a class="btn btn-light" title="Print friendly version" href='@GetGlobalValue("Global:Pageview.Url")?print=1'><i class="fa fa-print" aria-hidden="true"></i></a>
1843 if (string.IsNullOrWhiteSpace(@Folder))
1844 {
1845 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a>
1846 }
1847 else
1848 {
1849 <a class="btn btn-light" title="Delete folder" href="/Default.aspx?ID=5672&PID=373&cmd=edit&itemID=Entity:@entity.GetString("PageItemId")"><i class="fa fa-trash" aria-hidden="true"></i></a>
1850 }
1851 }
1852
1853 if (@SortBy == "CustomSortValue")
1854 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light disabled active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> }
1855 else
1856 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=CustomSortValue' title="Sort by custom sort value" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1857 if (@SortBy == "TitleSortValue")
1858 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light disabled active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> }
1859 else
1860 {<a href='/Default.aspx?ID=@RenderPID&@UrlParameters[1]&Sortby=TitleSortValue' title="Sort alphabetically" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>}
1861
1862 }
1863 </div>
1864 <!--Subfolders-->
1865
1866 <div id="collapse1" class="collapse card-deck">
1867 @foreach (var jsonentity in AllEntitiesJSON)
1868 {
1869
1870 if (jsonentity.IsFolder == "true" && jsonentity.OwnerID == BelongsToUser && jsonentity.IsDeleted != "true")
1871 {
1872 var absolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + jsonentity.Image);
1873
1874 <a href="Default.aspx?ID=@RenderPID&@UrlParameters[1]&Folder=@jsonentity.Title">
1875 <div class="folder-item card text-center">
1876 @if (System.IO.File.Exists(absolutePath))
1877 {
1878 <img class="card-img-top" style="padding:5px;" src="@jsonentity.Image" alt="@jsonentity.Title">
1879 }
1880 else
1881 {
1882 <img class="card-img-top" style="padding:5px;background:white;" src="/Files/Images/folder.png" alt="@jsonentity.Title">
1883 }
1884
1885 <div class="card-footer font-coin-title">@jsonentity.Title.Replace("_", " ")</div>
1886 </div>
1887 </a>
1888 HasSubfolders = true;
1889
1890 }
1891 }
1892 </div>
1893 if (HasSubfolders)
1894 {
1895 <div class="col-md-12 text-center">
1896 <a data-toggle="collapse" href="#collapse1" title="Show folders"><i class="fas fa-folder-open fa-2x"></i></a>
1897 </div>
1898 }
1899
1900 <!--OG data-->
1901 ogtitle = @title.Replace('"',' ');
1902 ogdescription = entity.GetString("Entity_ShortDescription");
1903 ogimage = @entity.GetString("Entity_Image");
1904
1905 InfoRendered = true;
1906 }
1907
1908
1909 }
1910
1911 @* STATIC HEADERS *@
1912
1913
1914
1915
1916 @* ------------------Recent additions------------------ *@
1917 @if (InfoRendered == false && @GetGlobalValue("Global:Page.ID") == "1067")
1918 {
1919 <div class="col-md-12 header-bar">
1920 <span class="font-title">Recently Added</span>
1921 </div>
1922 <div class="col-md-12 row">
1923 <div class="col-md-8">
1924 <span class="font-normal">
1925 Below, you will find a list of the <b>50 most recentely added or updated coins</b> in the database.<br><br>
1926 You can use the <b>filter</b> to quickly find something specific - a particular <b>ruler</b>, <b>denomination</b>, or <b>legend</b> - or you can click on any of the <b>properties</b> shown for a coin in order to view all coins which share that property.<br><br>
1927 Click on the <b>coin image</b> to see a more in-depth description of that particular coin (if available).<br><br>
1928 Enjoy!
1929 </span>
1930 <br>
1931 </div>
1932 <div class="col-md-4 text-center">
1933 <img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/CoinDB/Stag.JPG' alt="Recent additions">
1934 </div>
1935 </div>
1936 InfoRendered = true;
1937 }
1938
1939
1940 @* ------------------ Collection List------------------ *@
1941 @if (InfoRendered == false && @GetGlobalValue("Global:Page.ID") == "1095")
1942 {
1943 <!--Title-->
1944 <div class="col-md-12 header-bar">
1945 <span class="font-title">Collections</span>
1946 </div>
1947 <!--Description and Image section-->
1948 <div class="col-md-12 row">
1949 <div class="col-md-8">
1950 <span class="font-normal">
1951 Below, you will find a list of the <b>public collections</b> hosted on this website. You can use the filter to search for a particular <b>collection</b>, <b>focus</b>, or parts of a <b>description</b>.
1952 <br><br>
1953 Hosting a collection here is totally free - although we do appreciate any donations which may help cover the hosting costs. To create a collection <b><a href="/Default.aspx?ID=64">register an account</a></b> and follow the instructions on screen.
1954 <br /><br />
1955 Enjoy!
1956 </span>
1957 </div>
1958 <div class="col-md-4">
1959 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/LiciniusII.JPG' alt="Collections list">
1960 </div>
1961 </div>
1962 InfoRendered = true;
1963 }
1964
1965
1966 <!-- "Collections" with no collection entity -->
1967 @if (InfoRendered == false && !string.IsNullOrWhiteSpace(BelongsToUser) && GetGlobalValue("Global:Extranet.UserID") == BelongsToUser)
1968 {
1969 <!--Title-->
1970 <div class="col-md-12 header-bar">
1971 <span class="font-title">No Collection</span>
1972 <!--Navigation-->
1973 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px">
1974 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button>
1975 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
1976 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
1977 </div>
1978 </div>
1979 <!--Description and Image-->
1980 <div class="col-md-12 row">
1981 <div class="col-md-8">
1982 <span class="font-normal">
1983 Normally, this is where you - and other users - would see <b>information about your collection</b>; a description, a collection image, and so on. But you don't have
1984 a collection yet - either because you don't want to have a public collection on the website, or perhaps because you haven't created one yet.
1985 <br /><br />
1986 <div align="center">
1987 <button class="btn btn-primary text-center" data-toggle="modal" data-target="#CreateCollection">Create a collection</button>
1988 </div>
1989 </span>
1990 </div>
1991 <div class="col-md-4">
1992 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/LiciniusII.JPG' alt="Collections list">
1993 </div>
1994 </div>
1995
1996
1997
1998 InfoRendered = true;
1999 }
2000
2001 @* ------------------Properties with no description------------------ *@
2002 @if (InfoRendered == false && @print != "1")
2003 {
2004 <div class="col-md-12 header-bar">
2005 <span class="font-title">No description yet </span>
2006 </div>
2007 <div class="col-md-12 row" style="padding-top:5px">
2008 <div class="col-md-8">
2009 <span class="font-normal">
2010 Ok, so for some reason this ruler, mint, denomination or collection does not have a description yet - oops!<br>
2011 There are two possible explanations for this:<br><br>
2012 <li type="circle" style="padding-left:50px;">No description has been <b>written</b> yet</li>
2013 <li type="circle" style="padding-left:50px;">The property is <b>incorrectly named</b></li>
2014 <br>
2015 If the former, <b>patience is key</b> - this site covers thousands of entities, and all must have a manually created description written.
2016 <br><br>
2017 If the latter, try <b>renaming the property</b> - 'Domitian as Caesar' has no description, but 'Domitian' does.
2018 </span>
2019 <br>
2020 </div>
2021 <div class="col-md-4">
2022 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/CollectionImage.JPG' alt="Undescribed property">
2023 </div>
2024 </div>
2025 InfoRendered = true;
2026 }
2027
2028
2029 @SnippetStart("OGData")
2030 <meta property="og:title" content="@ogtitle">
2031 <meta property="og:description" content="@ogdescription">
2032 <meta property="og:image" content="@ogimage">
2033 @SnippetEnd("OGData")
2034
2035 <div></div>
2036
2037 <script type="text/javascript">
2038 var coors = { "lat" : "@lat" , "long" : "@lng" };
2039
2040 function MakeControl(controlDiv, label) {
2041
2042 // Set up the control border.
2043 var controlUI = document.createElement('div');
2044 controlUI.title = label;
2045 controlUI.className = 'controlUI';
2046 controlDiv.appendChild(controlUI);
2047
2048 // Set up the inner control.
2049 var controlText = document.createElement('div');
2050 controlText.innerHTML = label;
2051 controlText.className = 'controlText';
2052 controlUI.appendChild(controlText);
2053 }
2054 function myMap() {
2055 var myCenter = new google.maps.LatLng(coors.lat, coors.long);
2056 var impMapType = new google.maps.ImageMapType({
2057 getTileUrl: function(coord, zoom) {
2058 return "http://dh.gu.se/tiles/imperium/" + zoom + "/" + coord.x + "/" + coord .y + ".png";
2059 },
2060 tileSize: new google.maps.Size(256, 256),
2061 isPng: true,
2062 alt: "Imperium Romanum",
2063 name: "Imperium",
2064 minZoom: 3,
2065 maxZoom: 11,
2066 overviewMapControl: true
2067 });
2068 var mapOptions = {
2069 disableDefaultUI: true,
2070 zoomControl: true,
2071 scaleControl: true,
2072 zoomControlOptions: {
2073 style: google.maps.ZoomControlStyle.SMALL
2074 },
2075 zoom: 5,
2076 center: myCenter,
2077 mapTypeId: 'IMP'
2078 };
2079
2080 var map = new google.maps.Map(document.getElementById("googleMap"),mapOptions);
2081 map.mapTypes.set('IMP',impMapType);
2082 map.setMapTypeId('IMP');
2083
2084 var marker = new google.maps.Marker({position:myCenter});
2085 marker.setMap(map);
2086
2087 var controlText = ['© Digital Atlas of the Roman Empire, <a href="https://dare.ht.lu.se/">DARE.</a>', google.maps.ControlPosition.TOP_RIGHT];
2088
2089 var divLabel = controlText[0];
2090 var divName = document.createElement('div');
2091 var newDiv = new MakeControl(divName, divLabel);
2092 map.controls[controlText[1]].push(divName);
2093 }
2094 google.maps.event.addDomListener(window, 'load', initialize);
2095 </script>
2096
2097 <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCji0zZMaMM402NbsQe0Ln9h7BbIo8BuOo&callback=myMap"></script>
2098
2099
2100 <script>
2101 // Copy to clipboard example
2102 document.querySelector("#copy-button").onclick = function () {
2103 // Select the content
2104 document.querySelector("#copy-input").select();
2105 // Copy to the clipboard
2106 document.execCommand('copy');
2107 };
2108 </script>
2109
Error executing template "QueryPublisher/Coins.cshtml"
System.IO.IOException: The process cannot access the file 'd:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\Designs\Blogtheme\json\AllEntitiesTest.json' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at CompiledRazorTemplates.Dynamic.RazorEngine_3cb9bd4da1394c53855a35cda46ce5b2.Execute() in d:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\QueryPublisher\Coins.cshtml:line 70
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using System.Web
2 @using System.Net;
3 @using Newtonsoft.Json;
4 @using Newtonsoft.Json.Linq;
5
6 @functions {
7 public class RootObject
8 {
9 public string tableName { get; set; }
10 public List<Entity> entityList { get; set; }
11 }
12
13 public class Entity
14 {
15 public string Id { get; set; }
16 public int Sort { get; set; }
17 public string ItemInstanceType { get; set; }
18 public string Title { get; set; }
19 public string Type { get; set; }
20 public string Description { get; set; }
21 public string Image { get; set; }
22 public string Culture { get; set; }
23 public string Greek_Subcultures { get; set; }
24 public string Roman_Republican_Subcultures { get; set; }
25 public string Roman_Imperial_Subcultures { get; set; }
26 public string Celtic_Subcultures { get; set; }
27 public string Roman_Provincial_Subcultures { get; set; }
28 public string Islamic_Subcultures { get; set; }
29 public string Eastern_Subcultures { get; set; }
30 public string European_Medieval_Subcultures { get; set; }
31 public string Indian_Subcultures { get; set; }
32 public string Byzantine_Subcultures { get; set; }
33 public string Phoenician_Subcultures { get; set; }
34 public string Chinese_Subcultures { get; set; }
35 public string Zone { get; set; }
36 public string Region { get; set; }
37 public string Location { get; set; }
38 public string Modern_Location { get; set; }
39 public string Ruler_Title { get; set; }
40 public string Ruler_Title_English { get; set; }
41 public string Epithet { get; set; }
42 public string EpithetEnglish { get; set; }
43 public string Domain { get; set; }
44 public string Doman_English { get; set; }
45 public string StartOf_Rule { get; set; }
46 public string EndOf_Rule { get; set; }
47 public string OwnerID { get; set; }
48 public string OwnerName { get; set; }
49 public string ShortDescription { get; set; }
50 public string Focus { get; set; }
51 public string IsPatron { get; set; }
52 public string IsFolder { get; set; }
53 public string IsDeleted { get; set; }
54 public string MetalsList { get; set; }
55 public string MintedByList { get; set; }
56 public string IncludeInMenu { get; set; }
57 public string NameReadable { get; set; }
58 public string PreviousText { get; set; }
59 public string NextText { get; set; }
60 public string RelevantPageID { get; set; }
61 public string RelevantParagraphID { get; set; }
62 public string RelevantAreaID { get; set; }
63 }
64
65 }
66
67
68 @{
69
70 string AllEntitiesRaw = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Blogtheme/json/AllEntitiesTest.json"));
71 int AllEntitiesRawLength = AllEntitiesRaw.Length;
72
73 var AllEntitiesJSON = JsonConvert.DeserializeObject<List<Entity>>(@AllEntitiesRaw.Substring(49, @AllEntitiesRawLength - 55));
74
75
76 string[] stringSeparators = new string[] { ", ", " and ", "|", "," };
77
78 char[] charsToTrim = { '?' };
79
80 int Count = 0;
81 int CoinsInAlbum = 1;
82
83 string PID = "8"; @* Where to send links *@
84
85 string userid = @GetGlobalValue("Global:Extranet.UserID");
86
87 string print = System.Web.HttpContext.Current.Request.QueryString["print"];
88
89 }
90
91 @if (@GetInteger("QueryResult.Count") < 1)
92 {
93 <div align="center" class="font-description">No coins matching the search term(s)</div>
94 }
95
96
97 <!--Search bar -->
98
99 @if (@GetInteger("QueryResult.Count") > 0 && @print != "1")
100 {
101 <div class="input-group input-group-lg" id="filteringGroup" style="padding-left:10px;padding-right:10px;">
102 <input class="form-control" type="text" id="inputFilter" placeholder="Type here to filter...">
103 <span class="input-group-btn" id="buttonReset"><button class="btn btn-default brn-primary">X</button></span>
104 </div>
105 }
106
107 <div id="coin-items-list" class="row card-deck">
108
109
110
111 @foreach (var coin in GetLoop("QueryResultItem"))
112 {
113 if (@coin.GetBoolean("Coin2_IsDeleted") != true && @coin.GetString("PageItemType") != "Entity")
114 {
115
116 string title = @coin.GetString("Coin2_Title");
117 string[] titles = @title.Split(stringSeparators, StringSplitOptions.None);
118
119 string Mint = @coin.GetString("Coin2_Mint");
120 string[] mints = @Mint.Split(stringSeparators, StringSplitOptions.None);
121 string region = @coin.GetString("Coin2_Region");
122 string zone = @coin.GetString("Coin2_Zone");
123 string year = coin.GetString("Coin2_Year");
124
125 string Denomination = @coin.GetString("Coin2_Denomination");
126 string[] denominations = @Denomination.Split(stringSeparators, StringSplitOptions.None);
127
128 string obverse = @coin.GetString("Coin2_Obverse_Legend");
129 string reverse = @coin.GetString("Coin2_Reverse_Legend");
130 string references = @coin.GetString("Coin2_References");
131 string metal = @coin.GetString("Coin2_Metal");
132
133
134 string category = @coin.GetString("Coin2_Category");
135 string subcategorytype = "Coin2_" + @category + "Subcategory";
136 string subcategory = @coin.GetString(@subcategorytype);
137
138 int sortvalue = @coin.GetInteger("Coin2_CustomSort");
139 string ownerid = @coin.GetString("Coin2_BelongsToUser");
140
141 string tab1 = "tab1" + coin.GetString("PageItemId");
142 string tab2 = "tab2" + coin.GetString("PageItemId");
143 string tab3 = "tab3" + coin.GetString("PageItemId");
144 string tab4 = "tab4" + coin.GetString("PageItemId");
145
146 <div class="card mb-4 coin-item bg-light">
147 <!--Header-->
148
149 <div class="card-header font-coin-title coin-item-info">
150 (@CoinsInAlbum)
151 @foreach (var titleElement in @titles)
152 {
153 bool TitleRendered = false;
154 foreach (var entity in AllEntitiesJSON)
155 {
156 string[] entityTitles;
157 string rawTitles = entity.Title;
158 entityTitles = rawTitles.Split(stringSeparators, StringSplitOptions.None);
159
160 if (@entityTitles[0] == @titleElement && @entity.Type == "Subcategory" && @entity.Culture == @category)
161 {
162 <a href='/Default.aspx?ID=@PID&@entity.Type=@titleElement.Replace(' ','_')&Category=@entity.Culture'> @titleElement</a>
163 TitleRendered = true;
164 }
165 else if (@entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Roman_Republican_Subcultures == @subcategory ||
166 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Roman_Imperial_Subcultures == @subcategory ||
167 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Celtic_Subcultures == @subcategory ||
168 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Roman_Provincial_Subcultures == @subcategory ||
169 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Islamic_Subcultures == @subcategory ||
170 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Eastern_Subcultures == @subcategory ||
171 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.European_Medieval_Subcultures == @subcategory ||
172 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Indian_Subcultures == @subcategory ||
173 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Byzantine_Subcultures == @subcategory ||
174 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Phoenician_Subcultures == @subcategory ||
175 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Chinese_Subcultures == @subcategory ||
176 entityTitles[0] == @titleElement && @entity.Type == "Ruler" && @entity.Culture != "Roman_Imperial" && @entity.Title != "Anonymous" && @entity.Greek_Subcultures == @subcategory)
177 {
178 <a href='/Default.aspx?ID=@PID&@entity.Type=@titleElement&Category=@entity.Culture'> @titleElement</a>
179 TitleRendered = true;
180 }
181 else if (@entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Roman_Republican_Subcultures == @subcategory ||
182 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Roman_Imperial_Subcultures == @subcategory ||
183 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Celtic_Subcultures == @subcategory ||
184 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Roman_Provincial_Subcultures == @subcategory ||
185 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Islamic_Subcultures == @subcategory ||
186 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Eastern_Subcultures == @subcategory ||
187 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.European_Medieval_Subcultures == @subcategory ||
188 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Indian_Subcultures == @subcategory ||
189 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Byzantine_Subcultures == @subcategory ||
190 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Phoenician_Subcultures == @subcategory ||
191 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Chinese_Subcultures == @subcategory ||
192 @entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Greek_Subcultures == @subcategory)
193
194 {
195 <a href='/Default.aspx?ID=@PID&@entity.Type=@titleElement'> @titleElement</a>
196 TitleRendered = true;
197 }
198 else if (@entityTitles.Contains(@titleElement.TrimEnd(charsToTrim)) && @entity.Type == "Mint")
199 {
200 <a href="/Default.aspx?ID=@PID&Mint=@entity.Title">@titleElement</a>
201 TitleRendered = true;
202 }
203 else if (@entityTitles[0] == @titleElement && @entity.Type != "Subcategory" && @entity.Type != "Ruler" && @entity.Type != "Collection")
204 {
205 <a href='/Default.aspx?ID=@PID&@entity.Type=@titleElement'> @titleElement</a>
206 TitleRendered = true;
207 }
208 }
209 if (TitleRendered == false)
210 {
211 <text>@titleElement</text>
212 }
213 if (@titleElement == titles.Last())
214 {
215 <span></span>
216 }
217 else
218 {
219 <span>|</span>
220 }
221 }
222
223 </div>
224 <!--Image-->
225 <a href='/Default.aspx?ID=@coin.GetString("PageIdString")'><img class="card-img-top" src='@coin.GetValue("Coin2_Image")' alt='@coin.GetValue("Coin2_Image")'></a>
226 <!--Coin summary-->
227 <div class="coin-summary-block text-center">
228 <span class="coin-item-info font-coin-subtitle">
229 An
230 <a href="//Default.aspx?ID=@PID&Metal=@metal">@metal.Replace("_", " ")</a>
231 @if (@Denomination.Length > 1)
232 {
233 foreach (var denominationElement in @denominations)
234 {
235 bool DenominationRendered = false;
236 foreach (var entity in AllEntitiesJSON)
237 {
238 string[] entityTitles;
239 string rawTitles = entity.Title;
240 entityTitles = rawTitles.Split(stringSeparators, StringSplitOptions.None);
241
242 if (@entityTitles.Contains(@denominationElement.TrimEnd(charsToTrim)) && @entity.Type == "Denomination")
243 {
244 <a href='/Default.aspx?ID=@PID&@entity.Type=@entity.Title'>@denominationElement</a>
245 DenominationRendered = true;
246 }
247 }
248 if (DenominationRendered == false)
249 {
250 <text>@denominationElement</text>
251 }
252 if (@denominationElement == denominations.Last())
253 {
254 <span></span>
255 }
256 else
257 {
258 <span>|</span>
259 }
260 }
261 }
262 else
263 {
264 <span>unit</span>
265 }
266
267 struck @if (!string.IsNullOrWhiteSpace(@coin.GetString("Coin2_Year")))
268 {
269 <span>@coin.GetString("Coin2_Year")</span>
270 }
271 else
272 {
273 <span>an unknown year</span>
274 } in
275
276 @if (@Mint.Length > 1)
277 {
278 foreach (var mintElement in @mints)
279 {
280 bool MintRendered = false;
281 foreach (var entity in AllEntitiesJSON)
282 {
283 string[] entityTitles;
284 string rawTitles = entity.Title;
285 entityTitles = rawTitles.Split(stringSeparators, StringSplitOptions.None);
286
287 if (@entityTitles.Contains(@mintElement.TrimEnd(charsToTrim)) && @entity.Type == "Mint")
288 {
289 <span class="coin-item-info "><a href="/Default.aspx?ID=@PID&Mint=@entity.Title">@mintElement</a></span>
290 MintRendered = true;
291 }
292 else if (@entityTitles.Contains(@mintElement.TrimEnd(charsToTrim)) && @entity.Type == "Subcategory" && @entity.Culture == @category)
293 {
294 <span class="coin-item-info"><a href="/Default.aspx?ID=@PID&@entity.Type=@entity.Title&Category=@entity.Culture">@mintElement</a></span>
295 MintRendered = true;
296 }
297
298 }
299 if (MintRendered == false)
300 {
301 <span class="coin-item-info">@mintElement</span>
302 }
303 if (@mintElement == mints.Last())
304 {
305 <span></span>
306 }
307 else
308 {
309 <span style="">|</span>
310 }
311 }
312 }
313 else if (@region.Length > 1)
314 {
315 <span class="coin-item-info"><a href="/Default.aspx?ID=@PID&Region=@region">@region.Replace("_", " ")</a></span>
316 }
317 else if (@zone.Length > 1)
318 {
319 <span class="coin-item-info"><a href="/Default.aspx?ID=@PID&Zone=@zone">@zone.Replace("_", " ")</a></span>
320 }
321 else
322 {
323 <span class="coin-item-info">an unknown location</span>
324 }
325
326 </span>
327 </div>
328
329 <!--Tabs-->
330 <div class="card-header">
331
332 <ul class="nav nav-tabs card-header-tabs font-reference" id="tabs-list" role="tablist">
333 <li class="nav-item">
334 <a class="nav-link active" href="#@tab1" role="tab" aria-controls="description" aria-selected="true">Description</a>
335 </li>
336 <li class="nav-item">
337 <a class="nav-link" href="#@tab2" role="tab" aria-controls="history" aria-selected="false">Measurements</a>
338 </li>
339 <li class="nav-item">
340 <a class="nav-link" href="#@tab3" role="tab" aria-controls="deals" aria-selected="false">Notes </a>
341 </li>
342 <li class="nav-item">
343 <a class="nav-link" href="#@tab4" role="tab" aria-controls="deals" aria-selected="false">References</a>
344 </li>
345 </ul>
346 </div>
347 <!--Body-->
348 <div class="card-body">
349
350 <div class="tab-content">
351 <!--Tab 1 Description-->
352 <div class="tab-pane active" id="@tab1" role="tabpanel">
353 <div class="card-text ">
354 <span class="font-coin-subtitle">Obverse:</span> <span class="font-coin-description coin-item-info">@obverse</span><br />
355 </div>
356 <p class="card-text">
357 <span class="font-coin-subtitle">Reverse:</span> <span class="font-coin-description coin-item-info">@reverse</span><br />
358 </p>
359 </div>
360 <!--Tab 2 Measurements-->
361 <div class="tab-pane" id="@tab2" role="tabpanel">
362 <!--Diameter-->
363 <span class="font-coin-subtitle">Diameter: </span>
364 @if (!string.IsNullOrWhiteSpace(@coin.GetString("Coin2_Diameter")))
365 {
366 <span class="font-coin-description">@coin.GetString("Coin2_Diameter") mm</span>
367 }
368 else
369 {
370 <span>-</span>
371 }
372 <br />
373 <!--Die Orientation-->
374 <span class="font-coin-subtitle">Die Orientation: </span>
375 @if (!string.IsNullOrWhiteSpace(@coin.GetString("Coin2_DieOrientation")))
376 {
377 <span class="font-coin-description">@coin.GetString("Coin2_DieOrientation") H</span>
378 }
379 else
380 {
381 <span>-</span>
382 }
383 <br />
384 <!--Weight-->
385 <span class="font-coin-subtitle">Weight: </span>
386 @if (!string.IsNullOrWhiteSpace(@coin.GetString("Coin2_Weight")))
387 {
388 <span class="font-coin-description">@coin.GetString("Coin2_Weight") g</span>
389 }
390 else
391 {
392 <span>-</span>
393 }
394 <br />
395 <!--Custom Sort-->
396 @if (@userid == @ownerid && @GetGlobalValue("Global:Page.ID") == "908")
397 {
398 <span class="font-coin-subtitle">Custom sort value:</span><span class="font-coin-description">@sortvalue</span>
399 }
400 </div>
401 <!--Tab 3 Notes-->
402 <div class="tab-pane font-coin-description" id="@tab3" role="tabpanel">
403 @if (!string.IsNullOrWhiteSpace(@coin.GetString("Coin2_Description")))
404 {
405 @coin.GetString("Coin2_Description")
406 }
407 else
408 {
409 <div class="text-center">No notes for this coin</div>
410 }
411 </div>
412 <!--Tab 4 References-->
413 <div class="tab-pane" id="@tab4" role="tabpanel">
414
415 @if (@references.Length > 0)
416 {
417 <span class="coin-item-info font-coin-description">@references</span>
418 }
419 else if (@references.Length < 1)
420 {
421 <div class="font-coin-description text-center">No references provided for this coin</div>
422 }
423
424 </div>
425 </div>
426
427 </div>
428 <div class="card-footer">
429 @if (ownerid == userid)
430 {<span><i title="Your coin" class="fa fa-user-circle"></i></span>}
431 <small class="text-muted">
432 @if (!string.IsNullOrWhiteSpace(@category))
433 {
434 <span class="coin-item-info font-category-small">
435 <a href="/Default.aspx?ID=@PID&Category=@category">@category.Replace("_", " ")</a> @if (!string.IsNullOrWhiteSpace(@subcategory))
436 {<a href="/Default.aspx?ID=@PID&Subcategory=@subcategory&Category=@category">(@subcategory.Replace("_", " "))</a>}
437 </span>
438 }
439 else
440 {
441 <span class="coin-item-info font-category-small">Uncategorized</span>
442 }
443 </small>
444 </div>
445 </div>
446
447 <!-- Counts & Breaks-->
448 CoinsInAlbum = CoinsInAlbum + 1;
449 Count++;
450
451
452
453 }
454 }
455
456
457
458 </div>
459
460 <script type="text/javascript" src="/Files/Templates/Designs/BlogTheme/js/CoinFilter.js"></script>
461 <script>
462 $('#tabs-list a').on('click', function (e) {
463 e.preventDefault()
464 $(this).tab('show')
465 })
466 </script>
467
468 @if (@print == "1")
469 {
470 <body onload="window.print()">
471 </body>
472 }
Error executing template "ItemCreator/Create/CreateCoin.cshtml"
System.IO.IOException: The process cannot access the file 'd:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\Designs\Blogtheme\json\AllEntitiesTest.json' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at CompiledRazorTemplates.Dynamic.RazorEngine_15f55a1b2a0c4e0e8144decd4f9f0776.Execute() in d:\dynamicweb.net\Solutions\Dynamicweb\cboll.net.dynamicweb-cms.com\Files\Templates\ItemCreator\Create\CreateCoin.cshtml:line 69
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using System.Web;
2 @using System.Net;
3 @using Newtonsoft.Json;
4 @using Newtonsoft.Json.Linq;
5
6 @functions {
7 public class RootObject
8 {
9 public string tableName { get; set; }
10 public List<Entity> entityList { get; set; }
11 }
12
13 public class Entity
14 {
15 public string Id { get; set; }
16 public int Sort { get; set; }
17 public string ItemInstanceType { get; set; }
18 public string Title { get; set; }
19 public string Type { get; set; }
20 public string Description { get; set; }
21 public string Image { get; set; }
22 public string Culture { get; set; }
23 public string Greek_Subcultures { get; set; }
24 public string Roman_Republican_Subcultures { get; set; }
25 public string Roman_Imperial_Subcultures { get; set; }
26 public string Celtic_Subcultures { get; set; }
27 public string Roman_Provincial_Subcultures { get; set; }
28 public string Islamic_Subcultures { get; set; }
29 public string Eastern_Subcultures { get; set; }
30 public string European_Medieval_Subcultures { get; set; }
31 public string Indian_Subcultures { get; set; }
32 public string Byzantine_Subcultures { get; set; }
33 public string Phoenician_Subcultures { get; set; }
34 public string Chinese_Subcultures { get; set; }
35 public string Zone { get; set; }
36 public string Region { get; set; }
37 public string Location { get; set; }
38 public string Modern_Location { get; set; }
39 public string Ruler_Title { get; set; }
40 public string Ruler_Title_English { get; set; }
41 public string Epithet { get; set; }
42 public string EpithetEnglish { get; set; }
43 public string Domain { get; set; }
44 public string Doman_English { get; set; }
45 public string StartOf_Rule { get; set; }
46 public string EndOf_Rule { get; set; }
47 public string OwnerID { get; set; }
48 public string OwnerName { get; set; }
49 public string ShortDescription { get; set; }
50 public string Focus { get; set; }
51 public string IsPatron { get; set; }
52 public string IsFolder { get; set; }
53 public string IsDeleted { get; set; }
54 public string MetalsList { get; set; }
55 public string MintedByList { get; set; }
56 public string IncludeInMenu { get; set; }
57 public string NameReadable { get; set; }
58 public string PreviousText { get; set; }
59 public string NextText { get; set; }
60 public string RelevantPageID { get; set; }
61 public string RelevantParagraphID { get; set; }
62 public string RelevantAreaID { get; set; }
63 }
64
65 }
66
67
68 @{
69 string AllEntitiesRaw = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Blogtheme/json/AllEntitiesTest.json"));
70 int AllEntitiesRawLength = AllEntitiesRaw.Length;
71
72 var AllEntitiesJSON = JsonConvert.DeserializeObject<List<Entity>>(@AllEntitiesRaw.Substring(49, @AllEntitiesRawLength - 55));
73
74 var AllEntitiesSorted = AllEntitiesJSON.OrderBy(x => x.Title);
75
76 string today = DateTime.Now.ToString("yyyy-MM-dd");
77
78 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID")));
79
80 }
81
82 @if (user != null){
83 <div class="modal fade" id="NewCoinModal" tabindex="-1" role="dialog">
84 <div class="modal-dialog modal-lg" role="document">
85 <div class="modal-content">
86 @if (!string.IsNullOrWhiteSpace(user.Name))
87 {
88 @GetString("ItemCreator:Edit.Form.Begin")
89 <div class="modal-header">
90 <h5 class="modal-title" id="exampleModalLongTitle">Add a coin to your collection</h5>
91 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
92 <span aria-hidden="true">×</span>
93 </button>
94 </div>
95 <div class="modal-body">
96 <script src="/Admin/Content/JsLib/dw/ItemGroupVisibilityHandler.js" type="text/javascript"></script>
97 @* Title and Year *@
98
99 <div class="col-md-12 row" style="margin-top:10px;">
100 <label for="authority" class="font-subtitle col-md-3">Authority </label>
101 <input id="authority" type="text" class="col-md-9" name="Title" autocomplete="off" maxlength="50" value="" />
102 </div>
103
104 <div class="col-md-12 row" style="margin-top:10px;">
105 <label class="font-subtitle col-md-3">Year </label>
106 <input type="text" class="col-md-9" name="Year" autocomplete="off" maxlength="15" value="" />
107 </div>
108
109 @* Classification *@
110 <div class="col-md-12 row" id="Classification_fieldSet" style="margin-top:10px;">
111 <label class="font-subtitle col-md-3">Category</label>
112 <select class="col-md-9" id="Category" name="Category">
113 <option selected="selected" value="">Nothing selected</option>
114 @foreach (var entity in AllEntitiesSorted)
115 {
116 if (entity.Title == @GetString("ItemPublisher:Item.Category") && entity.Type == "Category")
117 {
118 <option selected="selected" value='@entity.Title'>@entity.Title.Replace("_", " ")</option>
119 }
120 else if (entity.Type == "Category")
121 {
122 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option>
123 }
124 }
125 </select>
126 </div>
127
128
129 <!--Subcategories-->
130 @foreach (var entity in AllEntitiesJSON)
131 {
132 if (entity.Type == "Category")
133 {
134 string fieldsetstring = entity.Title + "_fieldSet";
135 string selectstring = entity.Title + "Subcategory";
136 string tagstring = "ItemPublisher:Item." + selectstring;
137 <div id="@fieldsetstring">
138 <div class="col-md-12 row">
139 <label class="font-subtitle col-md-3">Subcategory</label>
140 <select class="col-md-9" id="@selectstring" name="@selectstring">
141 <option value="">Nothing selected</option>
142 @foreach (var subcategory in AllEntitiesJSON.OrderBy(x => x.Sort))
143 {
144 if (subcategory.Type == "Subcategory" && subcategory.Culture == entity.Title)
145 {
146 <option value='@subcategory.Title'>@subcategory.Title.Replace("_", " ")</option>
147 }
148 }
149 </select>
150 </div>
151
152 </div>
153 }
154 }
155
156 @* Image *@
157 <div class="col-md-12 row">
158 <label class="font-subtitle col-md-3">Image </label>
159 <div class="col-md-9">
160 <img class="img-fluid" id="blah" src="/Files/Images/Placeholder.png" alt="your image"> <img />
161 <input type='file' name='Image' accept='' id="imgInp" />
162 </div>
163 </div>
164 </div>
165 @* Obverse and Reverse *@
166
167 <div class="col-md-12 row">
168 <label class="font-subtitle col-md-3">Obverse </label>
169 <input type="text" class="col-md-9" name="Obverse_Legend" maxlength="255" value="" />
170 </div>
171
172 <div class="col-md-12 row">
173 <label class="font-subtitle col-md-3">Reverse </label>
174 <input type="text" class="col-md-9" name="Reverse_Legend" maxlength="255" value="" />
175 </div>
176
177 @* Metal *@
178 <div class="col-md-12 row">
179 <label class="font-subtitle col-md-3">Metal </label>
180 <select class="col-md-9" id="Metal" name="Metal">
181 <option selected="selected" value="">Nothing selected</option>
182
183 @foreach (var entity in AllEntitiesSorted)
184 {
185 if (entity.Type == "Metal")
186 {
187 string NameReadable = "(" + @entity.NameReadable + ")";
188 <option value='@entity.Title'>
189 @entity.Title.Replace("_", " ") @if (!string.IsNullOrWhiteSpace(@entity.NameReadable))
190 {@NameReadable}
191 </option>
192 }
193 }
194 </select>
195 </div>
196
197 @* Denomination *@
198 <div class="col-md-12 row">
199 <label class="font-subtitle col-md-3">Denomination</label>
200 <input id="denomination" type="text" class="col-md-9" name="Denomination" maxlength="255" value="" />
201 </div>
202
203 @* Zone *@
204 <div class="col-md-12 row">
205 <label class="font-subtitle col-md-3">Zone </label>
206 <select class="col-md-9" id="Zone" name="Zone">
207 <option selected="selected" value="">Nothing selected</option>
208 @foreach (var entity in AllEntitiesSorted)
209 {
210 if (entity.Type == "Zone")
211 {
212 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option>
213 }
214 }
215 </select>
216 </div>
217
218 @* Region *@
219 <div class="col-md-12 row">
220 <label class="font-subtitle col-md-3">Region </label>
221 <select class="col-md-9" id="Region" name="Region">
222 <option selected="selected" value="">Nothing selected</option>
223 @foreach (var entity in AllEntitiesSorted)
224 {
225 if (entity.Type == "Region" && entity.Zone != null)
226 {
227 <option data-ref='@entity.Zone' value='@entity.Title'>@entity.Title</option>
228 }
229 }
230 </select>
231 </div>
232
233 @* Mint *@
234 <div class="col-md-12 row">
235 <label class="font-subtitle col-md-3">Mint</label>
236 <input id="mint" class="std item-field col-md-9" maxlength="255" name="Mint" type="text" value="">
237 </div>
238
239
240
241 @* Notes *@
242 <div class="col-md-12 row">
243 <label class="font-subtitle col-md-3">Notes</label>
244 <textarea class="col-md-9" rows="8" id='Description' name='Description'> </textarea>
245 </div>
246
247 @* References *@
248 <div class="col-md-12 row ">
249 <label class="font-subtitle col-md-3">References</label>
250 <input type="text" class="col-md-9" name="References" maxlength="255" value="">
251 </div>
252
253
254
255
256 @* Measurements *@
257
258 <div class="col-md-12 row">
259 <label class="font-subtitle col-md-3">Weight </label>
260 <input class="col-md-9" name="Weight" type="number" value="" min="0" step="0.01">
261 </div>
262
263 <div class="col-md-12 row">
264 <label class="font-subtitle col-md-3">Diameter </label>
265 <input class="col-md-9" name="Diameter" type="number" value="" min="0" step="0.01">
266 </div>
267
268 <div class="col-md-12 row">
269 <label class="font-subtitle col-md-3">Die axis </label>
270 <input class="col-md-9" name="DieOrientation" type="number" min="0" max="12" value="">
271 </div>
272
273 @* Purchase Info fields *@
274
275 <div class="col-md-12 row">
276 <label class="font-subtitle col-md-3">Price</label>
277 <input class="std item-field col-md-9" maxlength="255" name="PurchasePrice" type="number" value="">
278 </div>
279
280 <div class="col-md-12 row">
281 <label class="font-subtitle col-md-3">Source</label>
282 <input class="std item-field col-md-9" maxlength="255" name="PurchaseSource" type="text" value="">
283 </div>
284
285 <div class="col-md-12 row">
286 <label class="font-subtitle col-md-3">Date</label>
287 <input class="item-field col-md-9" name="PurchaseDate" type="date" value="@today">
288 </div>
289
290 <!--Organisation-->
291 <div class="col-md-12 row">
292 <label class="font-subtitle col-md-3">Sort value</label>
293 <input class="std item-field col-md-9" maxlength="255" name="CustomSort" type="number" value="99999">
294 </div>
295 <div class="col-md-12 row">
296 <label class="font-subtitle col-md-3">Folder</label>
297 <select class="col-md-9" id="Folder" name="Folder">
298 <option selected="selected" value="">Nothing selected</option>
299 @foreach (var entity in AllEntitiesSorted)
300 {
301 if (entity.Type == "Collection" && entity.IsFolder == "true" && entity.OwnerID == user.ID.ToString())
302 {
303 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option>
304 }
305 }
306 </select>
307 </div>
308 <hr />
309 <div class="col-md-12 font-description">
310 <b>Please note:</b> Your coin will not be visible immediately - all content on this website must be indexed before it becomes visible. We index all content roughly <b>every 5 minutes</b>.
311 </div>
312
313
314 @* Hidden fields *@
315 <div>
316 <input class="item-field item-field-date" name="CreatedDate" type="hidden" value='@GetGlobalValue("Global:Server.Date")'>
317 <input class="std item-field form-control" maxlength="255" name="OwnerName" type="hidden" value='@GetGlobalValue("Global:Extranet.UserName")'>
318 <input class="std item-field form-control" maxlength="255" name="BelongsToUser" type="hidden" value='@GetGlobalValue("Global:Extranet.UserID")'>
319 </div>
320 <script type="text/javascript">
321 Dynamicweb.Items.GroupVisibilityRule.get_current().add({
322 "VisibilityRules": [{
323 "VisibilityField": "Category",
324 "VisibilityTargetGroup": "Roman_Imperial",
325 "VisibilityCondition": "0",
326 "VisibilityFieldType": "3",
327 "VisibilityConditionValue": "Roman_Imperial",
328 "Group": "Classification"
329 }, {
330 "VisibilityField": "Category",
331 "VisibilityTargetGroup": "Roman_Republican",
332 "VisibilityCondition": "0",
333 "VisibilityFieldType": "3",
334 "VisibilityConditionValue": "Roman_Republican",
335 "Group": "Classification"
336 }, {
337 "VisibilityField": "Category",
338 "VisibilityTargetGroup": "Greek",
339 "VisibilityCondition": "0",
340 "VisibilityFieldType": "3",
341 "VisibilityConditionValue": "Greek",
342 "Group": "Classification"
343 }, {
344 "VisibilityField": "Category",
345 "VisibilityTargetGroup": "Islamic",
346 "VisibilityCondition": "0",
347 "VisibilityFieldType": "3",
348 "VisibilityConditionValue": "Islamic",
349 "Group": "Classification"
350 }, {
351 "VisibilityField": "Category",
352 "VisibilityTargetGroup": "Eastern",
353 "VisibilityCondition": "0",
354 "VisibilityFieldType": "3",
355 "VisibilityConditionValue": "Eastern",
356 "Group": "Classification"
357 }, {
358 "VisibilityField": "Category",
359 "VisibilityTargetGroup": "Roman_Provincial",
360 "VisibilityCondition": "0",
361 "VisibilityFieldType": "3",
362 "VisibilityConditionValue": "Roman_Provincial",
363 "Group": "Classification"
364 }, {
365 "VisibilityField": "Category",
366 "VisibilityTargetGroup": "Byzantine",
367 "VisibilityCondition": "0",
368 "VisibilityFieldType": "3",
369 "VisibilityConditionValue": "Byzantine",
370 "Group": "Classification"
371 }, {
372 "VisibilityField": "Category",
373 "VisibilityTargetGroup": "European_Medieval",
374 "VisibilityCondition": "0",
375 "VisibilityFieldType": "3",
376 "VisibilityConditionValue": "European_Medieval",
377 "Group": "Classification"
378 }, {
379 "VisibilityField": "Category",
380 "VisibilityTargetGroup": "Phoenician",
381 "VisibilityCondition": "0",
382 "VisibilityFieldType": "3",
383 "VisibilityConditionValue": "Phoenician",
384 "Group": "Classification"
385 }, {
386 "VisibilityField": "Category",
387 "VisibilityTargetGroup": "Celtic",
388 "VisibilityCondition": "0",
389 "VisibilityFieldType": "3",
390 "VisibilityConditionValue": "Celtic",
391 "Group": "Classification"
392 }],
393 "Groups": [{
394 "GroupName": "General",
395 "IsVisible": true
396 }, {
397 "GroupName": "Classification",
398 "IsVisible": true
399 }, {
400 "GroupName": "Roman_Imperial",
401 "IsVisible": false
402 }, {
403 "GroupName": "Greek",
404 "IsVisible": false
405 }, {
406 "GroupName": "Islamic",
407 "IsVisible": false
408 }, {
409 "GroupName": "Chinese",
410 "IsVisible": false
411 }, {
412 "GroupName": "Roman_Provincial",
413 "IsVisible": false
414 }, {
415 "GroupName": "Indian",
416 "IsVisible": false
417 }, {
418 "GroupName": "Eastern",
419 "IsVisible": false
420 }, {
421 "GroupName": "Provincial",
422 "IsVisible": false
423 }, {
424 "GroupName": "Roman_Republican",
425 "IsVisible": false
426 }, {
427 "GroupName": "Celtic",
428 "IsVisible": false
429 }, {
430 "GroupName": "European_Medieval",
431 "IsVisible": false
432 }, {
433 "GroupName": "Byzantine",
434 "IsVisible": false
435 }, {
436 "GroupName": "Phoenician",
437 "IsVisible": false
438 }, {
439 "GroupName": "Relationships",
440 "IsVisible": true
441 }, {
442 "GroupName": "Measurements",
443 "IsVisible": true
444 }, {
445 "GroupName": "Trade",
446 "IsVisible": true
447 }, {
448 "GroupName": "Audit",
449 "IsVisible": true
450 }],
451 "Fields": [{
452 "Id": "Title",
453 "Group": "General"
454 }, {
455 "Id": "Image",
456 "Group": "General"
457 }, {
458 "Id": "Obverse_Legend",
459 "Group": "General"
460 }, {
461 "Id": "Reverse_Legend",
462 "Group": "General"
463 }, {
464 "Id": "Description",
465 "Group": "General"
466 }, {
467 "Id": "Year",
468 "Group": "General"
469 }, {
470 "Id": "Category",
471 "Group": "Classification"
472 }, {
473 "Id": "References",
474 "Group": "Classification"
475 }, {
476 "Id": "Roman_ImperialSubcategory",
477 "Group": "Roman_Classification"
478 }, {
479 "Id": "DenominationRoman",
480 "Group": "Roman_Classification"
481 }, {
482 "Id": "Mintmark",
483 "Group": "Roman_Classification"
484 }, {
485 "Id": "GreekSubcategory",
486 "Group": "Greek_Classification"
487 }, {
488 "Id": "DenominationGreek",
489 "Group": "Greek_Classification"
490 }, {
491 "Id": "IslamicSubcategory",
492 "Group": "Islamic_Classification"
493 }, {
494 "Id": "DenominationIslamic",
495 "Group": "Islamic_Classification"
496 }, {
497 "Id": "EasternSubcategory",
498 "Group": "Eastern_Classification"
499 }, {
500 "Id": "DenominationEastern",
501 "Group": "Eastern_Classification"
502 }, {
503 "Id": "BelongsToUser",
504 "Group": "Relationships"
505 }, {
506 "Id": "OwnerName",
507 "Group": "Relationships"
508 }, {
509 "Id": "Metal",
510 "Group": "Measurements"
511 }, {
512 "Id": "Weight",
513 "Group": "Measurements"
514 }, {
515 "Id": "Diameter",
516 "Group": "Measurements"
517 }, {
518 "Id": "DieOrientation",
519 "Group": "Measurements"
520 }, {
521 "Id": "PurchasePrice",
522 "Group": "Trade"
523 }, {
524 "Id": "PurchaseDate",
525 "Group": "Trade"
526 }, {
527 "Id": "PurchaseSource",
528 "Group": "Trade"
529 }, {
530 "Id": "Created",
531 "Group": "Audit"
532 }]
533 });
534 </script>
535 <div class="modal-footer">
536 <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
537 <button type="submit" class="btn btn-primary">Add</button>
538 </div>
539 @GetString("ItemCreator:Edit.Form.End")
540 }
541 </div>
542 </div>
543 </div>
544 }
545
546
547
548 <script>
549 @* This code creates dropdown menus with suggestions for three text fields *@
550
551
552 var authorities = {
553 url: "/Files/Templates/Designs/Blogtheme/json/authorities.txt",
554
555
556 getValue: "title",
557 adjustWidth: false,
558
559 list: {
560 match: { enabled: true }
561 },
562 template: {
563 type: "custom",
564 method: function(value, item) {
565 return value + "<text class='font-description-tiny'> – " + item.ruler_title + " of " + item.domain + " from " + item.from + " to " + item.to + "</text>";
566 }
567 }
568 };
569
570 var denominations = {
571 url: "/Files/Templates/Designs/Blogtheme/json/Denominations.txt",
572
573 getValue: "title",
574 adjustWidth: false,
575
576 list: {
577 match: { enabled: true }
578 },
579 template: {
580 type: "custom",
581 method: function (value, item) {
582 return item.title;
583 }
584 }
585 };
586
587
588 var mints = {
589 url: "/Files/Templates/Designs/Blogtheme/json/mints.txt",
590
591 getValue: "title",
592 adjustWidth: false,
593
594 list: {
595 match: { enabled: true }
596 },
597 template: {
598 type: "custom",
599 method: function(value, item) {
600 if (item.other_titles !== '') {
601 return value + "<text class='font-description-tiny'> " + "(" + item.other_titles + ")" + " - a settlement in " + item.region + "</text>";
602 } else {
603 return value + "<text class='font-description-tiny'> - a settlement in " + item.region + "</text>";
604 }
605 }
606 }
607 };
608
609 $("#authority").easyAutocomplete(authorities);
610 $("#denomination").easyAutocomplete(denominations);
611 $("#mint").easyAutocomplete(mints);
612
613 </script>
614
615
616 <script>
617 @* This code tries to set the value of a Zone based on the Region value *@
618
619 $(document).ready(function(){
620 $('#Region').change(function(){
621 $('#Zone').val($('#Region option:selected').data('ref'));
622 });
623
624 $('#Zone').change(function(){
625 $('#Region').val("");
626 });
627
628 });
629
630 </script>
631
632
633
634
635 <script>
636 @* This code shows a preview of the selected image file when adding images to a new coin *@
637
638 function readURL(input) {
639 if (input.files && input.files[0]) {
640 var reader = new FileReader();
641
642 reader.onload = function (e) {
643 $('#blah').attr('src', e.target.result);
644 }
645
646 reader.readAsDataURL(input.files[0]);
647 }
648 }
649
650 $("#imgInp").change(function(){
651 readURL(this);
652 });
653
654 </script>