EntityUserDefineView_tmpl.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 userDefinePanel" data-id="userDefine" style="position:relative;">
  19. {{#ifCond customAttibutes.length "===" 0}}
  20. <div class="panel-heading" data-toggle="collapse" href={{divId_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="折叠"><i class="ec-icon fa"></i></button>
  26. </div>
  27. </div>
  28. {{else}}
  29. <div class="panel-heading" data-toggle="折叠" href={{divId_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="addAttr">
  42. {{#ifCond customAttibutes.length "===" 0}} 添加 {{else}} 编辑 {{/ifCond}}
  43. </button>
  44. {{/ifCond}}
  45. {{#ifCond saveAttrItems "===" true}}
  46. <button class="btn btn-action btn-sm" data-id="saveAttrItems">保存</button>
  47. <button class="btn btn-action btn-sm" data-id="cancel">取消</button>
  48. {{/ifCond}}
  49. </div>
  50. {{/ifCond}}
  51. <div id={{divId_1.id}} {{#ifCond swapItem "===" false}} class="panel-collapse collapse" {{else}} class="panel-collapse collapse in" {{/ifCond}}>
  52. {{#ifCond customAttibutes.length "===" 0}}
  53. <div class="panel-body">
  54. <div class="row">
  55. <div class="col-md-12">
  56. {{#ifCond swapItem "===" true}}
  57. <div id="r_entityUserDefinedItemView"></div>
  58. {{else}}
  59. {{#ifCond readOnlyEntity "===" false}}
  60. 还没有添加特性。要添加特性,点击 <a href="javascript:void(0)" data-id="addItem">这里</a>
  61. {{/ifCond}}
  62. </div>
  63. {{/ifCond}}
  64. </div>
  65. </div>
  66. </div>
  67. {{/ifCond}}
  68. </div>
  69. {{#ifCond customAttibutes.length ">" 0}}
  70. <div id={{divId_2.id}} class="panel-collapse collapse in">
  71. <div class="panel-body">
  72. <div class="row">
  73. <div class="col-md-12">
  74. {{#ifCond swapItem "===" true}}
  75. <div id="r_entityUserDefinedItemView"></div>
  76. {{else}}
  77. <div class="entity-detail-table">
  78. <table class="table bold-key">
  79. <tbody>
  80. {{#each customAttibutes}}
  81. <tr>
  82. <td>
  83. <div class="scroll-y">{{key}}</div>
  84. </div>
  85. </td>
  86. <td>
  87. <div class="scroll-y">{{value}}</div>
  88. </td>
  89. </tr>
  90. {{/each}}
  91. </tbody>
  92. </table>
  93. </div>
  94. {{/ifCond}}
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. {{/ifCond}}
  100. </div>
  101. </div>