EntityLabelDefineView_tmpl.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!--
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. -->
  17. <div class="panel-group" id="accordion">
  18. <div class="panel panel-default custom-panel expand_collapse_panel-icon labelsPanel" data-id="userDefineLabel" style="position:relative;">
  19. {{#ifCond labels.length "===" 0}}
  20. <div class="panel-heading" data-toggle="collapse" href={{div_1.anchor}} {{#ifCond swapItem "===" true}} aria-expanded="true" {{else}} aria-expanded="false" {{/ifCond}} style="width: 70%">
  21. <h4 class="panel-title">
  22. <a>标签 </a>
  23. </h4>
  24. <div class="btn-group pull-left">
  25. <button type="button" title="Collapse"><i class="ec-icon fa"></i></button>
  26. </div>
  27. </div>
  28. {{else}}
  29. <div class="panel-heading" data-toggle="collapse" href={{div_2.anchor}} aria-expanded="true" style="width: 70%">
  30. <h4 class="panel-title">
  31. <a>标签 </a>
  32. </h4>
  33. <div class="btn-group pull-left">
  34. <button type="button" title="Collapse"><i class="ec-icon fa"></i></button>
  35. </div>
  36. </div>
  37. {{/ifCond}}
  38. {{#ifCond readOnlyEntity "===" false}}
  39. <div class="panel-actions detailpage-panel-button">
  40. {{#ifCond swapItem "!==" true}}
  41. <button class="btn btn-action btn-sm" data-id="addLabels">
  42. {{#ifCond labels.length "===" 0}} 添加 {{else}} 编辑 {{/ifCond}}
  43. </button>
  44. {{/ifCond}}
  45. {{#ifCond saveLabels "===" true}}
  46. <button class="btn btn-action btn-sm" data-id="saveLabels">保存</button>
  47. <button class="btn btn-action btn-sm" data-id="cancel">取消</button>
  48. {{/ifCond}}
  49. </div>
  50. {{/ifCond}}
  51. <div id={{div_1.id}} {{#ifCond swapItem "===" false}} class="panel-collapse collapse" {{else}} class="panel-collapse collapse in" {{/ifCond}}>
  52. {{#ifCond labels.length "===" 0}}
  53. <div class="panel-body">
  54. <div class="row">
  55. <div class="col-md-12">
  56. {{#ifCond swapItem "===" true}}
  57. <select class="form-control" data-id="addLabelOptions" multiple="multiple"></select>
  58. {{else}}
  59. {{#ifCond readOnlyEntity "===" false}}
  60. <div class="badge-container">
  61. 还未添加标签。要添加标签,点击 <a href="javascript:void(0)" data-id="addLabels">这里</a>
  62. </div>
  63. {{/ifCond}}
  64. {{/ifCond}}
  65. </div>
  66. </div>
  67. </div>
  68. {{/ifCond}}
  69. </div>
  70. {{#ifCond labels.length ">" 0}}
  71. <div id={{div_2.id}} class="panel-collapse collapse in">
  72. <div class="panel-body">
  73. <div class="row">
  74. <div class="col-md-12">
  75. {{#ifCond swapItem "===" true}}
  76. <select class="form-control" data-id="addLabelOptions" multiple="multiple"></select>
  77. {{else}}
  78. <div class="badge-container">
  79. {{#each labels}}
  80. <label class="btn btn-action btn-sm btn-blue no-pointer">{{this}}</label>
  81. {{/each}}
  82. </div>
  83. {{/ifCond}}
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. {{/ifCond}}
  89. </div>
  90. </div>