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_2c9cb1b638f64178a51faefa128d2224.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"); 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"); 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"); 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"); 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"); 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"); 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"); 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"); 1678 ogimage = @entity.GetString("Entity_Image"); 1679 1680 InfoRendered = true; 1681 } 1682 1683 @* ------------------Render Your Collection info------------------ *@ 1684 //if (@GetGlobalValue("Global:Page.ID") == @RenderPIDCollection && @type == "Collection" && InfoRendered == false && @print != "1" && string.IsNullOrWhiteSpace(Folder)) 1685 //{ 1686 1687 <!--Title--> 1688 @*<div class="col-md-12 header-bar"> 1689 <span class="font-title">@title</span>*@ 1690 <!--Navigation--> 1691 @*<div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px"> 1692 <!--Previous--> 1693 @if (!string.IsNullOrWhiteSpace(@previous)) 1694 { 1695 if (@type == "Subcategory" && @Category == @Culture || 1696 @type == "Authority" && @Culture != "Roman_Provincial" || 1697 @type == "Authority" && @Culture != "Roman_Imperial") 1698 { 1699 <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> 1700 } 1701 else 1702 { 1703 <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> 1704 } 1705 1706 } 1707 else 1708 { 1709 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button> 1710 } 1711 <!--Up--> 1712 @if (@type == "Subcategory") 1713 { 1714 <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> 1715 } 1716 else if (@type == "Ruler") 1717 { 1718 <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> 1719 } 1720 else if (@type == "Region") 1721 { 1722 <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> 1723 } 1724 else if (@type == "Zone" || @type == "Denomination" || @type == "Category") 1725 { 1726 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1727 } 1728 else if (@type == "Mint") 1729 { 1730 <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> 1731 } 1732 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1") 1733 { 1734 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1735 } 1736 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true) 1737 { 1738 <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> 1739 } 1740 else 1741 { 1742 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1743 } 1744 1745 <!--Next--> 1746 @if (!string.IsNullOrWhiteSpace(@next)) 1747 { 1748 if (@type == "Subcategory" && @Category == @Culture || 1749 @type == "Authority" && @Culture != "Roman_Provincial" || 1750 @type == "Authority" && @Culture != "Roman_Imperial") 1751 { 1752 <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> 1753 } 1754 else 1755 { 1756 <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> 1757 } 1758 } 1759 else 1760 { 1761 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button> 1762 } 1763 </div>*@ 1764 1765 1766 @*</div>*@ 1767 <!--Description & Image--> 1768 @*<div class="col-md-12 row"> 1769 <div class="col-md-8"> 1770 <span class="font-normal">@entity.GetString("Entity_Description")</span> 1771 </div> 1772 <div class="col-md-4 text-center"> 1773 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image"))) 1774 { 1775 <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> 1776 } 1777 else 1778 { 1779 <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> 1780 } 1781 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span> 1782 </div> 1783 <div class="col-md-12"> 1784 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet"))) 1785 { 1786 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span> 1787 } 1788 </div> 1789 </div>*@ 1790 1791 1792 <!--Action buttons--> 1793 @*<div class="col-md-12 btn-group-sm header-bar" align="center"> 1794 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName"))) 1795 {<a class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus fa-lg" aria-hidden="true"></i></a> } 1796 else 1797 {<button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button>} 1798 <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> 1799 <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> 1800 <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> 1801 @if (@SortBy == "CustomSortValue") 1802 {<a href='/Default.aspx?ID=@RenderPIDCollection&Sortby=CustomSortValue' title="" class="btn btn-light active"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a> } 1803 else 1804 {<a href='/Default.aspx?ID=@RenderPIDCollection&Sortby=CustomSortValue' title="" class="btn btn-light"><i class="fas fa-sort-numeric-down fa-lg" aria-hidden="true"></i></a>} 1805 @if (@SortBy == "TitleSortValue") 1806 {<a href='/Default.aspx?ID=@RenderPIDCollection&Sortby=TitleSortValue' title="" class="btn btn-light active"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a> } 1807 else 1808 {<a href='/Default.aspx?ID=@RenderPIDCollection&Sortby=TitleSortValue' title="" class="btn btn-light"><i class="fas fa-sort-alpha-down fa-lg" aria-hidden="true"></i></a>} 1809 </div> 1810 1811 1812 InfoRendered = true; 1813 }*@ 1814 @* ------------------Render Collections------------------ *@ 1815 if (type == "Collection" && @entity.GetString("Entity_OwnerID") == @BelongsToUser && entity.GetBoolean("Entity_IsFolder") != true && InfoRendered == false && string.IsNullOrWhiteSpace(Folder)) 1816 { 1817 <!--Title--> 1818 <div class="col-md-12 header-bar"> 1819 <span class="font-title">@title</span> 1820 <!--Navigation--> 1821 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px"> 1822 <!--Previous--> 1823 @if (!string.IsNullOrWhiteSpace(@previous)) 1824 { 1825 if (@type == "Subcategory" && @Category == @Culture || 1826 @type == "Authority" && @Culture != "Roman_Provincial" || 1827 @type == "Authority" && @Culture != "Roman_Imperial") 1828 { 1829 <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> 1830 } 1831 else 1832 { 1833 <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> 1834 } 1835 1836 } 1837 else 1838 { 1839 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button> 1840 } 1841 <!--Up--> 1842 @if (@type == "Subcategory") 1843 { 1844 <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> 1845 } 1846 else if (@type == "Ruler") 1847 { 1848 <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> 1849 } 1850 else if (@type == "Region") 1851 { 1852 <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> 1853 } 1854 else if (@type == "Zone" || @type == "Denomination" || @type == "Category") 1855 { 1856 <a class="btn btn-light " href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1857 } 1858 else if (@type == "Mint") 1859 { 1860 <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> 1861 } 1862 else if (@type == "Collection" && entity.GetBoolean("Entity_IsFolder") == false || @GetGlobalValue("Global:Page.ID") == "908" && @print != "1") 1863 { 1864 <a class="btn btn-light " href='/Default.aspx?ID=1095'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1865 } 1866 else if (type == "Collection" && entity.GetBoolean("Entity_IsFolder") == true) 1867 { 1868 <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> 1869 } 1870 else 1871 { 1872 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 1873 } 1874 1875 <!--Next--> 1876 @if (!string.IsNullOrWhiteSpace(@next)) 1877 { 1878 if (@type == "Subcategory" && @Category == @Culture || 1879 @type == "Authority" && @Culture != "Roman_Provincial" || 1880 @type == "Authority" && @Culture != "Roman_Imperial") 1881 { 1882 <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> 1883 } 1884 else 1885 { 1886 <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> 1887 } 1888 } 1889 else 1890 { 1891 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button> 1892 } 1893 </div> 1894 1895 </div> 1896 <!--Description & Image--> 1897 <div class="col-md-12 row"> 1898 <div class="col-md-8"> 1899 <span class="font-normal">@entity.GetString("Entity_Description")</span> 1900 </div> 1901 <div class="col-md-4 text-center"> 1902 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Image"))) 1903 { 1904 <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> 1905 } 1906 else 1907 { 1908 <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> 1909 } 1910 <span class="font-description-tiny center-block">@entity.GetString("Entity_Caption")</span> 1911 </div> 1912 <div class="col-md-12"> 1913 @if (!string.IsNullOrWhiteSpace(@entity.GetString("Entity_Epithet"))) 1914 { 1915 <span class="font-subtitle">Epithet: </span><span class="font-description">@entity.GetString("Entity_Epithet") (@entity.GetString("Entity_EpithetEnglish"))</span> 1916 } 1917 </div> 1918 </div> 1919 1920 <!--Action buttons--> 1921 <div class="col-md-12 btn-group-sm header-bar" align="center"> 1922 @{ 1923 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID"))); 1924 1925 } 1926 1927 <!--Filter--> 1928 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName"))) 1929 { 1930 if (type != "Collection" && string.IsNullOrWhiteSpace(@BelongsToUser)) 1931 { 1932 <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> 1933 } 1934 else if (type != "Collection" && !string.IsNullOrWhiteSpace(@BelongsToUser)) 1935 { 1936 <a class="btn btn-light active" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a> 1937 } 1938 else 1939 { 1940 <a class="btn btn-light disabled" title='Show all coins' href="@returnlink"><i class="fa fa-filter" aria-hidden="true"></i></a> 1941 } 1942 1943 } 1944 else 1945 { 1946 <button class="btn btn-light" title='Not logged in' disabled><i class="fa fa-filter" aria-hidden="true"></i></button> 1947 } 1948 <!--Add Coin--> 1949 @if (!string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && string.IsNullOrWhiteSpace(BelongsToUser)|| !string.IsNullOrWhiteSpace(@GetGlobalValue("Global:Extranet.UserName")) && BelongsToUser == GetGlobalValue("Global:Extranet.UserID")) 1950 { 1951 <button class="btn btn-light" title='Add coin' data-toggle="modal" data-target="#NewCoinModal"><i class="fa fa-plus" aria-hidden="true"></i></button> 1952 } 1953 else 1954 { 1955 <button class="btn btn-light" href='' disabled><i class="fa fa-plus" aria-hidden="true"></i></button> 1956 } 1957 <!--Edit Entity--> 1958 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName")) && user != null) 1959 { 1960 if (user.GroupsIds.Contains(84) && type != "Collection" || GetGlobalValue("Global:Extranet.UserID") == "6" && type != "Collection") 1961 { 1962 <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> 1963 <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> 1964 } 1965 } 1966 1967 <!--Collection buttons --> 1968 @if (type == "Collection") 1969 { 1970 if (BelongsToUser == GetGlobalValue("Global:Extranet.UserID")) 1971 { 1972 <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> 1973 <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> 1974 <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> 1975 if (string.IsNullOrWhiteSpace(@Folder)) 1976 { 1977 <a class="btn btn-light" title="Create folder" data-toggle="modal" data-target="#CreateFolder"><i class="fas fa-folder-plus"></i></a> 1978 } 1979 else 1980 { 1981 <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> 1982 } 1983 } 1984 1985 if (@SortBy == "CustomSortValue") 1986 {<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> } 1987 else 1988 {<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>} 1989 if (@SortBy == "TitleSortValue") 1990 {<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> } 1991 else 1992 {<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>} 1993 1994 } 1995 </div> 1996 <!--Subfolders--> 1997 1998 <div id="collapse1" class="collapse card-deck"> 1999 @foreach (var jsonentity in AllEntitiesJSON) 2000 { 2001 2002 if (jsonentity.IsFolder == "true" && jsonentity.OwnerID == BelongsToUser && jsonentity.IsDeleted != "true") 2003 { 2004 var absolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + jsonentity.Image); 2005 2006 <a href="Default.aspx?ID=@RenderPID&@UrlParameters[1]&Folder=@jsonentity.Title"> 2007 <div class="folder-item card text-center"> 2008 @if (System.IO.File.Exists(absolutePath)) 2009 { 2010 <img class="card-img-top" style="padding:5px;" src="@jsonentity.Image" alt="@jsonentity.Title"> 2011 } 2012 else 2013 { 2014 <img class="card-img-top" style="padding:5px;background:white;" src="/Files/Images/folder.png" alt="@jsonentity.Title"> 2015 } 2016 2017 <div class="card-footer font-coin-title">@jsonentity.Title.Replace("_", " ")</div> 2018 </div> 2019 </a> 2020 HasSubfolders = true; 2021 2022 } 2023 } 2024 </div> 2025 if (HasSubfolders) 2026 { 2027 <div class="col-md-12 text-center"> 2028 <a data-toggle="collapse" href="#collapse1" title="Show folders"><i class="fas fa-folder-open fa-2x"></i></a> 2029 </div> 2030 } 2031 2032 <!--OG data--> 2033 ogtitle = @title; 2034 ogdescription = entity.GetString("Entity_Description"); 2035 ogimage = @entity.GetString("Entity_Image"); 2036 2037 InfoRendered = true; 2038 } 2039 2040 2041 } 2042 2043 @* STATIC HEADERS *@ 2044 2045 2046 2047 2048 @* ------------------Recent additions------------------ *@ 2049 @if (InfoRendered == false && @GetGlobalValue("Global:Page.ID") == "1067") 2050 { 2051 <div class="col-md-12 header-bar"> 2052 <span class="font-title">Recently Added</span> 2053 </div> 2054 <div class="col-md-12 row"> 2055 <div class="col-md-8"> 2056 <span class="font-normal"> 2057 Below, you will find a list of the <b>50 most recentely added or updated coins</b> in the database.<br><br> 2058 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> 2059 Click on the <b>coin image</b> to see a more in-depth description of that particular coin (if available).<br><br> 2060 Enjoy! 2061 </span> 2062 <br> 2063 </div> 2064 <div class="col-md-4 text-center"> 2065 <img style="margin:auto;max-height:350px;" class="img-fluid" src='/Files/Images/Coinsite/CoinDB/Stag.JPG' alt="Recent additions"> 2066 </div> 2067 </div> 2068 InfoRendered = true; 2069 } 2070 2071 2072 @* ------------------ Collection List------------------ *@ 2073 @if (InfoRendered == false && @GetGlobalValue("Global:Page.ID") == "1095") 2074 { 2075 <!--Title--> 2076 <div class="col-md-12 header-bar"> 2077 <span class="font-title">Collections</span> 2078 </div> 2079 <!--Description and Image section--> 2080 <div class="col-md-12 row"> 2081 <div class="col-md-8"> 2082 <span class="font-normal"> 2083 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>. 2084 <br><br> 2085 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. 2086 <br /><br /> 2087 Enjoy! 2088 </span> 2089 </div> 2090 <div class="col-md-4"> 2091 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/LiciniusII.JPG' alt="Collections list"> 2092 </div> 2093 </div> 2094 InfoRendered = true; 2095 } 2096 2097 2098 <!-- "Collections" with no collection entity --> 2099 @if (InfoRendered == false && !string.IsNullOrWhiteSpace(BelongsToUser) && GetGlobalValue("Global:Extranet.UserID") == BelongsToUser) 2100 { 2101 <!--Title--> 2102 <div class="col-md-12 header-bar"> 2103 <span class="font-title">No Collection</span> 2104 <!--Navigation--> 2105 <div class="col-md-12 btn-group-sm" align="center" style="padding-bottom:5px"> 2106 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-left" aria-hidden="true"></i></button> 2107 <a class="btn btn-light" href='/Default.aspx?ID=1067'><i class="fa fa-arrow-up" aria-hidden="true"></i></a> 2108 <button class="btn btn-light" href='' disabled><i class="fa fa-arrow-right" aria-hidden="true"></i></button> 2109 </div> 2110 </div> 2111 <!--Description and Image--> 2112 <div class="col-md-12 row"> 2113 <div class="col-md-8"> 2114 <span class="font-normal"> 2115 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 2116 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. 2117 <br /><br /> 2118 <div align="center"> 2119 <button class="btn btn-primary text-center" data-toggle="modal" data-target="#CreateCollection">Create a collection</button> 2120 </div> 2121 </span> 2122 </div> 2123 <div class="col-md-4"> 2124 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/LiciniusII.JPG' alt="Collections list"> 2125 </div> 2126 </div> 2127 2128 2129 2130 InfoRendered = true; 2131 } 2132 2133 @* ------------------Properties with no description------------------ *@ 2134 @if (InfoRendered == false && @print != "1") 2135 { 2136 <div class="col-md-12 header-bar"> 2137 <span class="font-title">No description yet </span> 2138 </div> 2139 <div class="col-md-12 row" style="padding-top:5px"> 2140 <div class="col-md-8"> 2141 <span class="font-normal"> 2142 Ok, so for some reason this ruler, mint, denomination or collection does not have a description yet - oops!<br> 2143 There are two possible explanations for this:<br><br> 2144 <li type="circle" style="padding-left:50px;">No description has been <b>written</b> yet</li> 2145 <li type="circle" style="padding-left:50px;">The property is <b>incorrectly named</b></li> 2146 <br> 2147 If the former, <b>patience is key</b> - this site covers thousands of entities, and all must have a manually created description written. 2148 <br><br> 2149 If the latter, try <b>renaming the property</b> - 'Domitian as Caesar' has no description, but 'Domitian' does. 2150 </span> 2151 <br> 2152 </div> 2153 <div class="col-md-4"> 2154 <img style="margin:auto;max-height:350px;" class="img-responsive img-rounded center-block" src='/Files/Images/Coinsite/CollectionImage.JPG' alt="Undescribed property"> 2155 </div> 2156 </div> 2157 InfoRendered = true; 2158 } 2159 2160 2161 @SnippetStart("OGData") 2162 <meta property="og:title" content='@ogtitle'> 2163 <meta property="og:description" content='@ogdescription'> 2164 <meta property="og:image" content='@ogimage'> 2165 @SnippetEnd("OGData") 2166 2167 <div></div> 2168 2169 <script type="text/javascript"> 2170 var coors = { "lat" : "@lat" , "long" : "@lng" }; 2171 2172 function MakeControl(controlDiv, label) { 2173 2174 // Set up the control border. 2175 var controlUI = document.createElement('div'); 2176 controlUI.title = label; 2177 controlUI.className = 'controlUI'; 2178 controlDiv.appendChild(controlUI); 2179 2180 // Set up the inner control. 2181 var controlText = document.createElement('div'); 2182 controlText.innerHTML = label; 2183 controlText.className = 'controlText'; 2184 controlUI.appendChild(controlText); 2185 } 2186 function myMap() { 2187 var myCenter = new google.maps.LatLng(coors.lat, coors.long); 2188 var impMapType = new google.maps.ImageMapType({ 2189 getTileUrl: function(coord, zoom) { 2190 return "http://dh.gu.se/tiles/imperium/" + zoom + "/" + coord.x + "/" + coord .y + ".png"; 2191 }, 2192 tileSize: new google.maps.Size(256, 256), 2193 isPng: true, 2194 alt: "Imperium Romanum", 2195 name: "Imperium", 2196 minZoom: 3, 2197 maxZoom: 11, 2198 overviewMapControl: true 2199 }); 2200 var mapOptions = { 2201 disableDefaultUI: true, 2202 zoomControl: true, 2203 scaleControl: true, 2204 zoomControlOptions: { 2205 style: google.maps.ZoomControlStyle.SMALL 2206 }, 2207 zoom: 5, 2208 center: myCenter, 2209 mapTypeId: 'IMP' 2210 }; 2211 2212 var map = new google.maps.Map(document.getElementById("googleMap"),mapOptions); 2213 map.mapTypes.set('IMP',impMapType); 2214 map.setMapTypeId('IMP'); 2215 2216 var marker = new google.maps.Marker({position:myCenter}); 2217 marker.setMap(map); 2218 2219 var controlText = ['&copy Digital Atlas of the Roman Empire, <a href="https://dare.ht.lu.se/">DARE.</a>', google.maps.ControlPosition.TOP_RIGHT]; 2220 2221 var divLabel = controlText[0]; 2222 var divName = document.createElement('div'); 2223 var newDiv = new MakeControl(divName, divLabel); 2224 map.controls[controlText[1]].push(divName); 2225 } 2226 google.maps.event.addDomListener(window, 'load', initialize); 2227 </script> 2228 2229 <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCji0zZMaMM402NbsQe0Ln9h7BbIo8BuOo&callback=myMap"></script> 2230 2231 2232 <script> 2233 // Copy to clipboard example 2234 document.querySelector("#copy-button").onclick = function () { 2235 // Select the content 2236 document.querySelector("#copy-input").select(); 2237 // Copy to the clipboard 2238 document.execCommand('copy'); 2239 }; 2240 </script> 2241
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_24cabc3b2efe4e028ee11c5a933210d9.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"> 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 }