-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #537 from richardlences/feature/remove_modal_from_…
…group_admin Remove modal from group admin
- Loading branch information
Showing
8 changed files
with
44 additions
and
48 deletions.
There are no files selected for viewing
73 changes: 33 additions & 40 deletions
73
app/components/admin/groups/group_form_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,43 @@ | ||
<%= tag.turbo_frame id: "modal" do %> | ||
<div class="fixed inset-0 z-40 p-2" role="dialog" aria-modal="true"> | ||
<div class="fixed inset-0 transition-opacity bg-gray-400 bg-opacity-75" aria-hidden="true"></div> | ||
<div class="relative flex items-center justify-center h-full"> | ||
<div class="flex flex-col justify-start items-start overflow-hidden rounded-lg bg-white border border-gray-300" style="box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.1);"> | ||
<div class="flex justify-start items-center self-stretch flex-grow-0 flex-shrink-0 overflow-hidden gap-4 p-6 border-t-0 border-r-0 border-b border-l-0 border-gray-200"> | ||
<div class="flex flex-col justify-start items-start flex-grow relative"> | ||
<p class="self-stretch flex-grow w-[521px] text-xl font-semibold text-left text-gray-900"><%= @group.name %></p> | ||
<p class="flex-grow-0 flex-shrink-0 text-xs text-left text-gray-500">Používatelia v skupine</p> | ||
</div> | ||
<%= render Common::CloseButtonComponent.new(link_to: admin_tenant_groups_path(Current.tenant)) %> | ||
</div> | ||
<div class="flex flex-col justify-start items-start self-stretch flex-grow-0 flex-shrink-0"> | ||
<% if !@readonly %> | ||
<%= form_with url: search_non_members_admin_tenant_group_path(Current.tenant, @group), | ||
<div class="w-full p-4 flex-col justify-start items-start gap-4 inline-flex"> | ||
<div class="self-stretch bg-white rounded-md border border-gray-200 flex-col justify-start items-start flex"> | ||
<div class="flex justify-start items-center self-stretch flex-grow-0 flex-shrink-0 overflow-hidden gap-4 p-6"> | ||
<div class="flex flex-col justify-start items-start flex-grow relative"> | ||
<p class="self-stretch flex-grow w-[521px] text-xl font-semibold text-left text-gray-900"><%= @group.name %></p> | ||
<p class="flex-grow-0 flex-shrink-0 text-xs text-left text-gray-500">Používatelia v skupine</p> | ||
</div> | ||
</div> | ||
<div class="flex flex-col justify-start items-start self-stretch flex-grow-0 flex-shrink-0"> | ||
<% if !@readonly %> | ||
<%= form_with url: search_non_members_admin_tenant_group_path(Current.tenant, @group), | ||
data: { controller: 'debounce', debounce_target: 'form'}, | ||
class: "flex justify-start items-center self-stretch flex-grow-0 flex-shrink-0 gap-4 p-6 border-t-0 border-r-0 border-b border-l-0 border-gray-200" do |form| %> | ||
<div class="flex w-full items-center rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600"> | ||
<div class="p-2"> | ||
<%= render Icons::MagnifyingGlassComponent.gray(size: "5") %> | ||
</div> | ||
<%= tag.turbo_frame id:'user-search-results' %> | ||
<%= form.search_field :name_search, value: params[:name_search], placeholder: "Vyhľadaj používateľa pre pridanie do skupiny", | ||
<div class="flex w-full items-center rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600"> | ||
<div class="p-2"> | ||
<%= render Icons::MagnifyingGlassComponent.gray(size: "5") %> | ||
</div> | ||
<%= tag.turbo_frame id:'user-search-results' %> | ||
<%= form.search_field :name_search, value: params[:name_search], placeholder: "Vyhľadaj používateľa pre pridanie do skupiny", | ||
data: { action: 'input->debounce#debounce' }, | ||
onreset: "this.form.requestSubmit()", | ||
class: "block w-full flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6" %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<div class="flex flex-col justify-start items-start self-stretch divide-y relative gap-2 p-2 border-t-0 border-r-0 border-b border-l-0 border-gray-200"> | ||
<% @group.group_memberships.each do |group_membership| %> | ||
<div class="self-stretch p-6 flex justify-start items-start gap-6"> | ||
<% if !@readonly %> | ||
<%= render Admin::Groups::MembersListRowComponent.new(group_membership) %> | ||
<% else %> | ||
<%= render Admin::Groups::MembersListRowViewOnlyComponent.new(group_membership) %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="flex justify-start items-start self-stretch flex-grow-0 flex-shrink-0 gap-2 p-6"> | ||
<%= link_to admin_tenant_groups_path(Current.tenant), data: { turbo_frame: "_top" }, class: "flex justify-center items-center flex-grow relative overflow-hidden gap-2.5 px-3.5 py-2.5 rounded-md bg-blue-600" do %> | ||
<p class="flex-grow-0 flex-shrink-0 text-base font-medium text-left text-white">Zatvoriť</p> | ||
<% end %> | ||
<% end %> | ||
<% if @group.group_memberships.any? %> | ||
<div class="flex flex-col justify-start items-start self-stretch divide-y relative gap-2 p-2 border-t-0 border-r-0 border-b border-l-0 border-gray-200"> | ||
<% @group.group_memberships.each do |group_membership| %> | ||
<div class="self-stretch p-6 flex justify-start items-start gap-6"> | ||
<% if !@readonly %> | ||
<%= render Admin::Groups::MembersListRowComponent.new(group_membership) %> | ||
<% else %> | ||
<%= render Admin::Groups::MembersListRowViewOnlyComponent.new(group_membership) %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<%= render Common::BlankResultsComponent.new(:group_users) %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters