Changed style button. Add margin top progress bar.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
1be9d40fff
commit
a32849c79b
@@ -44,17 +44,17 @@
|
||||
method: :delete,
|
||||
remote: true,
|
||||
data: { confirm: t('documents.actions.destroy.confirm') },
|
||||
class: "button hollow alert" if document.persisted? %>
|
||||
class: "delete float-right" if document.persisted? %>
|
||||
<% elsif !document.persisted? && document.cached_attachment.present? %>
|
||||
<%= link_to t('documents.form.delete_button'), destroy_upload_documents_path(path: document.cached_attachment, index: index, documentable_type: document.documentable_type, documentable_id: document.documentable_id),
|
||||
method: :delete,
|
||||
remote: true,
|
||||
class: "button hollow alert" %>
|
||||
class: "delete float-right" %>
|
||||
<% else %>
|
||||
<%= label_tag document_nested_field_id(document, index, :attachment),
|
||||
t("documents.form.attachment_label"),
|
||||
class: "button hollow #{"error" if document.errors[:attachment].any?}" %>
|
||||
<%= link_to t('documents.form.delete_button'), "#", class: "button hollow alert remove-document" %>
|
||||
<%= link_to t('documents.form.delete_button'), "#", class: "delete float-right remove-document" %>
|
||||
<% if document.errors[:attachment].any? %>
|
||||
<br>
|
||||
<small class="error"><%= document.errors[:attachment].join(", ") %></small>
|
||||
@@ -65,4 +65,4 @@
|
||||
<div class="progress-bar-placeholder"><div class="loading-bar"></div></div>
|
||||
<p class="file-name"><%= document_attachment_file_name(document) %></p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
<%= link_to t("documents.form.add_new_document"),
|
||||
new_nested_documents_path(documentable_type: resource.class.name, index: resource.documents.size),
|
||||
remote: true,
|
||||
id: "new_document_link" %>
|
||||
id: "new_document_link",
|
||||
class: "button hollow" %>
|
||||
<div class="max-documents-notice callout warning text-center hide">
|
||||
<%= t "documents.max_documents_allowed_reached_html" %>
|
||||
</div>
|
||||
@@ -21,4 +22,4 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
|
||||
@@ -2,5 +2,6 @@ App.Documentable.destroy("<%= document_nested_field_wrapper_id(params[:index]) %
|
||||
<% new_document_link = link_to t("documents.form.add_new_document"),
|
||||
new_document_path(documentable_type: @document.documentable_type, index: params[:index]),
|
||||
remote: true,
|
||||
id: "new_document_link" %>
|
||||
App.Documentable.updateNewDocumentButton("<%= j new_document_link %>")
|
||||
id: "new_document_link",
|
||||
class: "button hollow" %>
|
||||
App.Documentable.updateNewDocumentButton("<%= j new_document_link %>")
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
new_document_link = link_to t("documents.form.add_new_document"),
|
||||
new_nested_documents_path(documentable_type: params[:documentable_type], index: params[:index].to_i + 1),
|
||||
remote: true,
|
||||
id: "new_document_link"
|
||||
id: "new_document_link",
|
||||
class: "button hollow"
|
||||
%>
|
||||
App.Documentable.new("<%= j nested_fields %>")
|
||||
App.Documentable.updateNewDocumentButton("<%= j new_document_link %>")
|
||||
App.Documentable.updateNewDocumentButton("<%= j new_document_link %>")
|
||||
|
||||
Reference in New Issue
Block a user