only move cards within same page

This commit is contained in:
Torsten 2023-01-25 15:16:32 +02:00
parent bafe142a3b
commit 594f2b5dce
5 changed files with 25 additions and 120 deletions

View File

@ -1380,14 +1380,6 @@ select {
order: 9999;
}
.order-2 {
order: 2;
}
.order-3 {
order: 3;
}
.col-span-2 {
grid-column: span 2 / span 2;
}
@ -1432,10 +1424,6 @@ select {
margin: 1.5rem;
}
.m-4 {
margin: 1rem;
}
.mx-20 {
margin-left: 5rem;
margin-right: 5rem;
@ -1451,16 +1439,16 @@ select {
margin-bottom: 0.75rem;
}
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-4 {
margin-left: 1rem;
margin-right: 1rem;
@ -1516,11 +1504,6 @@ select {
margin-bottom: 5rem;
}
.mx-6 {
margin-left: 1.5rem;
margin-right: 1.5rem;
}
.mt-2 {
margin-top: 0.5rem;
}
@ -1761,8 +1744,8 @@ select {
min-width: 100%;
}
.max-w-screen-2xl {
max-width: 1536px;
.max-w-\[1920px\] {
max-width: 1920px;
}
.max-w-xl {
@ -1789,10 +1772,6 @@ select {
max-width: 28rem;
}
.max-w-\[1920px\] {
max-width: 1920px;
}
.flex-1 {
flex: 1 1 0%;
}
@ -1933,6 +1912,10 @@ select {
justify-content: space-between;
}
.gap-8 {
gap: 2rem;
}
.gap-16 {
gap: 4rem;
}
@ -1961,18 +1944,10 @@ select {
gap: 5rem;
}
.gap-8 {
gap: 2rem;
}
.gap-12 {
gap: 3rem;
}
.gap-5 {
gap: 1.25rem;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
@ -2349,11 +2324,6 @@ select {
object-fit: cover;
}
.object-fill {
-o-object-fit: fill;
object-fit: fill;
}
.p-4 {
padding: 1rem;
}
@ -2730,6 +2700,7 @@ select {
}
.prose {
max-width: 100%;
color: inherit;
--tw-prose-bullets: #6b7280;
--tw-prose-headings: inherit;
@ -2918,10 +2889,6 @@ select {
margin: 2rem;
}
.md\:m-4 {
margin: 1rem;
}
.md\:my-10 {
margin-top: 2.5rem;
margin-bottom: 2.5rem;
@ -2961,16 +2928,12 @@ select {
flex-direction: row;
}
.md\:gap-8 {
gap: 2rem;
}
.md\:gap-12 {
gap: 3rem;
}
.md\:gap-10 {
gap: 2.5rem;
.md\:gap-8 {
gap: 2rem;
}
.md\:p-12 {
@ -3007,35 +2970,11 @@ select {
margin: 3rem;
}
.lg\:m-6 {
margin: 1.5rem;
}
.lg\:mx-20 {
margin-left: 5rem;
margin-right: 5rem;
}
.lg\:mx-0 {
margin-left: 0px;
margin-right: 0px;
}
.lg\:mx-1 {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.lg\:mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.lg\:mx-10 {
margin-left: 2.5rem;
margin-right: 2.5rem;
}
.lg\:mb-8 {
margin-bottom: 2rem;
}
@ -3056,10 +2995,6 @@ select {
margin-left: 2.5rem;
}
.lg\:mt-6 {
margin-top: 1.5rem;
}
.lg\:h-96 {
height: 24rem;
}
@ -3109,18 +3044,14 @@ select {
align-items: center;
}
.lg\:gap-12 {
gap: 3rem;
}
.lg\:gap-20 {
gap: 5rem;
}
.lg\:gap-16 {
gap: 4rem;
}
.lg\:gap-12 {
gap: 3rem;
}
.lg\:px-8 {
padding-left: 2rem;
padding-right: 2rem;
@ -3148,19 +3079,6 @@ select {
margin-right: auto;
}
.xl\:mx-0 {
margin-left: 0px;
margin-right: 0px;
}
.xl\:w-3\/5 {
width: 60%;
}
.xl\:w-2\/5 {
width: 40%;
}
.xl\:columns-4 {
-moz-columns: 4;
columns: 4;
@ -3169,19 +3087,4 @@ select {
.xl\:grid-cols-6 {
grid-template-columns: repeat(6, minmax(0, 1fr));
}
.xl\:flex-row {
flex-direction: row;
}
.xl\:gap-16 {
gap: 4rem;
}
}
@media (min-width: 1536px) {
.\32xl\:mx-auto {
margin-left: auto;
margin-right: auto;
}
}

View File

@ -1,4 +1,5 @@
.prose {
max-width: 100%;
color: inherit;
--tw-prose-bullets: #6b7280;
--tw-prose-headings: inherit;

View File

@ -2,8 +2,9 @@ module Merged
module CardsHelper
include ViewHelper #for previews
def card_section_select
Section.where.not(card_template: "").collect{|s| ["#{s.page&.name}: #{s.header}" , s.id]}
def card_section_select(card)
card_sections = card.section.page.sections.where.not(card_template: "")
card_sections.collect{|s| [s.header , s.id]}
end
end
end

View File

@ -33,8 +33,8 @@
= form_for( card , {method: :delete } ) do
%button.button.remove.mt-4{type: :submit} Delete Card
= simple_form_for( card , method: :patch ) do |f|
= f.input :section_id , label: "move to section" , include_blank: false ,
collection: card_section_select
= f.input :section_id , label: "move to section (on this page)" , include_blank: false ,
collection: card_section_select(card)
%button.button.change.mt-4{type: :submit} Move
.basis-80

View File

@ -1,4 +1,4 @@
.fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm.m-10
.fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
= image_for( card , class: "h-full w-full object-cover")
%h3.p-5.text-2xl.bg-gray-100.text-black.font-bold{ text_align_option(card)}= card.header
%div.h-full{background_option(card)}