Lorem ipsum dolor sit amet, an qui alia constituam. Forensibus scripserit pri at, sit et dolorum ancillae. Ad sea quas utamur salutandi, illud veritus propriae mea ut. Ius no timeam intellegat liberavisse, eum suscipit pertinax ad. Illum graeci postulant et pro, at clita facete quo, cibo liber ad pri.
+
+
-
+
-
+ {{::($index+1)}}º
+ Lugar
+
+
+
-
+
- + + +
1º
-
-
diff --git a/src/app/components/proposal-related/proposal-related.directive.js b/src/app/components/proposal-related/proposal-related.directive.js
index e69de29..7329bb0 100644
--- a/src/app/components/proposal-related/proposal-related.directive.js
+++ b/src/app/components/proposal-related/proposal-related.directive.js
@@ -0,0 +1,100 @@
+(function() {
+ 'use strict';
+
+ angular
+ .module('dialoga')
+ .directive('proposalRelated', proposalRelated);
+
+ /** @ngInject */
+ function proposalRelated() {
+
+ /** @ngInject */
+ function ProposalRelatedController(ArticleService, $scope, $element, $timeout, $log) {
+ $log.debug('ProposalRelatedController');
+
+ var vm = this;
+ vm.ArticleService = ArticleService;
+ vm.$scope = $scope;
+ vm.$element = $element;
+ vm.$timeout = $timeout;
+ vm.$log = $log;
+
+ vm.init();
+ }
+
+ ProposalRelatedController.prototype.init = function () {
+ // initial values
+ var vm = this;
+
+ vm.activeIndex = 1;
+ vm.loading = false;
+
+ if(angular.isDefined(vm.limit) && angular.isString(vm.limit)){
+ vm.limit = parseInt(vm.limit);
+ }else{
+ vm.limit = 3;
+ }
+
+ vm.loadData();
+ };
+
+ ProposalRelatedController.prototype.loadData = function () {
+ // async values
+ var vm = this;
+
+ vm.loading = true;
+
+ // simulate delay
+ vm.$timeout(function(){
+ vm.loading = false;
+
+ // Fake Data
+ // vm.proposals = vm.ArticleService.getProposals();
+ vm.proposals = [{
+ id: 4159,
+ abstract: 'Ut odio unde porro in. Aut fuga magni adipisci. Recusandae ipsum distinctio omnis ut illum.',
+ effective_support: 0.1572052401746725,
+ hits: 4159,
+ votes_against: 3779,
+ votes_for: 1780
+ },{
+ id: 935,
+ abstract: 'Magni sunt ut molestiae. A porro et quod saepe placeat amet nihil. Aut ut id voluptatem doloribus quia.',
+ effective_support: 0.1572052401746725,
+ hits: 8602,
+ votes_against: 7005,
+ votes_for: 8728
+ },{
+ id: 1008,
+ abstract: 'Cum quas assumenda nihil delectus eos. Minus fugit velit voluptatem nisi nam esse ut id.',
+ effective_support: 0.1572052401746725,
+ hits: 9181,
+ votes_against: 612,
+ votes_for: 1786
+ }];
+
+ if(vm.display === 'list'){
+ // wait until DOM be created
+ vm.$timeout(function(){
+ attachPopover.call(vm);
+ }, 20);
+ }
+ }, 2000);
+ };
+
+ var directive = {
+ restrict: 'E',
+ templateUrl: 'app/components/proposal-related/proposal-related.html',
+ scope: {
+ article: '='
+ },
+ controller: ProposalRelatedController,
+ controllerAs: 'vm',
+ bindToController: true
+ };
+
+
+ return directive;
+ }
+
+})();
diff --git a/src/app/components/proposal-related/proposal-related.html b/src/app/components/proposal-related/proposal-related.html
index e69de29..f04764e 100644
--- a/src/app/components/proposal-related/proposal-related.html
+++ b/src/app/components/proposal-related/proposal-related.html
@@ -0,0 +1,3 @@
+
--
libgit2 0.21.2