The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ModifyVaultItem.cshtml 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @model Teknik.Areas.Vault.ViewModels.ModifyVaultItemViewModel
  2. @{
  3. bool isTemplate = (Model.isTemplate);
  4. }
  5. <div class="row @(isTemplate ? string.Empty : "vault-item")" id="@(isTemplate ? "item-template" : "vault-item-" + Model.index)">
  6. <div class="col-sm-9 col-sm-offset-1">
  7. <div class="panel panel-default">
  8. <div class="panel-heading">
  9. <div class="row">
  10. <div class="col-sm-8 text-left">
  11. <h4><b id="item-title">@(isTemplate ? string.Empty : Model.title)</b></h4>
  12. </div>
  13. <div class="col-sm-4">
  14. <div class="btn-group pull-right" role="group">
  15. <button type="button" class="btn btn-default" id="@(isTemplate ? "edit-item" : Model.index.ToString())" data-toggle="modal" data-target="#editItem">Edit</button>
  16. <button type="button" class="btn btn-danger" id="remove-item">Remove</button>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="panel-body">
  22. <dl class="dl-horizontal">
  23. <dt>Type</dt>
  24. <dd id="item-type">@(isTemplate ? string.Empty : Model.type)</dd>
  25. <dt>Url</dt>
  26. <dd id="item-url">@(isTemplate ? string.Empty : Model.url)</dd>
  27. </dl>
  28. </div>
  29. <div class="panel-footer">
  30. <p id="item-description">@(isTemplate ? string.Empty : Model.description)</p>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="col-sm-1">
  35. <div class="row">
  36. <div class="col-sm-12">
  37. <button type="button" class="btn btn-default" id="move-up"><i class="fa fa-chevron-up"></i></button>
  38. </div>
  39. </div>
  40. <br />
  41. <div class="row">
  42. <div class="col-sm-12">
  43. <button type="button" class="btn btn-default" id="move-down"><i class="fa fa-chevron-down"></i></button>
  44. </div>
  45. </div>
  46. </div>
  47. @if (!isTemplate)
  48. {
  49. <script type="text/javascript">
  50. $(document).ready(function () {
  51. var itemDiv = $('#vault-item-@Model.index');
  52. linkRemove(itemDiv);
  53. linkMoveUp(itemDiv);
  54. linkMoveDown(itemDiv);
  55. @if (string.IsNullOrEmpty(Model.description))
  56. {
  57. @:itemDiv.find('.panel-footer').hide();
  58. }
  59. });
  60. </script>
  61. }
  62. </div>