{% extends "cosinnus_stream/base.html" %} {% load i18n static cosinnus_tags widget_tweaks %} {% block page_title %} {% if form_view == "add" %} {% trans "Create Stream" %} {% elif form_view == "edit" %} {% blocktrans with stream_name=stream.title %}Edit stream "{{ stream_name }}"{% endblocktrans %} {% endif %} {% endblock page_title %} {% block breadcrumb %} {{ block.super }}
  • {% if form_view == "add" %}{% trans "Create Stream" %}{% elif form_view == "edit" %}{% blocktrans with stream_name=stream.title %}Edit stream "{{ stream_name }}"{% endblocktrans %}{% endif %}
  • {% endblock %} {% block leftnav %} {% include 'cosinnus_stream/leftnav.html' with streams=streams %} {% endblock leftnav %} {% block content %} {% if form.forms.obj.errors or form.forms.media_tag.errors %}

    {% trans "There was an error in one of the fields you entered. Please correct it before saving!" %}

    {% endif %}
    {% csrf_token %} {{ form.forms.obj.non_field_errors }} {{ form.forms.media_tag.non_field_errors }}
    {% trans "Title" as title_label %} {% trans "Enter a title for the stream." as title_legend %} {% captureas title_html %} {% if request.GET.title %} {% render_field form.forms.obj.title class+="form-control" placeholder=title_label value=request.GET.title %} {% else %} {% render_field form.forms.obj.title class+="form-control" placeholder=title_label %} {% endif %} {% endcaptureas %} {% include 'cosinnus/fields/default_field.html' with field=form.forms.obj.title legend=title_legend label=title_label field_html=title_html first=True %}

    {% trans "Apply filters for the stream" %}

    {# Regular field with custom HTML #} {% trans "Filter by Team?" as groupsel_label %} {% captureas groupsel_html %}
    {% endcaptureas %} {% include 'cosinnus/fields/default_field.html' with field=form.forms.obj.group field_html=groupsel_html label=groupsel_label %} {% trans "Additional filters" as media_tags_label %} {% trans "Filter by authors, tags or other tagged properties?" as media_tags_legend %} {% include 'cosinnus/media_tags.html' with media_tags_legend=media_tags_legend media_tags_label=media_tags_label %} {# Item types selector fields #} {% trans "Filter by item types?" as types_label %} {% captureas types_html %}
    {% for model_option in stream_model_selection %} {% captureas cosinnus_css_class %}{% if model_option.app == 'todo' %}app-todos{% elif model_option.app == 'note' %}app-main{% elif model_option.app == 'file' %}app-files{% elif model_option.app == 'event' %}app-calendar{% elif model_option.app %}app-{{ model_option.app }}{% else %}app-main{% endif %}{% endcaptureas %} {{ model_option.label }} {% endfor %}
    {% endcaptureas %} {% include 'cosinnus/fields/default_field.html' with extra_html=types_html label=types_label large_field=True %}
    {% endblock content %}