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