feat: Add basic bulma version of comment form
This commit is contained in:
		@@ -164,7 +164,7 @@ class CommentForm(forms.ModelForm):
 | 
			
		||||
        self.helper = FormHelper()
 | 
			
		||||
        self.helper.form_class = 'form-comments'
 | 
			
		||||
        self.helper.add_input(Hidden('action', 'comment'))
 | 
			
		||||
        self.helper.add_input(Submit('submit', _('Kommentieren'), css_class="btn2"))
 | 
			
		||||
        self.helper.add_input(Submit('submit', _('Kommentieren'), css_class="button is-primary"))
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = Comment
 | 
			
		||||
 
 | 
			
		||||
@@ -126,6 +126,6 @@
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {% include "fellchensammlung/partials/partial-comment-section.html" %}
 | 
			
		||||
    {% include "fellchensammlung/partials/bulma-partial-comment-section.html" %}
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
{% load crispy_forms_tags %}
 | 
			
		||||
 | 
			
		||||
<div class="card">
 | 
			
		||||
    <div class="card-header">
 | 
			
		||||
        <div class="card-header-title">
 | 
			
		||||
            {% blocktrans %}
 | 
			
		||||
                Als {{ user }} kommentieren
 | 
			
		||||
            {% endblocktrans %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="card-content">
 | 
			
		||||
        {% crispy comment_form %}
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -0,0 +1,25 @@
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
<div class="card">
 | 
			
		||||
    <div class="card-header">
 | 
			
		||||
        <h2 class="card-header-title title is-2">{% translate 'Kommentare' %}</h2>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="card-content">
 | 
			
		||||
        {% if adoption_notice.comments %}
 | 
			
		||||
            {% for comment in adoption_notice.comments %}
 | 
			
		||||
                {% include "fellchensammlung/partials/partial-comment.html" %}
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
        {% else %}
 | 
			
		||||
            <p class="is-italic">{% translate 'Noch keine Kommentare' %}</p>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
    <footer class="card-footer">
 | 
			
		||||
        {% if user.is_authenticated %}
 | 
			
		||||
            {% include "fellchensammlung/forms/bulma-form-comment.html" %}
 | 
			
		||||
        {% else %}
 | 
			
		||||
            <p class="card-footer-item">
 | 
			
		||||
                {% translate 'Du musst dich einloggen um Kommentare zu hinterlassen' %}
 | 
			
		||||
            </p>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </footer>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user