mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 23:06:22 +00:00
feat: agregar contenido como details
This commit is contained in:
parent
c08b2158d8
commit
1f9d9b308b
3 changed files with 11 additions and 10 deletions
|
@ -6,10 +6,13 @@
|
|||
@param :summary_class [String] Clases para el summary
|
||||
|
||||
- local_assigns[:summary_class] ||= 'h3'
|
||||
- local_assigns[:closed] ||= '▶'.html_safe;
|
||||
- local_assigns[:open] ||= '▼'.html_safe;
|
||||
|
||||
%details.details.py-2{ id: local_assigns[:id], data: { controller: 'details', action: 'toggle->details#store' } }
|
||||
|
||||
%details.details.py-2{ id: local_assigns[:id], data: { controller: 'details', action: 'toggle->details#store' }, class: local_assigns[:details_class] }
|
||||
%summary.d-flex.flex-row.align-items-center.justify-content-between{ class: local_assigns[:summary_class] }
|
||||
%span= summary
|
||||
%span.hide-when-open ▶
|
||||
%span.show-when-open ▼
|
||||
%span.hide-when-open{ class: local_assigns[:open_class] }= local_assigns[:closed]
|
||||
%span.show-when-open{ class: local_assigns[:closed_class] }= local_assigns[:open]
|
||||
= yield
|
||||
|
|
|
@ -17,11 +17,8 @@
|
|||
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layouts", class: "" }
|
||||
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
||||
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit')
|
||||
.caja
|
||||
.d-flex.border.border-magenta.p-2.justify-content-between.align-items-center.w-100
|
||||
%h3.magenta.font-weight-bold.m-0= t('posts.new')
|
||||
%p.h1.magenta.font-weight-bold.m-0= '+'
|
||||
%table.table-sm.mb-3.w-100
|
||||
= render 'layouts/details', summary: t('posts.new'), summary_class: "h3 magenta font-weight-bold m-0 p-2", details_class: "d-flex border border-magenta justify-content-between align-items-center w-100 mb-3", open: "+", closed: "+", open_class: "h1 magenta font-weight-bold m-0", closed_class: "h1 magenta font-weight-bold m-0" do
|
||||
%table.table-sm.w-100
|
||||
%tbody
|
||||
- @site.schema_organization.each do |schema, _|
|
||||
- schema = @site.layouts[schema]
|
||||
|
@ -29,6 +26,7 @@
|
|||
= render 'schemas/row', site: @site, schema: schema, filter: @filter_params
|
||||
|
||||
|
||||
|
||||
- if policy(@site_stat).index?
|
||||
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn btn-secondary'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%tr.border-left.border-right.border-bottom.border-magenta
|
||||
%tr.border-top.border-magenta
|
||||
%th.font-weight-normal.w-100{ scope: 'row' }
|
||||
- if local_assigns[:parent_schema]
|
||||
%span.text-muted —
|
||||
|
|
Loading…
Reference in a new issue