Skip to content

Commit

Permalink
🥔✨ Agreements: List Agreements on Space#edit (#1367)
Browse files Browse the repository at this point in the history
- #1364

This doesn't link to the Agreements, but it gives me a hook to add in
the `#new`, `#edit` and `#destroy` bits in further PRs.
  • Loading branch information
zspencer authored Apr 16, 2023
1 parent 492dc22 commit 163010e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/views/spaces/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@

<p><%= link_to t('utilities.new.link_to'), space.location(:new, child: :utility) %></p>
</fieldset>

<fieldset>
<header>
<h3><%= t('space.agreements.index.link_to') %></h3>
<p class="text-sm italic"><%= t('space.agreements.help_text') %></p>
</header>
<div>
<%- space.agreements.each do |agreement| %>
<span class="flex justify-between w-full rounded border p-2 my-2 border-t-0 border-l-0">
<span class="grow"><%= agreement.name %></span>
</span>
<%- end %>
<div>
</fieldset>
6 changes: 6 additions & 0 deletions config/locales/agreement/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
en:
space:
agreements:
help_text: Such as Privacy Policies, Content Policies, Terms of Service, etc.
index:
link_to: "Agreements"

0 comments on commit 163010e

Please sign in to comment.