rows fix
This commit is contained in:
		@ -78,7 +78,6 @@ TrackFormSet = modelformset_factory(
 | 
				
			|||||||
        "artist",
 | 
					        "artist",
 | 
				
			||||||
        "title",
 | 
					        "title",
 | 
				
			||||||
        "tags",
 | 
					        "tags",
 | 
				
			||||||
        "album",
 | 
					 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    can_delete=True,
 | 
					    can_delete=True,
 | 
				
			||||||
    extra=0,
 | 
					    extra=0,
 | 
				
			||||||
 | 
				
			|||||||
@ -183,6 +183,13 @@ class BasePage(Renderable, models.Model):
 | 
				
			|||||||
        headline[-1] += suffix
 | 
					        headline[-1] += suffix
 | 
				
			||||||
        return mark_safe(" ".join(headline))
 | 
					        return mark_safe(" ".join(headline))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    _url_re = re.compile("(https?://[^\s\n]+)")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @cached_property
 | 
				
			||||||
 | 
					    def display_content(self):
 | 
				
			||||||
 | 
					        content = self._url_re.sub(r'<a href="\1" target="new">\1</a>', self.content)
 | 
				
			||||||
 | 
					        return content.replace("\n\n", "\n").replace("\n", "<br>")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def get_init_kwargs_from(cls, page, **kwargs):
 | 
					    def get_init_kwargs_from(cls, page, **kwargs):
 | 
				
			||||||
        kwargs.setdefault("cover", page.cover)
 | 
					        kwargs.setdefault("cover", page.cover)
 | 
				
			||||||
 | 
				
			|||||||
@ -581,7 +581,7 @@
 | 
				
			|||||||
  padding-bottom: 0.6rem;
 | 
					  padding-bottom: 0.6rem;
 | 
				
			||||||
  border-bottom: 2px var(--break-color) solid;
 | 
					  border-bottom: 2px var(--break-color) solid;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.page section.container > .title {
 | 
					.page section.container > .title, .page section.container h3.title {
 | 
				
			||||||
  font-size: var(--title-2-sz);
 | 
					  font-size: var(--title-2-sz);
 | 
				
			||||||
  clear: both;
 | 
					  clear: both;
 | 
				
			||||||
  margin: 0.6rem 0;
 | 
					  margin: 0.6rem 0;
 | 
				
			||||||
 | 
				
			|||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -134,7 +134,7 @@ Usefull context:
 | 
				
			|||||||
                {% if page and page.content %}
 | 
					                {% if page and page.content %}
 | 
				
			||||||
                <section class="container content page-content">
 | 
					                <section class="container content page-content">
 | 
				
			||||||
                    {% block content %}
 | 
					                    {% block content %}
 | 
				
			||||||
                        {{ page.content|safe }}
 | 
					                        {{ page.display_content|safe }}
 | 
				
			||||||
                    {% endblock %}
 | 
					                    {% endblock %}
 | 
				
			||||||
                </section>
 | 
					                </section>
 | 
				
			||||||
                {% endif %}
 | 
					                {% endif %}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
{% extends "./list_editor.html" %}
 | 
					{% extends "./list_editor.html" %}
 | 
				
			||||||
 | 
					{% load i18n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block outer %}
 | 
					{% block outer %}
 | 
				
			||||||
    {% with tag_id="inline-tracks" %}
 | 
					    {% with tag_id="inline-tracks" %}
 | 
				
			||||||
@ -8,6 +9,11 @@
 | 
				
			|||||||
    {% endwith %}
 | 
					    {% endwith %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block inner %}
 | 
				
			||||||
 | 
					<template #title><h3 class="title">{% translate "Track list" %}</h3></template>
 | 
				
			||||||
 | 
					{{ block.super }}
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block row-field %}
 | 
					{% block row-field %}
 | 
				
			||||||
<a-autocomplete
 | 
					<a-autocomplete
 | 
				
			||||||
        :input-class="['input', item.error(attr) ? 'is-danger' : 'half-field']"
 | 
					        :input-class="['input', item.error(attr) ? 'is-danger' : 'half-field']"
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@
 | 
				
			|||||||
        {% include "./dashboard/tracklist_editor.html" with formset=tracklist_formset %}
 | 
					        {% include "./dashboard/tracklist_editor.html" with formset=tracklist_formset %}
 | 
				
			||||||
        <hr/>
 | 
					        <hr/>
 | 
				
			||||||
        <section class="container">
 | 
					        <section class="container">
 | 
				
			||||||
            <h3 class="title">{% translate "Sound files" %}</h3>
 | 
					            <h3 class="title">{% translate "Podcasts" %}</h3>
 | 
				
			||||||
            {% include "./dashboard/soundlist_editor.html" with formset=soundlist_formset %}
 | 
					            {% include "./dashboard/soundlist_editor.html" with formset=soundlist_formset %}
 | 
				
			||||||
        </section>
 | 
					        </section>
 | 
				
			||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
 | 
				
			|||||||
@ -49,7 +49,6 @@ const Component = {
 | 
				
			|||||||
        ...AList.props,
 | 
					        ...AList.props,
 | 
				
			||||||
        columns: Array,
 | 
					        columns: Array,
 | 
				
			||||||
        labels: Object,
 | 
					        labels: Object,
 | 
				
			||||||
        allowCreate: Boolean,
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,6 @@
 | 
				
			|||||||
        </section>
 | 
					        </section>
 | 
				
			||||||
        <section v-show="page == Page.List" class="panel">
 | 
					        <section v-show="page == Page.List" class="panel">
 | 
				
			||||||
            <a-rows :set="set" :columns="columns" :labels="initData.fields"
 | 
					            <a-rows :set="set" :columns="columns" :labels="initData.fields"
 | 
				
			||||||
                    :allow-create="true"
 | 
					 | 
				
			||||||
                    :orderable="true" @move="listItemMove" @colmove="columnMove"
 | 
					                    :orderable="true" @move="listItemMove" @colmove="columnMove"
 | 
				
			||||||
                    @cell="onCellEvent">
 | 
					                    @cell="onCellEvent">
 | 
				
			||||||
                <template v-for="[name,slot] of rowsSlots" :key="slot"
 | 
					                <template v-for="[name,slot] of rowsSlots" :key="slot"
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,7 @@
 | 
				
			|||||||
            border-bottom: 2px var(--break-color) solid;
 | 
					            border-bottom: 2px var(--break-color) solid;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        > .title {
 | 
					        > .title, h3.title {
 | 
				
			||||||
            font-size: var(--title-2-sz);
 | 
					            font-size: var(--title-2-sz);
 | 
				
			||||||
            clear: both;
 | 
					            clear: both;
 | 
				
			||||||
            margin: v.$mp-3 0;
 | 
					            margin: v.$mp-3 0;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user