Update the directory structure for Admin Member View (#16608)
* feat: update the directory structure for partial * feat: update the current tab
This commit is contained in:
parent
29bb7b4e75
commit
32abc2160e
23 changed files with 22 additions and 22 deletions
|
|
@ -1,31 +1,31 @@
|
|||
<%# TODO: incorporate a tab component. For now you have to manually change the value %>
|
||||
<% current_tab = "overview" # overview|emails|notes|reports|flags %>
|
||||
<% if FeatureFlag.enabled?(:admin_member_view) %>
|
||||
<%= render "header" %>
|
||||
<%= render "navigation" %>
|
||||
<%= render "admin/users/show/profile" %>
|
||||
<%= render "admin/users/show/tabs" %>
|
||||
|
||||
<% if current_tab == 'overview' %>
|
||||
<div class="crayons-card p-3 s:p-4 m:p-7">
|
||||
<%= render "stats" if @user.registered %>
|
||||
<%= render "admin/users/show/overview/stats" if @user.registered %>
|
||||
|
||||
<div class="l:grid gap-8 grid-cols-2">
|
||||
<div>
|
||||
<section class="mb-7">
|
||||
<%= render "admin/users/widgets/roles" %>
|
||||
<%= render "admin/users/show/overview/roles" %>
|
||||
</section>
|
||||
|
||||
<section class="mb-7">
|
||||
<%= render "admin/users/widgets/tag_moderation" %>
|
||||
<%= render "admin/users/show/overview/tag_moderation" %>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<section class="mb-7">
|
||||
<%= render "admin/users/widgets/organizations" %>
|
||||
<%= render "admin/users/show/overview/organizations" %>
|
||||
</section>
|
||||
|
||||
<section class="mb-7">
|
||||
<%= render "admin/users/widgets/credits" %>
|
||||
<%= render "admin/users/show/overview/credits" %>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,29 +33,29 @@
|
|||
<% elsif current_tab == 'notes' %>
|
||||
<section class="flex flex-col m:flex-row gap-4">
|
||||
<div class="crayons-card p-3 s:p-4 m:p-7 flex-1">
|
||||
<%= render "admin/users/notes/form" %>
|
||||
<%= render "admin/users/show/notes/form" %>
|
||||
</div>
|
||||
<div class="crayons-card p-3 s:p-4 m:p-7 flex-1">
|
||||
<%= render "admin/users/notes/index" %>
|
||||
<%= render "admin/users/show/notes/index" %>
|
||||
</div>
|
||||
</section>
|
||||
<% elsif current_tab == 'emails' %>
|
||||
<%= render "admin/users/emails/verification" %>
|
||||
<%= render "admin/users/show/emails/verification" %>
|
||||
<section class="flex flex-col m:flex-row gap-4">
|
||||
<div class="crayons-card p-3 s:p-4 m:p-7 flex-1">
|
||||
<%= render "admin/users/emails/form" %>
|
||||
<%= render "admin/users/show/emails/form" %>
|
||||
</div>
|
||||
<div class="crayons-card p-3 s:p-4 m:p-7 flex-1">
|
||||
<%= render "admin/users/emails/index" %>
|
||||
<%= render "admin/users/show/emails/index" %>
|
||||
</div>
|
||||
</section>
|
||||
<% elsif current_tab == 'reports' %>
|
||||
<section class="crayons-card p-3 s:p-4 m:p-7">
|
||||
<%= render "admin/users/reports/index" %>
|
||||
<%= render "admin/users/show/reports/index" %>
|
||||
</section>
|
||||
<% elsif current_tab == 'flags' %>
|
||||
<section class="crayons-card p-3 s:p-4 m:p-7">
|
||||
<%= render "admin/users/flags/index" %>
|
||||
<%= render "admin/users/show/flags/index" %>
|
||||
</section>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
<h1 class="crayons-title lh-tight">
|
||||
<%= @user.name %>
|
||||
</h1>
|
||||
<%= render "status" %>
|
||||
<%= render "admin/users/show/profile/status" %>
|
||||
</div>
|
||||
<%= render "actions" %>
|
||||
<%= render "admin/users/show/profile/actions" %>
|
||||
</div>
|
||||
<div class="fs-s mb-1 color-secondary">
|
||||
@<%= @user.username %> <span class="opacity-50">•</span> ID <%= @user.id %> <span class="opacity-50">•</span>
|
||||
|
|
@ -34,10 +34,10 @@
|
|||
|
||||
<%# These are contents for modals %>
|
||||
<div class="hidden">
|
||||
<%= render "admin/users/actions/export" %>
|
||||
<%= render "admin/users/actions/merge" %>
|
||||
<%= render "admin/users/actions/unpublish" %>
|
||||
<%= render "admin/users/actions/social_accounts" %>
|
||||
<%= render "admin/users/actions/banish" %>
|
||||
<%= render "admin/users/actions/delete" %>
|
||||
<%= render "admin/users/show/profile/actions/export" %>
|
||||
<%= render "admin/users/show/profile/actions/merge" %>
|
||||
<%= render "admin/users/show/profile/actions/unpublish" %>
|
||||
<%= render "admin/users/show/profile/actions/social_accounts" %>
|
||||
<%= render "admin/users/show/profile/actions/banish" %>
|
||||
<%= render "admin/users/show/profile/actions/delete" %>
|
||||
</div>
|
||||
Loading…
Add table
Reference in a new issue