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

1 @using System.Web; 2 @using System.Net; 3 @using Newtonsoft.Json; 4 @using Newtonsoft.Json.Linq; 5 6 @functions { 7 public class RootObject 8 { 9 public string tableName { get; set; } 10 public List<Entity> entityList { get; set; } 11 } 12 13 public class Entity 14 { 15 public string Id { get; set; } 16 public int Sort { get; set; } 17 public string ItemInstanceType { get; set; } 18 public string Title { get; set; } 19 public string Type { get; set; } 20 public string Description { get; set; } 21 public string Image { get; set; } 22 public string Culture { get; set; } 23 public string Greek_Subcultures { get; set; } 24 public string Roman_Republican_Subcultures { get; set; } 25 public string Roman_Imperial_Subcultures { get; set; } 26 public string Celtic_Subcultures { get; set; } 27 public string Roman_Provincial_Subcultures { get; set; } 28 public string Islamic_Subcultures { get; set; } 29 public string Eastern_Subcultures { get; set; } 30 public string European_Medieval_Subcultures { get; set; } 31 public string Indian_Subcultures { get; set; } 32 public string Byzantine_Subcultures { get; set; } 33 public string Phoenician_Subcultures { get; set; } 34 public string Chinese_Subcultures { get; set; } 35 public string Zone { get; set; } 36 public string Region { get; set; } 37 public string Location { get; set; } 38 public string Modern_Location { get; set; } 39 public string Ruler_Title { get; set; } 40 public string Ruler_Title_English { get; set; } 41 public string Epithet { get; set; } 42 public string EpithetEnglish { get; set; } 43 public string Domain { get; set; } 44 public string Doman_English { get; set; } 45 public string StartOf_Rule { get; set; } 46 public string EndOf_Rule { get; set; } 47 public string OwnerID { get; set; } 48 public string OwnerName { get; set; } 49 public string ShortDescription { get; set; } 50 public string Focus { get; set; } 51 public string IsPatron { get; set; } 52 public string IsFolder { get; set; } 53 public string IsDeleted { get; set; } 54 public string MetalsList { get; set; } 55 public string MintedByList { get; set; } 56 public string IncludeInMenu { get; set; } 57 public string NameReadable { get; set; } 58 public string PreviousText { get; set; } 59 public string NextText { get; set; } 60 public string RelevantPageID { get; set; } 61 public string RelevantParagraphID { get; set; } 62 public string RelevantAreaID { get; set; } 63 } 64 65 } 66 67 68 @{ 69 string AllEntitiesRaw = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Blogtheme/json/AllEntitiesTest.json")); 70 int AllEntitiesRawLength = AllEntitiesRaw.Length; 71 72 var AllEntitiesJSON = JsonConvert.DeserializeObject<List<Entity>>(@AllEntitiesRaw.Substring(49, @AllEntitiesRawLength - 55)); 73 74 var AllEntitiesSorted = AllEntitiesJSON.OrderBy(x => x.Title); 75 76 string today = DateTime.Now.ToString("yyyy-MM-dd"); 77 78 var user = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(@GetGlobalValue("Global:Extranet.UserID"))); 79 80 } 81 82 @if (user != null){ 83 <div class="modal fade" id="NewCoinModal" tabindex="-1" role="dialog"> 84 <div class="modal-dialog modal-lg" role="document"> 85 <div class="modal-content"> 86 @if (!string.IsNullOrWhiteSpace(user.Name)) 87 { 88 @GetString("ItemCreator:Edit.Form.Begin") 89 <div class="modal-header"> 90 <h5 class="modal-title" id="exampleModalLongTitle">Add a coin to your collection</h5> 91 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 92 <span aria-hidden="true">&times;</span> 93 </button> 94 </div> 95 <div class="modal-body"> 96 <script src="/Admin/Content/JsLib/dw/ItemGroupVisibilityHandler.js" type="text/javascript"></script> 97 @* Title and Year *@ 98 99 <div class="col-md-12 row" style="margin-top:10px;"> 100 <label for="authority" class="font-subtitle col-md-3">Authority </label> 101 <input id="authority" type="text" class="col-md-9" name="Title" autocomplete="off" maxlength="50" value="" /> 102 </div> 103 104 <div class="col-md-12 row" style="margin-top:10px;"> 105 <label class="font-subtitle col-md-3">Year </label> 106 <input type="text" class="col-md-9" name="Year" autocomplete="off" maxlength="15" value="" /> 107 </div> 108 109 @* Classification *@ 110 <div class="col-md-12 row" id="Classification_fieldSet" style="margin-top:10px;"> 111 <label class="font-subtitle col-md-3">Category</label> 112 <select class="col-md-9" id="Category" name="Category"> 113 <option selected="selected" value="">Nothing selected</option> 114 @foreach (var entity in AllEntitiesSorted) 115 { 116 if (entity.Title == @GetString("ItemPublisher:Item.Category") && entity.Type == "Category") 117 { 118 <option selected="selected" value='@entity.Title'>@entity.Title.Replace("_", " ")</option> 119 } 120 else if (entity.Type == "Category") 121 { 122 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option> 123 } 124 } 125 </select> 126 </div> 127 128 129 <!--Subcategories--> 130 @foreach (var entity in AllEntitiesJSON) 131 { 132 if (entity.Type == "Category") 133 { 134 string fieldsetstring = entity.Title + "_fieldSet"; 135 string selectstring = entity.Title + "Subcategory"; 136 string tagstring = "ItemPublisher:Item." + selectstring; 137 <div id="@fieldsetstring"> 138 <div class="col-md-12 row"> 139 <label class="font-subtitle col-md-3">Subcategory</label> 140 <select class="col-md-9" id="@selectstring" name="@selectstring"> 141 <option value="">Nothing selected</option> 142 @foreach (var subcategory in AllEntitiesJSON.OrderBy(x => x.Sort)) 143 { 144 if (subcategory.Type == "Subcategory" && subcategory.Culture == entity.Title) 145 { 146 <option value='@subcategory.Title'>@subcategory.Title.Replace("_", " ")</option> 147 } 148 } 149 </select> 150 </div> 151 152 </div> 153 } 154 } 155 156 @* Image *@ 157 <div class="col-md-12 row"> 158 <label class="font-subtitle col-md-3">Image </label> 159 <div class="col-md-9"> 160 <img class="img-fluid" id="blah" src="/Files/Images/Placeholder.png" alt="your image"> <img /> 161 <input type='file' name='Image' accept='' id="imgInp" /> 162 </div> 163 </div> 164 </div> 165 @* Obverse and Reverse *@ 166 167 <div class="col-md-12 row"> 168 <label class="font-subtitle col-md-3">Obverse </label> 169 <input type="text" class="col-md-9" name="Obverse_Legend" maxlength="255" value="" /> 170 </div> 171 172 <div class="col-md-12 row"> 173 <label class="font-subtitle col-md-3">Reverse </label> 174 <input type="text" class="col-md-9" name="Reverse_Legend" maxlength="255" value="" /> 175 </div> 176 177 @* Metal *@ 178 <div class="col-md-12 row"> 179 <label class="font-subtitle col-md-3">Metal </label> 180 <select class="col-md-9" id="Metal" name="Metal"> 181 <option selected="selected" value="">Nothing selected</option> 182 183 @foreach (var entity in AllEntitiesSorted) 184 { 185 if (entity.Type == "Metal") 186 { 187 string NameReadable = "(" + @entity.NameReadable + ")"; 188 <option value='@entity.Title'> 189 @entity.Title.Replace("_", " ") @if (!string.IsNullOrWhiteSpace(@entity.NameReadable)) 190 {@NameReadable} 191 </option> 192 } 193 } 194 </select> 195 </div> 196 197 @* Denomination *@ 198 <div class="col-md-12 row"> 199 <label class="font-subtitle col-md-3">Denomination</label> 200 <input id="denomination" type="text" class="col-md-9" name="Denomination" maxlength="255" value="" /> 201 </div> 202 203 @* Zone *@ 204 <div class="col-md-12 row"> 205 <label class="font-subtitle col-md-3">Zone </label> 206 <select class="col-md-9" id="Zone" name="Zone"> 207 <option selected="selected" value="">Nothing selected</option> 208 @foreach (var entity in AllEntitiesSorted) 209 { 210 if (entity.Type == "Zone") 211 { 212 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option> 213 } 214 } 215 </select> 216 </div> 217 218 @* Region *@ 219 <div class="col-md-12 row"> 220 <label class="font-subtitle col-md-3">Region </label> 221 <select class="col-md-9" id="Region" name="Region"> 222 <option selected="selected" value="">Nothing selected</option> 223 @foreach (var entity in AllEntitiesSorted) 224 { 225 if (entity.Type == "Region" && entity.Zone != null) 226 { 227 <option data-ref='@entity.Zone' value='@entity.Title'>@entity.Title</option> 228 } 229 } 230 </select> 231 </div> 232 233 @* Mint *@ 234 <div class="col-md-12 row"> 235 <label class="font-subtitle col-md-3">Mint</label> 236 <input id="mint" class="std item-field col-md-9" maxlength="255" name="Mint" type="text" value=""> 237 </div> 238 239 240 241 @* Notes *@ 242 <div class="col-md-12 row"> 243 <label class="font-subtitle col-md-3">Notes</label> 244 <textarea class="col-md-9" rows="8" id='Description' name='Description'> </textarea> 245 </div> 246 247 @* References *@ 248 <div class="col-md-12 row "> 249 <label class="font-subtitle col-md-3">References</label> 250 <input type="text" class="col-md-9" name="References" maxlength="255" value=""> 251 </div> 252 253 254 255 256 @* Measurements *@ 257 258 <div class="col-md-12 row"> 259 <label class="font-subtitle col-md-3">Weight </label> 260 <input class="col-md-9" name="Weight" type="number" value="" min="0" step="0.01"> 261 </div> 262 263 <div class="col-md-12 row"> 264 <label class="font-subtitle col-md-3">Diameter </label> 265 <input class="col-md-9" name="Diameter" type="number" value="" min="0" step="0.01"> 266 </div> 267 268 <div class="col-md-12 row"> 269 <label class="font-subtitle col-md-3">Die axis </label> 270 <input class="col-md-9" name="DieOrientation" type="number" min="0" max="12" value=""> 271 </div> 272 273 @* Purchase Info fields *@ 274 275 <div class="col-md-12 row"> 276 <label class="font-subtitle col-md-3">Price</label> 277 <input class="std item-field col-md-9" maxlength="255" name="PurchasePrice" type="number" value=""> 278 </div> 279 280 <div class="col-md-12 row"> 281 <label class="font-subtitle col-md-3">Source</label> 282 <input class="std item-field col-md-9" maxlength="255" name="PurchaseSource" type="text" value=""> 283 </div> 284 285 <div class="col-md-12 row"> 286 <label class="font-subtitle col-md-3">Date</label> 287 <input class="item-field col-md-9" name="PurchaseDate" type="date" value="@today"> 288 </div> 289 290 <!--Organisation--> 291 <div class="col-md-12 row"> 292 <label class="font-subtitle col-md-3">Sort value</label> 293 <input class="std item-field col-md-9" maxlength="255" name="CustomSort" type="number" value="99999"> 294 </div> 295 <div class="col-md-12 row"> 296 <label class="font-subtitle col-md-3">Folder</label> 297 <select class="col-md-9" id="Folder" name="Folder"> 298 <option selected="selected" value="">Nothing selected</option> 299 @foreach (var entity in AllEntitiesSorted) 300 { 301 if (entity.Type == "Collection" && entity.IsFolder == "true" && entity.OwnerID == user.ID.ToString()) 302 { 303 <option value='@entity.Title'>@entity.Title.Replace("_", " ")</option> 304 } 305 } 306 </select> 307 </div> 308 <hr /> 309 <div class="col-md-12 font-description"> 310 <b>Please note:</b> Your coin will not be visible immediately - all content on this website must be indexed before it becomes visible. We index all content roughly <b>every 5 minutes</b>. 311 </div> 312 313 314 @* Hidden fields *@ 315 <div> 316 <input class="item-field item-field-date" name="CreatedDate" type="hidden" value='@GetGlobalValue("Global:Server.Date")'> 317 <input class="std item-field form-control" maxlength="255" name="OwnerName" type="hidden" value='@GetGlobalValue("Global:Extranet.UserName")'> 318 <input class="std item-field form-control" maxlength="255" name="BelongsToUser" type="hidden" value='@GetGlobalValue("Global:Extranet.UserID")'> 319 </div> 320 <script type="text/javascript"> 321 Dynamicweb.Items.GroupVisibilityRule.get_current().add({ 322 "VisibilityRules": [{ 323 "VisibilityField": "Category", 324 "VisibilityTargetGroup": "Roman_Imperial", 325 "VisibilityCondition": "0", 326 "VisibilityFieldType": "3", 327 "VisibilityConditionValue": "Roman_Imperial", 328 "Group": "Classification" 329 }, { 330 "VisibilityField": "Category", 331 "VisibilityTargetGroup": "Roman_Republican", 332 "VisibilityCondition": "0", 333 "VisibilityFieldType": "3", 334 "VisibilityConditionValue": "Roman_Republican", 335 "Group": "Classification" 336 }, { 337 "VisibilityField": "Category", 338 "VisibilityTargetGroup": "Greek", 339 "VisibilityCondition": "0", 340 "VisibilityFieldType": "3", 341 "VisibilityConditionValue": "Greek", 342 "Group": "Classification" 343 }, { 344 "VisibilityField": "Category", 345 "VisibilityTargetGroup": "Islamic", 346 "VisibilityCondition": "0", 347 "VisibilityFieldType": "3", 348 "VisibilityConditionValue": "Islamic", 349 "Group": "Classification" 350 }, { 351 "VisibilityField": "Category", 352 "VisibilityTargetGroup": "Eastern", 353 "VisibilityCondition": "0", 354 "VisibilityFieldType": "3", 355 "VisibilityConditionValue": "Eastern", 356 "Group": "Classification" 357 }, { 358 "VisibilityField": "Category", 359 "VisibilityTargetGroup": "Roman_Provincial", 360 "VisibilityCondition": "0", 361 "VisibilityFieldType": "3", 362 "VisibilityConditionValue": "Roman_Provincial", 363 "Group": "Classification" 364 }, { 365 "VisibilityField": "Category", 366 "VisibilityTargetGroup": "Byzantine", 367 "VisibilityCondition": "0", 368 "VisibilityFieldType": "3", 369 "VisibilityConditionValue": "Byzantine", 370 "Group": "Classification" 371 }, { 372 "VisibilityField": "Category", 373 "VisibilityTargetGroup": "European_Medieval", 374 "VisibilityCondition": "0", 375 "VisibilityFieldType": "3", 376 "VisibilityConditionValue": "European_Medieval", 377 "Group": "Classification" 378 }, { 379 "VisibilityField": "Category", 380 "VisibilityTargetGroup": "Phoenician", 381 "VisibilityCondition": "0", 382 "VisibilityFieldType": "3", 383 "VisibilityConditionValue": "Phoenician", 384 "Group": "Classification" 385 }, { 386 "VisibilityField": "Category", 387 "VisibilityTargetGroup": "Celtic", 388 "VisibilityCondition": "0", 389 "VisibilityFieldType": "3", 390 "VisibilityConditionValue": "Celtic", 391 "Group": "Classification" 392 }], 393 "Groups": [{ 394 "GroupName": "General", 395 "IsVisible": true 396 }, { 397 "GroupName": "Classification", 398 "IsVisible": true 399 }, { 400 "GroupName": "Roman_Imperial", 401 "IsVisible": false 402 }, { 403 "GroupName": "Greek", 404 "IsVisible": false 405 }, { 406 "GroupName": "Islamic", 407 "IsVisible": false 408 }, { 409 "GroupName": "Chinese", 410 "IsVisible": false 411 }, { 412 "GroupName": "Roman_Provincial", 413 "IsVisible": false 414 }, { 415 "GroupName": "Indian", 416 "IsVisible": false 417 }, { 418 "GroupName": "Eastern", 419 "IsVisible": false 420 }, { 421 "GroupName": "Provincial", 422 "IsVisible": false 423 }, { 424 "GroupName": "Roman_Republican", 425 "IsVisible": false 426 }, { 427 "GroupName": "Celtic", 428 "IsVisible": false 429 }, { 430 "GroupName": "European_Medieval", 431 "IsVisible": false 432 }, { 433 "GroupName": "Byzantine", 434 "IsVisible": false 435 }, { 436 "GroupName": "Phoenician", 437 "IsVisible": false 438 }, { 439 "GroupName": "Relationships", 440 "IsVisible": true 441 }, { 442 "GroupName": "Measurements", 443 "IsVisible": true 444 }, { 445 "GroupName": "Trade", 446 "IsVisible": true 447 }, { 448 "GroupName": "Audit", 449 "IsVisible": true 450 }], 451 "Fields": [{ 452 "Id": "Title", 453 "Group": "General" 454 }, { 455 "Id": "Image", 456 "Group": "General" 457 }, { 458 "Id": "Obverse_Legend", 459 "Group": "General" 460 }, { 461 "Id": "Reverse_Legend", 462 "Group": "General" 463 }, { 464 "Id": "Description", 465 "Group": "General" 466 }, { 467 "Id": "Year", 468 "Group": "General" 469 }, { 470 "Id": "Category", 471 "Group": "Classification" 472 }, { 473 "Id": "References", 474 "Group": "Classification" 475 }, { 476 "Id": "Roman_ImperialSubcategory", 477 "Group": "Roman_Classification" 478 }, { 479 "Id": "DenominationRoman", 480 "Group": "Roman_Classification" 481 }, { 482 "Id": "Mintmark", 483 "Group": "Roman_Classification" 484 }, { 485 "Id": "GreekSubcategory", 486 "Group": "Greek_Classification" 487 }, { 488 "Id": "DenominationGreek", 489 "Group": "Greek_Classification" 490 }, { 491 "Id": "IslamicSubcategory", 492 "Group": "Islamic_Classification" 493 }, { 494 "Id": "DenominationIslamic", 495 "Group": "Islamic_Classification" 496 }, { 497 "Id": "EasternSubcategory", 498 "Group": "Eastern_Classification" 499 }, { 500 "Id": "DenominationEastern", 501 "Group": "Eastern_Classification" 502 }, { 503 "Id": "BelongsToUser", 504 "Group": "Relationships" 505 }, { 506 "Id": "OwnerName", 507 "Group": "Relationships" 508 }, { 509 "Id": "Metal", 510 "Group": "Measurements" 511 }, { 512 "Id": "Weight", 513 "Group": "Measurements" 514 }, { 515 "Id": "Diameter", 516 "Group": "Measurements" 517 }, { 518 "Id": "DieOrientation", 519 "Group": "Measurements" 520 }, { 521 "Id": "PurchasePrice", 522 "Group": "Trade" 523 }, { 524 "Id": "PurchaseDate", 525 "Group": "Trade" 526 }, { 527 "Id": "PurchaseSource", 528 "Group": "Trade" 529 }, { 530 "Id": "Created", 531 "Group": "Audit" 532 }] 533 }); 534 </script> 535 <div class="modal-footer"> 536 <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> 537 <button type="submit" class="btn btn-primary">Add</button> 538 </div> 539 @GetString("ItemCreator:Edit.Form.End") 540 } 541 </div> 542 </div> 543 </div> 544 } 545 546 547 548 <script> 549 @* This code creates dropdown menus with suggestions for three text fields *@ 550 551 552 var authorities = { 553 url: "/Files/Templates/Designs/Blogtheme/json/authorities.txt", 554 555 556 getValue: "title", 557 adjustWidth: false, 558 559 list: { 560 match: { enabled: true } 561 }, 562 template: { 563 type: "custom", 564 method: function(value, item) { 565 return value + "<text class='font-description-tiny'> – " + item.ruler_title + " of " + item.domain + " from " + item.from + " to " + item.to + "</text>"; 566 } 567 } 568 }; 569 570 var denominations = { 571 url: "/Files/Templates/Designs/Blogtheme/json/Denominations.txt", 572 573 getValue: "title", 574 adjustWidth: false, 575 576 list: { 577 match: { enabled: true } 578 }, 579 template: { 580 type: "custom", 581 method: function (value, item) { 582 return item.title; 583 } 584 } 585 }; 586 587 588 var mints = { 589 url: "/Files/Templates/Designs/Blogtheme/json/mints.txt", 590 591 getValue: "title", 592 adjustWidth: false, 593 594 list: { 595 match: { enabled: true } 596 }, 597 template: { 598 type: "custom", 599 method: function(value, item) { 600 if (item.other_titles !== '') { 601 return value + "<text class='font-description-tiny'> " + "(" + item.other_titles + ")" + " - a settlement in " + item.region + "</text>"; 602 } else { 603 return value + "<text class='font-description-tiny'> - a settlement in " + item.region + "</text>"; 604 } 605 } 606 } 607 }; 608 609 $("#authority").easyAutocomplete(authorities); 610 $("#denomination").easyAutocomplete(denominations); 611 $("#mint").easyAutocomplete(mints); 612 613 </script> 614 615 616 <script> 617 @* This code tries to set the value of a Zone based on the Region value *@ 618 619 $(document).ready(function(){ 620 $('#Region').change(function(){ 621 $('#Zone').val($('#Region option:selected').data('ref')); 622 }); 623 624 $('#Zone').change(function(){ 625 $('#Region').val(""); 626 }); 627 628 }); 629 630 </script> 631 632 633 634 635 <script> 636 @* This code shows a preview of the selected image file when adding images to a new coin *@ 637 638 function readURL(input) { 639 if (input.files && input.files[0]) { 640 var reader = new FileReader(); 641 642 reader.onload = function (e) { 643 $('#blah').attr('src', e.target.result); 644 } 645 646 reader.readAsDataURL(input.files[0]); 647 } 648 } 649 650 $("#imgInp").change(function(){ 651 readURL(this); 652 }); 653 654 </script>