Sha256: 02614043e3117c6930728fea7ae5a879e66ad9eb26f77c9567a7e28b4d0b0cd7

Contents?: true

Size: 1.77 KB

Versions: 65

Compression:

Stored size: 1.77 KB

Contents

<script type="text/ng-template" id="promethee/components/collection/edit/inspect">
  <b>Desktop</b>
  <div class="form-group">
    <label class="label-control">Items per line: {{promethee.inspected.attributes.items_per_line}}</label>
    <input ng-model="promethee.inspected.attributes.items_per_line" type="range" min="2" max="12">
  </div>

  <div ui-sortable ng-model="promethee.inspected.children">
    <div
      class="panel panel-default"
      ng-repeat="component in promethee.inspected.children"
    >
      <div class="panel-body">
        <div class="row">
          <div class="col-xs-9">
            <span class="label label-default">#{{$index + 1}}</span>
            <span class="label label-info">{{component.type}}</span>
          </div>
          <div class="col-xs-3">
            <ng-include src="'promethee/move/component'"></ng-include>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="pull-right btn-toolbar" ng-controller="CollectionInspectorController">
    <span ng-repeat="definition in itemDefinitions" class="btn btn-default" ng-click="addItem(definition)">Add {{definition.name}}</span>
  </div>
</script>

<script>
  promethee.controller('CollectionInspectorController', ['$scope', 'identifier', function($scope, identifier) {
    var availableComponents = ['image', 'video'];

    $scope.itemDefinitions = $scope.promethee.definitions.filter(function(definition) {
      return availableComponents.includes(definition.data.type);
    });

    var clone = function(object) {
      return JSON.parse(JSON.stringify(object));
    }

    $scope.addItem = function(definition) {
      var item = JSON.parse(JSON.stringify(definition.data));
      item.id = identifier.generate();

      $scope.promethee.inspected.children.push(item);
    }
  }])
</script>

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
promethee-1.6.10 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.8 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.7 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.6 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.5 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.4 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.3 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.2 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.1 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.6.0 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.5.4 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.5.3 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.5.2 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.5.0 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.29 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.28 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.27 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.26 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.25 app/views/promethee/components/collection/_edit.inspect.html.erb
promethee-1.4.24 app/views/promethee/components/collection/_edit.inspect.html.erb