Sha256: c73d644a61f412ee44fc16c0094ff9e75d3469d34056c02470c249090a3dfdf9

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

<script type="text/ng-template" id="promethee/components/table/edit/move">
  <%= render 'promethee/edit/move_header', type: 'table' %>
      <div class="table-responsive" ng-controller="TableMoveController">
        <table class="table">
          <thead>
            <tr>
              <th ng-repeat="cellUid in component.attributes.structure.value[0]">
                <div ng-bind-html="getTableCell(cellUid).attributes.text.value | htmlSafe"></div>
              </th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="row in component.attributes.structure.value" ng-if="$index > 0">
              <td ng-repeat="cellUid in row">
                <div ng-bind-html="getTableCell(cellUid).attributes.text.value | htmlSafe"></div>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</script>

<script>
  promethee.controller('TableMoveController', ['$scope', 'uidService', function($scope, uidService) {
    $scope.getTableCell = function (uid) {
      return this.component.children.filter(function (childComponent) {
        return childComponent.id === uid;
      })[0];
    }
  }]);
</script>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
promethee-5.1.1 app/views/promethee/components/table/_edit_move.html.erb
promethee-5.1.0 app/views/promethee/components/table/_edit_move.html.erb
promethee-5.0.2 app/views/promethee/components/table/_edit_move.html.erb
promethee-5.0.1 app/views/promethee/components/table/_edit_move.html.erb
promethee-5.0.0 app/views/promethee/components/table/_edit_move.html.erb