Skip to content

Commit

Permalink
Merge pull request #2628 from manyfold3d/hide-sharing-in-single-user-…
Browse files Browse the repository at this point in the history
…mode

Don't show sharing settings in single-user mode
  • Loading branch information
Floppy authored Sep 5, 2024
2 parents 72704a1 + d9308bc commit e657d14
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions app/views/application/_caber_relations_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<div class="row mb-3">
<div class="col col-auto">
<%= t(".permissions") %>
</div>
<div class="col border p-3">
<%= cocooned_container id: "cocooned-caber-relations" do %>
<%= form.fields_for :caber_relations do |f| %>
<%= render "caber_relation_fields", f: f %>
<% end %>
<% end %>
<div class="row">
<%= tag.div class: "col-auto offset-sm-2 ps-0" do %>
<%= cocooned_add_item_button t(".add"), form, :caber_relations,
class: "btn btn-secondary",
insertion_node: "#cocooned-caber-relations",
insertion_method: "append" %>
<%- if SiteSettings.multiuser_enabled? %>
<div class="row mb-3">
<div class="col col-auto">
<%= t(".permissions") %>
</div>
<div class="col border p-3">
<%= cocooned_container id: "cocooned-caber-relations" do %>
<%= form.fields_for :caber_relations do |f| %>
<%= render "caber_relation_fields", f: f %>
<% end %>
<% end %>
<div class="row">
<%= tag.div class: "col-auto offset-sm-2 ps-0" do %>
<%= cocooned_add_item_button t(".add"), form, :caber_relations,
class: "btn btn-secondary",
insertion_node: "#cocooned-caber-relations",
insertion_method: "append" %>
<% end %>
</div>
</div>
<datalist id="caber-relations-role-list">
<option value="role::member" label="<%= translate "application.caber_relation_fields.subject.role.member" %>"></option>
<option value="role::public"><%= translate "application.caber_relation_fields.subject.role.public" %></option>
</datalist>
</div>
<datalist id="caber-relations-role-list">
<option value="role::member" label="<%= translate "application.caber_relation_fields.subject.role.member" %>"></option>
<option value="role::public"><%= translate "application.caber_relation_fields.subject.role.public" %></option>
</datalist>
</div>
<%- end %>

0 comments on commit e657d14

Please sign in to comment.