Skip to content

Commit 2b53263

Browse files
committed
Fix styling to match other PR
1 parent 47b1e0a commit 2b53263

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

app/views/partners/_documents.html.erb

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,17 @@
22
<div class="card-header">
33
<h2 class="card-title fs-3">Documents</h2>
44
</div>
5-
<div class="card-body p-0">
6-
<div class="tab-content" id="custom-tabs-three-tabContent">
7-
<table class="table">
8-
<thead>
9-
<tr>
10-
<th>Filename</th>
11-
<th></th>
12-
</tr>
13-
</thead>
14-
<tbody>
15-
<% partner.documents.each do |document| %>
16-
<tr>
17-
<td><%= link_to document.filename, rails_blob_path(document, disposition: "attachment") %></td>
18-
<td><%= delete_button_to attachment_path(document), { size: "md", confirm: "Are you sure you want to permanently remove this document?" } %>
19-
</tr>
20-
<% end %>
21-
</tbody>
22-
</table>
23-
</div><!-- /.box-body.table-responsive -->
5+
<div class="card-body p-3">
6+
<ul class="list-unstyled">
7+
<% partner.documents.each do |doc| %>
8+
<% if doc.persisted? %>
9+
<li class="attached-document d-flex justify-content-between align-items-center p-2 border rounded mb-2" data-document-id="<%= doc.signed_id %>">
10+
<%= link_to doc.blob.filename.to_s, rails_blob_path(doc), class: "font-weight-bold w-75 text-truncate" %>
11+
<%= delete_button_to attachment_path(doc), { text: "Remove", size: "md", confirm: "Are you sure you want to permanently remove this document?" } %>
12+
</li>
13+
<% end %>
14+
<% end %>
15+
</ul>
2416
</div>
2517
<!-- /.card-body -->
2618
<div class="card-footer">

app/views/partners/_form.html.erb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@
4848
<% end %>
4949
<%= f.input :documents, label: "Documents", wrapper: :input_group do %>
5050
<% if @partner.documents.present? %>
51-
<ul class="list-unstyled">
52-
<% @partner.documents.each do |document| %>
53-
<li>
54-
<%= link_to document.blob['filename'], rails_blob_path(document), disposition: "attachment", class: "p1-1" %>
55-
<%= delete_button_to attachment_path(document), { text: "", confirm: "Are you sure you want to permanently remove this document?" } %>
56-
</li>
51+
<ul class="list-unstyled w-100">
52+
<% @partner.documents.each do |doc| %>
53+
<% if doc.persisted? %>
54+
<li class="attached-document d-flex justify-content-between align-items-center p-2 border rounded mb-2" data-document-id="<%= doc.signed_id %>">
55+
<%= link_to doc.blob.filename.to_s, rails_blob_path(doc), class: "font-weight-bold w-75 text-truncate" %>
56+
<%= delete_button_to attachment_path(doc), { text: "Remove", size: "md", confirm: "Are you sure you want to permanently remove this document?" } %>
57+
</li>
58+
<% end %>
5759
<% end %>
5860
</ul>
5961
<% end %>

0 commit comments

Comments
 (0)