mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Merge branch 'dev'
This commit is contained in:
commit
1e5b5ae0d4
@ -69,6 +69,7 @@ config(['$locationProvider', '$httpProvider', 'AuthProvider', "growlProvider", "
|
||||
|
||||
$rootScope.summernoteOpts = {
|
||||
lang: 'fr-FR',
|
||||
height: 200,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
|
@ -1,4 +1,10 @@
|
||||
|
||||
//summernote
|
||||
|
||||
.note-editor .note-editable {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
// Growl
|
||||
.growl {
|
||||
top: 90px;
|
||||
|
@ -77,8 +77,8 @@
|
||||
<span class="label label-warning m-t m-b">Étape {{ $index+1 }}/{{project.project_steps_attributes.length}}</span>
|
||||
<input type="hidden" name="project[project_steps_attributes][][id]" ng-value="step.id" />
|
||||
<input type="hidden" name="project[project_steps_attributes][][_destroy]" ng-value="step._destroy" />
|
||||
<!-- <input ng-model="step.title" type="text" name="project[project_steps_attributes][][title]" class="form-control m-b-sm m-t-xs" placeholder="Titre de l'étape" required>
|
||||
<textarea name="project[project_steps_attributes][][description]" ng-model="step.description" class="m-b-sm form-control" placeholder="" rows="8" redactor></textarea> -->
|
||||
<input ng-model="step.title" type="text" name="project[project_steps_attributes][][title]" class="form-control m-b-sm m-t-xs" placeholder="Titre de l'étape" required>
|
||||
|
||||
|
||||
<input type="hidden" name="project[project_steps_attributes][][description]" ng-value="step.description" />
|
||||
<summernote ng-model="step.description" placeholder="" config="summernoteOpts" name=project[project_steps_attributes][][description] required></summernote>
|
||||
|
@ -40,22 +40,22 @@
|
||||
<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">Étape {{$index+1}} : {{step.title}}</h3>
|
||||
</div>
|
||||
</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="wrapper-lg">
|
||||
<div class="wrapper-lg">
|
||||
<dir-disqus disqus-shortname="<%= Rails.application.secrets.disqus_shortname %>"
|
||||
disqus-identifier="project_{{ project.id }}"
|
||||
disqus-url="{{ project_url }}"
|
||||
@ -64,7 +64,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-3">
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
<div><a class="text-sm font-sbold" ui-sref="app.logged.members_show({id: project.author.slug})"><i>Par {{project.author.first_name}}</i></a></div>
|
||||
<small class="text-xs m-b"><i>posté le {{project.created_at | amDateFormat: 'Do MMMM YYYY'}}</i></small>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<section class="widget panel b-a m" ng-if="project.project_caos_attributes">
|
||||
@ -83,8 +83,8 @@
|
||||
<span class="badge bg-warning pull-right">{{project.project_caos_attributes.length}}</span>
|
||||
<h3>Fichier CAO à télécharger</h3>
|
||||
</div>
|
||||
|
||||
<ul class="widget-content list-group list-group-lg no-bg auto">
|
||||
|
||||
<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>
|
||||
@ -96,14 +96,14 @@
|
||||
<span class="badge bg-warning pull-right">{{project.machines.length}}</span>
|
||||
<h3>Machines et matériaux</h3>
|
||||
</div>
|
||||
|
||||
<ul class="widget-content list-group list-group-lg no-bg auto">
|
||||
|
||||
<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">
|
||||
<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>
|
||||
@ -115,8 +115,8 @@
|
||||
<span class="badge bg-warning pull-right">{{project.project_users.length}}</span>
|
||||
<h3>Les collaborateurs</h3>
|
||||
</div>
|
||||
|
||||
<ul class="widget-content list-group list-group-lg no-bg auto">
|
||||
|
||||
<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>
|
||||
@ -132,9 +132,15 @@
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="widget panel b-a m" ng-if="project.licence">
|
||||
<div class="panel-heading b-b">
|
||||
<h3>Licence</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ project.licence.name }}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ class Project < ActiveRecord::Base
|
||||
has_one :project_image, as: :viewable, dependent: :destroy
|
||||
accepts_nested_attributes_for :project_image, allow_destroy: true
|
||||
has_many :project_caos, as: :viewable, dependent: :destroy
|
||||
accepts_nested_attributes_for :project_caos, allow_destroy: true
|
||||
accepts_nested_attributes_for :project_caos, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
has_and_belongs_to_many :machines, join_table: :projects_machines
|
||||
has_and_belongs_to_many :components, join_table: :projects_components
|
||||
|
@ -54,3 +54,6 @@ json.project_steps_attributes @project.project_steps.order('project_steps.create
|
||||
json.project_step_image_url s.project_step_image.attachment_url if s.project_step_image
|
||||
end
|
||||
json.state @project.state
|
||||
json.licence do
|
||||
json.name @project.licence.name
|
||||
end if @project.licence.present?
|
||||
|
@ -20,10 +20,10 @@ test:
|
||||
|
||||
staging:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
disqus_shortname: <%= ENV["DISQUS_SHORTNAME"] %>
|
||||
disqus_shortname: fabmanager-staging
|
||||
|
||||
# Do not keep production secrets in the repository,
|
||||
# instead read values from the environment.
|
||||
production:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
disqus_shortname: <%= ENV["DISQUS_SHORTNAME"] %>
|
||||
disqus_shortname: fabmanager-production
|
||||
|
826
vendor/assets/stylesheets/redactor.css
vendored
826
vendor/assets/stylesheets/redactor.css
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user