--- /dev/null
+<div class='card card-xl' ng-class='{active: focus.full_name == definition.full_name}'>
+ <div class='card-body'>
+ <h5 class='text-muted'>
+ <span ng-if='definition.is_intro'>
+ <span class='glyphicon glyphicon-plus' /> Introduction</span>
+ </span>
+ <span ng-if='!definition.is_intro'>
+ <span class='glyphicon glyphicon-asterisk' /> Redefinition</span>
+ </span>
+ <span ng-if='definition.mclass'>
+ of <entity-link mentity='definition.mclass' />
+ </span>
+ <span ng-if='definition.mproperty'>
+ of <entity-link mentity='definition.mproperty' />
+ </span>
+ <span ng-if='definition.mclassdef'>
+ in <entity-link mentity='definition.mmodule' />
+ :: <entity-link mentity='definition.mclassdef' />
+ </span>
+ <span ng-if='!definition.mclassdef'>
+ in <entity-link mentity='definition.mmodule' />
+ </span>
+ </h5>
+ <entity-location mentity='definition' />
+ </div>
+</div>
--- /dev/null
+<div class='entity-list' ng-if='listEntities.length'>
+ <h3>{{listTitle}}</h3>
+ <div class='card-list'>
+ <div ng-repeat='def in listEntities'>
+ <entity-def definition='def' focus='listFocus' />
+ <h4 ng-if='!$last' class='text-muted text-center'>
+ <span class='glyphicon glyphicon-chevron-up'></span>
+ </h4>
+ </div>
+ </div>
+</div>
}
};
})
+
+ .directive('entityLinearization', function() {
+ return {
+ restrict: 'E',
+ scope: {
+ listEntities: '=',
+ listTitle: '@',
+ listFocus: '='
+ },
+ templateUrl: '/directives/entity/linearization.html'
+ };
+ })
+
+ .directive('entityDef', ['Model', function(Model, Code) {
+ return {
+ restrict: 'E',
+ scope: {
+ definition: '=',
+ focus: '='
+ },
+ link: function ($scope, element, attrs) {
+ $scope.$watch("definition", function() {
+ /*.loadEntityDefs($scope.definition.full_name,
+ function(data) {
+ $scope.mentity = data;
+ }, function(err) {
+ $scope.error = err;
+ });
+ Model.loadEntityCode($scope.definition.full_name,
+ function(data) {
+ $scope.code = data;
+ }, function(err) {
+ $scope.error = err;
+ });*/
+ });
+ },
+ templateUrl: '/directives/entity/defcard.html'
+ };
+ }])
})();