featureFlag.handlebars 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <div class="row-fluid feature {{id}}">
  2. <div class="span7">
  3. <span
  4. class="element_toggler"
  5. aria-controls="{{id}}-details"
  6. aria-expanded="{{#if isExpanded}}true{{else}}false{{/if}}"
  7. role="button"
  8. tabindex="0">
  9. <span class="screenreader-only">
  10. {{#t "toggle_feature_details_screenreader_info"}}Toggle feature details for {{title}} {{/t}}
  11. </span>
  12. <i class="icon-mini-arrow-{{#if isExpanded}}down{{else}}right{{/if}}"></i>
  13. </span>
  14. <span class="feature-title">{{title}}</span>
  15. {{#each labels}}
  16. <span class="label label-{{cssClass}}">{{name}}</span>
  17. {{/each}}
  18. </div>
  19. <div class="span5 text-right">
  20. {{#if threeState}}
  21. <div id="ff_{{id}}" class="ui-buttonset ui-buttonset--feature-settings">
  22. <div class="ff-background ff-left {{#if disableOff}}ff-disabled{{/if}}">
  23. <input type="radio" id="ff_off_{{id}}" name="ff_{{id}}" class="ff_button" {{#if isOff}}checked{{/if}}
  24. {{#if disableOff}}disabled{{/if}} data-id="{{id}}" data-action="off">
  25. <label for="ff_off_{{id}}" role="button" aria-label="Turn off {{title}}" aria-disabled="{{disableOff}}">
  26. {{#t "off"}}Off{{/t}}
  27. </label>
  28. </div>
  29. <div class="ff-background {{#if disableAllow}}ff-disabled{{/if}} {{#if isSiteAdmin}}ff-right{{/if}}">
  30. <input type="radio" id="ff_allowed_{{id}}" name="ff_{{id}}" class="ff_button" {{#if isAllowed}}checked{{/if}}
  31. {{#if disableAllow}}disabled{{/if}} data-id="{{id}}" data-action="allowed">
  32. <label for="ff_allowed_{{id}}" role="button" aria-label="Allow {{title}}" aria-disabled="{{disableAllow}}">
  33. {{#t "allow"}}Allow{{/t}}
  34. </label>
  35. </div>
  36. {{#unless isSiteAdmin}}
  37. <div class="ff-background ff-right {{#if disableOn}}ff-disabled{{/if}}">
  38. <input type="radio" id="ff_on_{{id}}" name="ff_{{id}}" class="ff_button" {{#if isOn}}checked{{/if}}
  39. {{#if disableOn}}disabled{{/if}} data-id="{{id}}" data-action="on">
  40. <label for="ff_on_{{id}}" role="button" aria-label="Turn on {{title}}" aria-disabled="{{disableOn}}">
  41. {{#t "on"}}On{{/t}}
  42. </label>
  43. </div>
  44. {{/unless}}
  45. </div>
  46. {{else}}
  47. <!-- start super toggle -->
  48. <label class="ic-Super-toggle--on-off" for="ff_toggle_{{id}}">
  49. <span class="screenreader-only">
  50. {{#if disableToggle}}
  51. {{#if isOn}}
  52. {{#t}}{{title}} is on{{/t}}
  53. {{else}}
  54. {{#t}}{{title}} is off{{/t}}
  55. {{/if}}
  56. {{else}}
  57. {{#t}}Enable feature: {{title}}{{/t}}
  58. {{/if}}
  59. </span>
  60. <input id="ff_toggle_{{id}}" class="ic-Super-toggle__input ff_toggle" type="checkbox"
  61. {{#if isOn}}checked{{/if}} {{#if disableToggle}}disabled{{/if}} data-id="{{id}}">
  62. <div class="ic-Super-toggle__container" aria-hidden="true" data-checked="{{#t "on"}}On{{/t}}" data-unchecked="{{#t "off"}}Off{{/t}}">
  63. <div class="ic-Super-toggle__switch">
  64. <div class="ic-Super-toggle__option--LEFT">
  65. <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="548.9" height="548.9"
  66. viewBox="0 0 548.9 548.9" xml:space="preserve">
  67. <polygon points="449.3 48 195.5 301.8 99.5 205.9 0 305.4 95.9 401.4 195.5 500.9 295 401.4 548.9 147.5" />
  68. </svg>
  69. </div>
  70. <div class="ic-Super-toggle__option--RIGHT">
  71. <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 28 28" xml:space="preserve">
  72. <polygon points="28 22.4 19.6 14 28 5.6 22.4 0 14 8.4 5.6 0 0 5.6 8.4 14 0 22.4 5.6 28 14 19.6 22.4 28" />
  73. </svg>
  74. </div>
  75. </div>
  76. </div>
  77. </label>
  78. <!-- end super toggle -->
  79. {{/if}}
  80. </div>
  81. </div>
  82. <div class="feature-details row-fluid" id="{{id}}-details" style="display: {{#if isExpanded}}block{{else}}none{{/if}}">
  83. <div class="span10">
  84. <p tabindex="0" class="feature-description">
  85. {{#if releaseOn}}
  86. {{#t "estimated_release"}}Estimated Release:{{/t}}
  87. <span class="feature-release-date">
  88. {{tDateToString (fudge releaseOn) "medium"}}
  89. </span>
  90. </br>
  91. {{/if}}
  92. {{#if description}}
  93. {{{description}}}
  94. {{else}}
  95. ({{#t "no_description"}}no description{{/t}})
  96. {{/if}}
  97. </p>
  98. </div>
  99. <div class="span2 text-right feature-detail-links">
  100. {{#if releaseNotesUrl}}
  101. <a href="{{releaseNotesUrl}}" class="feature-release-notes-link">
  102. {{#t "release_notes"}}release notes{{/t}}
  103. </a>
  104. {{/if}}
  105. </div>
  106. </div>