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.

78 lines
4.3 KiB

  1. @{
  2. var isPublished = Blog.CurrentPost != null && Blog.CurrentPost.IsPublished;
  3. }
  4. <nav id="admin" data-role="editor-toolbar" class="navbar navbar-default navbar-fixed-top" data-ispublished="@isPublished" data-token="@Blog.UniqueId">
  5. <div class="navbar-inner">
  6. <ul class="nav navbar-nav">
  7. <li><button onclick="location.href='/post/new/'" class="btn btn-link" id="btnNew">New post</button></li>
  8. <li><button class="btn btn-link" id="btnEdit" disabled>Edit</button></li>
  9. <li><button class="btn btn-link" id="btnDelete" disabled>Delete</button></li>
  10. <li><button class="btn btn-link" id="btnSave" disabled>Save</button></li>
  11. <li><button class="btn btn-link" id="btnCancel" disabled>Cancel</button></li>
  12. <li id="ispublished">
  13. <input type="checkbox" id="chkispublished" checked="@(isPublished ? "checked" : null)" disabled />
  14. <label for="chkispublished">Publish</label>
  15. </li>
  16. </ul>
  17. <div id="tools">
  18. <div class="btn-group">
  19. <a class="btn btn-mini" data-edit="formatBlock <h1>">H1</a>
  20. <a class="btn btn-mini" data-edit="formatBlock <h2>">H2</a>
  21. <a class="btn btn-mini" data-edit="formatBlock <h3>">H3</a>
  22. </div>
  23. <div class="btn-group">
  24. <a class="btn btn-mini" data-edit="italic"><em>I</em></a>
  25. <a class="btn btn-mini" data-edit="bold"><strong>B</strong></a>
  26. <a class="btn btn-mini" data-edit="underline"><ins>U</ins></a>
  27. <a class="btn btn-mini" data-edit="strikethrough"><s>S</s></a>
  28. </div>
  29. <div class="btn-group">
  30. <a class="btn btn-mini" data-edit="justifyleft" title="Justify left"><i class="glyphicon glyphicon-align-left"></i></a>
  31. <a class="btn btn-mini" data-edit="justifycenter" title="Justify center"><i class="glyphicon glyphicon-align-center"></i></a>
  32. <a class="btn btn-mini" data-edit="justifyright" title="Justify right"><i class="glyphicon glyphicon-align-right"></i></a>
  33. <a class="btn btn-mini" data-edit="justifyfull" title="Justify full"><i class="glyphicon glyphicon-align-justify"></i></a>
  34. </div>
  35. <div class="btn-group">
  36. <a class="btn btn-mini" data-edit="insertunorderedlist" title="Bullet points"><i class="glyphicon glyphicon-list"></i></a>
  37. <a class="btn btn-mini" data-edit="insertorderedlist" title="Numbered bullet points"><i class="glyphicon glyphicon-th-list"></i></a>
  38. <a class="btn btn-mini" data-edit="outdent" title="Indent left"><i class="glyphicon glyphicon-indent-left"></i></a>
  39. <a class="btn btn-mini" data-edit="indent" title="Indent right"><i class="glyphicon glyphicon-indent-right"></i></a>
  40. </div>
  41. <div class="btn-group">
  42. <a class="btn btn-mini" data-edit="createLink" title="Hyperlink"><i class="glyphicon glyphicon-globe"></i></a>
  43. <a class="btn btn-mini" data-edit="unlink" title="Remove hyperlink"><i class="glyphicon glyphicon-remove"></i></a>
  44. <a class="btn btn-mini uploadimage"><i class="glyphicon glyphicon-picture"></i></a>
  45. </div>
  46. <input type="file" id="txtImage" data-edit="insertImage" style="width:0; height: 0;position:absolute" />
  47. <div class="btn-group">
  48. <a class="btn btn-mini source" data-cmd="source" title="Toggle source/design view"><i class="glyphicon glyphicon-eye-open"></i></a>
  49. </div>
  50. </div>
  51. </div>
  52. <form action="@FormsAuthentication.LoginUrl?signout=true&amp;[email protected]" method="post">
  53. <button type="submit" title="Signed in as @User.Identity.Name" class="btn btn-link pull-right">
  54. Sign out &nbsp;<span class="glyphicon glyphicon-lock"></span>
  55. </button>
  56. </form>
  57. <aside>
  58. <p class="alert"></p>
  59. </aside>
  60. </nav>
  61. @if (!string.IsNullOrEmpty(Blog.CurrentSlug))
  62. {
  63. <script src="@Blog.FingerPrint("/scripts/jquery-2.0.2.js", "//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js")"></script>
  64. <script src="@Blog.FingerPrint("/scripts/bootstrap-wysiwyg.js")" defer></script>
  65. <script src="@Blog.FingerPrint("/scripts/admin.js")" defer></script>
  66. }