1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/assets/templates/dashboard/projects.html.erb
2015-05-05 03:10:25 +02:00

81 lines
3.5 KiB
Plaintext

<div>
<section class="heading">
<div class="row no-gutter">
<ng-include src="'<%= asset_path 'dashboard/nav.html' %>'"></ng-include>
</div>
</section>
<div class="row no-gutter">
<div class="wrapper" ng-if="user.all_projects.length == 0">Vous n'avez aucun projet.</div>
<div class="widget panel b-a m m-t-lg" ng-repeat="project in user.all_projects">
<div class="panel-heading b-b clearfix">
<h4 class="text-u-c font-sbold pull-left">{{project.name}}</h4> <span class="m-l-sm label label-success text-white">{{project.author_id == currentUser.id ? 'Auteur' : 'Collaborateur'}}</span>
<div class="pull-right">
<a class="btn btn-warning bg-white b-2x rounded upper text-sm text-black" ui-sref="app.public.projects_show({id:project.slug})" role="button">Consulter</a>
</div>
</div>
<div class="widget-content bg-light clearfix">
<div class="col-sm-12 col-md-4 col-lg-4">
<div class="widget panel b-a r-n m-t-md">
<div class="panel-heading b-b small">
<h3>Description</h3>
</div>
<div class="widget-content no-bg wrapper text-black-light">
<!-- TODO -->
<!-- <div class="text-sm font-sbold "><i>Par {{project.author.first_name}}</i></div>
<small class="text-xs m-b"><i>posté le {{project.created_at | amDateFormat: 'Do MMMM YYYY'}}</i></small> -->
<div ng-bind-html="project.description | humanize : 180 | toTrusted"></div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-4 col-lg-4">
<div class="widget panel b-a r-n m-t-md">
<div class="panel-heading b-b small">
<h3>Machines et matériaux</h3>
</div>
<div class="widget-content no-bg wrapper">
<h3 class="text-black-light font-sbold"><i class="fa fa-rocket red"></i> Machines :</h3>
<ul class="list-unstyled m-l-md text-black-light">
<li ng-repeat="m in project.machines">{{m.name}}</li>
</ul>
<h3 class="text-black-light font-sbold"><i class="fa fa-cog red"></i> Matériaux :</h3>
<ul class="list-unstyled m-l-md text-black-light">
<li ng-repeat="c in project.components">{{c.name}}</li>
</ul>
</div>
</div>
</div>
<div class="col-sm-12 col-md-4 col-lg-4">
<div class="widget panel b-a r-n m-t-md">
<div class="panel-heading b-b small">
<h3>Les collaborateurs</h3>
</div>
<div class="widget-content list-group-lg no-bg auto wrapper">
<li class="list-group-item no-b clearfix" ng-repeat="collaborator in project.project_users">
<span class="pull-left thumb-sm avatar m-r-lg">
<fab-user-avatar ng-model="collaborator.user_avatar" avatar-class="thumb-50"></fab-user-avatar>
<i class="on b-white bottom" ng-if="collaborator.is_valid"></i>
<i class="off b-white bottom" ng-if="!collaborator.is_valid"></i>
</span>
<span class="clear"><span>{{collaborator.full_name}}</span>
<small class="text-muted clear text-ellipsis text-c">{{collaborator.username}}</small>
</span>
</li>
</div>
</div>
</div>
</div>
</div>
</div>
</div>