1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/assets/templates/projects/show.html.erb

158 lines
6.7 KiB
Plaintext

<div>
<section class="heading b-b">
<div class="row no-gutter">
<div class="col-xs-2 col-sm-2 col-md-1">
<section class="heading-btn">
<a href="#" ng-click="backPrevLocation($event)"><i class="fa fa-long-arrow-left "></i></a>
</section>
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l b-r-md">
<section class="heading-title">
<h1>{{ project.name }} <span class="badge" ng-if="project.state == 'draft'" translate>{{ 'rough_draft' }}</span></h1>
</section>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 b-t hide-b-md">
<section class="heading-actions wrapper">
<a ui-sref="app.logged.projects_edit({id: project.id})" ng-if="projectEditableBy(currentUser) || isAuthorized('admin')" class="btn btn-lg btn-warning bg-white b-2x rounded m-t-xs text-u-c text-sm"><i class="fa fa-edit"></i> {{ 'edit' | translate }}</a>
<a ng-click="deleteProject(event)" ng-if="projectDeletableBy(currentUser) || isAuthorized('admin')" class="btn btn-lg btn-danger b-2x rounded no-b m-t-xs"><i class="fa fa-trash-o"></i></a>
</section>
</div>
</div>
</section>
<div class="row no-gutter">
<div class="col-sm-12 col-md-12 col-lg-9 b-r-lg">
<div class="article wrapper-lg">
<div class="article-thumbnail" ng-if="project.project_image">
<a href="{{project.project_image}}" target="_blank"><img ng-src="{{project.project_image}}" alt="{{project.name}}" class="img-responsive"></a>
</div>
<h3 translate>{{ 'project_description' }}</h3>
<p ng-bind-html="project.description | toTrusted"></p>
<div class="article-steps">
<div class="row article-step m-b-lg" ng-repeat="step in project.project_steps_attributes">
<div class="col-md-12 m-b-xs">
<h3 class="well well-simple step-title">{{ 'step_N' | translate:{INDEX:step.step_nb} }} : {{step.title}}</h3>
</div>
<div class="col-md-4" ng-if="step.project_step_image">
<a href="{{step.project_step_image_url}}" target="_blank"><img class="img-responsive m-b" ng-src="{{step.project_step_image_url}}" alt="{{step.title}}" ></a>
</div>
<div class="col-md-8" ng-class="{'col-md-12' : step.project_step_image == undefined}">
<p ng-bind-html="step.description | toTrusted"></p>
</div>
</div>
</div>
</div>
<div class="text-center" id="social-share">
<a ng-href="{{shareOnFacebook()}}" target="_blank" class="btn btn-facebook btn-lg m-t"><i class="fa fa-facebook m-r"></i> {{ 'share_on_facebook' | translate }}</a>
<a ng-href="{{shareOnTwitter()}}" target="_blank" class="btn btn-twitter btn-lg m-t"><i class="fa fa-twitter m-r"></i> {{ 'share_on_twitter' | translate }}</a>
</div>
<div class="wrapper-lg">
<dir-disqus disqus-shortname="{{ disqusShortname }}" disqus-identifier="project_{{ project.id }}" disqus-url="{{ projectUrl }}" ready-to-bind="{{ project }}">
</dir-disqus>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-3">
<div class="text-center m-t-lg m-v">
<div class="thumb-lg m-b-xs">
<fab-user-avatar ng-model="project.author.user_avatar" avatar-class="thumb-50"></fab-user-avatar>
</div>
<div><a class="text-sm font-sbold" ui-sref="app.logged.members_show({id: project.author.slug})"><i> {{ 'by_name' | translate:{NAME:project.author.first_name} }}</i></a></div>
<small class="text-xs m-b"><i>{{ 'posted_on_' | translate }} {{project.created_at | amDateFormat: 'LL'}}</i></small>
</div>
<section class="widget panel b-a m" ng-if="project.project_caos_attributes">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.project_caos_attributes.length}}</span>
<h3 translate translate-values="{COUNT:project.project_caos_attributes.length}" translate-interpolation="messageformat">{{ 'CAD_file_to_download' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
<li ng-repeat="file in project.project_caos_attributes" class="list-group-item no-b clearfix">
<a target="_blank" ng-href="{{file.attachment_url}}" download="{{file.attachment_url}}"><i class="fa fa-arrow-circle-o-down"> </i> {{file.attachment | humanize : 25}}</a>
</li>
</ul>
</section>
<section class="widget panel b-a m" ng-if="project.machines">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.machines.length}}</span>
<h3 translate>{{ 'machines_and_materials' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
<li ng-repeat="machine in project.machines" class="list-group-item no-b clearfix">
<a ui-sref="app.public.machines_show({id: machine.id})">{{machine.name}}</a>
</li>
</ul>
<ul class="widget-content list-group list-group-lg no-bg auto">
<li ng-repeat="component in project.components" class="list-group-item no-b clearfix">
{{component.name}}
</li>
</ul>
</section>
<section class="widget panel b-a m" ng-if="project.project_users.length > 0">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.project_users.length}}</span>
<h3 translate>{{ 'collaborators' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
<li class="list-group-item no-b clearfix block-link" ng-repeat="collaborator in project.project_users" ui-sref="app.logged.members_show({id: collaborator.slug})">
<span class="pull-left thumb-sm avatar m-r">
<fab-user-avatar ng-model="collaborator.user_avatar" avatar-class="thumb-38"></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>
</ul>
</section>
<section class="widget panel b-a m" ng-if="project.licence">
<div class="panel-heading b-b">
<h3 translate>{{ 'licence' }}</h3>
</div>
<div class="panel-body">
{{ project.licence.name }}
</div>
</section>
<section class="widget b-t">
<div class="widget-content text-center m-t">
<a href="#" ng-click="signalAbuse($event)"><i class="fa fa-warning"></i> {{ 'report_an_abuse' | translate }}</a>
</div>
</section>
</div>
</div>
</div>