158 lines
4.0 KiB
Plaintext
158 lines
4.0 KiB
Plaintext
.right
|
|
= link_to "retour", admin_contacts_path(), :class => "btn btn-primary"
|
|
= link_to ic(:pencil)+" modifier / attribuer la fiche", edit_admin_contact_path(@contact), :remote => true, :class => "btn btn-warning"
|
|
%br
|
|
%br
|
|
#show=render :partial => "show"
|
|
|
|
|
|
|
|
|
|
|
|
%h2 Fichiers
|
|
|
|
|
|
%form#fileupload{:action => admin_contact_files_path(:contact_id => @contact.id ),:method=>"POST", :enctype=>"multipart/form-data", :style => "display:inline;"}
|
|
%input{:name => "redirect", :type => "hidden", :value => "/"}/
|
|
|
|
|
|
|
|
.fileupload-progress.fade{:style => "float:left;"}
|
|
#upload_details{:style => ""}
|
|
.content
|
|
.fileupload-buttonbar
|
|
%button.btn.btn-warning.cancel{:type => "reset"}
|
|
%i.icon-ban-circle.icon-white
|
|
%span Cancel upload
|
|
%span.fileupload-loading
|
|
|
|
%table.table.table-striped{:role => "presentation"}
|
|
%tbody.ulpoad_files
|
|
|
|
|
|
|
|
.progress-extended{:style => "float:left;padding: 10px;font-size:14px;line-height:20px;"}
|
|
|
|
|
|
.progress.progress-success.progress-striped.active{"aria-valuemax" => "100", "aria-valuemin" => "0", :role => "progressbar",:style => "width:200px;float:left;margin: 10px;height:20px;"}
|
|
.bar{:style => "width:0%;"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.right
|
|
%a.btn.btn-primary{:href => "#", :onclick => "$(this).next('input').click();"}
|
|
%span.fileinput-button{}
|
|
%i.icon-plus.icon-white
|
|
%span Ajouter des fichiers
|
|
%input{:multiple => "", :name => "files[]", :type => "file", :style => "display:none;"}
|
|
%br
|
|
%br
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:plain
|
|
<!-- The template to display files available for upload -->
|
|
<script id="template-upload" type="text/x-tmpl">
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
<tr class="template-upload fade">
|
|
<td>
|
|
<span class="preview"></span>
|
|
</td>
|
|
<td>
|
|
<p class="name">{%=file.name%}</p>
|
|
{% if (file.error) { %}
|
|
<div><span class="label label-important">Error</span> {%=file.error%}</div>
|
|
{% } %}
|
|
</td>
|
|
<td>
|
|
<p class="size">{%=o.formatFileSize(file.size)%}</p>
|
|
{% if (!o.files.error) { %}
|
|
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div>
|
|
{% } %}
|
|
</td>
|
|
<td>
|
|
{% if (!o.files.error && !i && !o.options.autoUpload) { %}
|
|
<button class="btn btn-primary start">
|
|
<i class="icon-upload icon-white"></i>
|
|
<span>Start</span>
|
|
</button>
|
|
{% } %}
|
|
{% if (!i) { %}
|
|
<button class="btn btn-warning cancel">
|
|
<i class="icon-ban-circle icon-white"></i>
|
|
<span>Cancel</span>
|
|
</button>
|
|
{% } %}
|
|
</td>
|
|
</tr>
|
|
{% } %}
|
|
</script>
|
|
<!-- The template to display files available for download -->
|
|
<script id="template-download" type="text/x-tmpl">
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
<tr class="template-download fade", :style => "display:none;">
|
|
|
|
</tr>
|
|
{% } %}
|
|
</script>
|
|
|
|
|
|
|
|
|
|
:coffeescript
|
|
$('#fileupload').fileupload({
|
|
paramName:"files",
|
|
dataType:"script",
|
|
autoUpload:true,
|
|
filesContainer:".ulpoad_files"
|
|
|
|
}).bind('fileuploadadded',(e, data)->
|
|
$("#upload_details").show();
|
|
).bind('fileuploadfinished',(e, data)->
|
|
$("#upload_details").hide();
|
|
)
|
|
|
|
|
|
.clear
|
|
%br
|
|
%br
|
|
%table#contact_files.table.table-stripped{:style => "width:100%;"}
|
|
=render @contact.contact_files
|
|
%br
|
|
%br
|
|
|
|
|
|
|
|
= link_to 'Ajouter une action', new_admin_contact_action_path(:contact_id => @contact.id, :test => "test"), :class => "btn btn-success", :style => "float:right;", :remote => true
|
|
|
|
%h2 Interactions
|
|
|
|
|
|
#contact_actions
|
|
=render @contact_actions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|