Ajout du code pour affichage publication et livrables sur fiche projet vitrine

parent 858395e5
Pipeline #35871 passed with stage
in 56 seconds
......@@ -97,6 +97,26 @@
</div>
</div>
</div>
<!-- Articles Publications -->
<div class="row">
<h4 class="showcasetitlecategory">Publications</h4>
<div ng-reapeat="article in showcaseCtrl.articles">
<article class="post post-large">
<div class="post-content" style="margin-bottom: 15px;border-bottom: solid 1px lightgray; padding-bottom: 5px;">
<h5>{{articles.title}}</h5>
<p> {{articles.shortDescription}} </p>
<div class="post-meta">
<span><i class="fa fa-user"></i> Par <span class="article-author">{{articles.authorFN}} {{articles.authorLN}}</span></span>
</div>
</div>
</article>
</div>
</div>
<div class="row">
<h4 class="showcasetitlecategory">Organisations</h4>
......
......@@ -2,7 +2,7 @@
/* Controllers */
root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams','$rightFactory','$languageFactory', '$projectFactory', '$userFactory', '$portfolioManagerFactory', '$deliverableFactory', '$fileFactory', function($scope, $state, $http,$stateParams,$rightFactory,$languageFactory, $projectFactory, $userFactory, $portfolioManagerFactory, $deliverableFactory, $fileFactory) {
root.controller('ProjectShowcaseCtrl', ['$scope','$blogFactory', '$state','$http','$stateParams','$rightFactory','$languageFactory', '$projectFactory', '$userFactory', '$portfolioManagerFactory', '$deliverableFactory', '$fileFactory', function($scope, $blogFactory, $state, $http,$stateParams,$rightFactory,$languageFactory, $projectFactory, $userFactory, $portfolioManagerFactory, $deliverableFactory, $fileFactory) {
var showcaseCtrl=this;
showcaseCtrl.session = null;
......@@ -18,6 +18,7 @@ root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams
showcaseCtrl.badges = [];
showcaseCtrl.rawDeliverables = [];
showcaseCtrl.deliverables = [];
showcaseCtrl.articles = [];
showcaseCtrl.plots = {};
showcaseCtrl.plots.labels = [];
......@@ -43,7 +44,9 @@ root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams
showcaseCtrl.currentProject =data.details[0];
showcaseCtrl.getProjectDetails(true,$scope._getProject());
showcaseCtrl.getMembers();
showcaseCtrl.getDelivrables();
showcaseCtrl.getDelivrables();
showcaseCtrl.getArticles(projectId);
console.error(showcaseCtrl);
}
});
......@@ -86,8 +89,16 @@ root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams
})
}
showcaseCtrl.getArticles = function (){
$blogFactory.getArticles($scope._getProject(), 0, 5, function(data){
if(data.status == "success"){
showcaseCtrl.articles = data.details;
}
})
}
showcaseCtrl.getDelivrables = function() {
$deliverableFactory.get_deliverable_getDeliverableRequestsByProject({projectId : $scope._getProject(), userId : $scope._getUser().id}).success(function(data, status, headers, config) {
$deliverableFactory.get_deliverable_getDeliverableRequestsByProject(({projectId : $scope._getProject(), userId : $scope._getUser().id}), function(data, status, headers, config) {
if(data.status == "success"){
showcaseCtrl.deliverables=data.details;
console.log("DELIV",showcaseCtrl.deliverables);
......@@ -107,7 +118,7 @@ root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams
if(data.status == "success" && data.details){
$scope._setProject(data.details.id,data.details.fullName,data.details.parent);
showcaseCtrl.parentProject = data.details.parent;
showcaseCtrl.getProjectPublic(true,data.details.id);
showcaseCtrl.getProjectPublic(true,data.details.id);
$scope._initMainMenu();
}
......@@ -194,7 +205,9 @@ root.controller('ProjectShowcaseCtrl', ['$scope', '$state','$http','$stateParams
}
showcaseCtrl.onReady();
showcaseCtrl.onReady();
$portfolioManagerFactory.onCloseModalPrompt($scope, function(param){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment