|
| 1 | +{# |
| 2 | + forum/splittopic.html |
| 3 | + ~~~~~~~~~~~~~~~~~~~~~ |
| 4 | + |
| 5 | + This page shows the "splittopic" form. |
| 6 | + |
| 7 | + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. |
| 8 | + :license: BSD, see LICENSE for more details. |
| 9 | +#} |
| 10 | +{% extends 'forum/base.html' %} |
| 11 | + |
| 12 | +{% block title %} |
| 13 | + {# TODO #} |
| 14 | +{% endblock %} |
| 15 | + |
| 16 | +{% block breadcrumb %} |
| 17 | + {{ super() }} |
| 18 | + |
| 19 | + {{ macros.breadcrumb_item(_('Split topic'), topic|url('split')) }} |
| 20 | + {{ macros.breadcrumb_item(topic.title, topic|url) }} |
| 21 | + {{ macros.breadcrumb_item(topic.forum.name, topic.forum|url) }} |
| 22 | +{% endblock %} |
| 23 | + |
| 24 | +{% block content %} |
| 25 | + {{ macros.outer_form(csrf_token(), form) }} |
| 26 | + |
| 27 | + {# |
| 28 | + <form action="" method="post" class="new_topic"> |
| 29 | + {{ csrf_token() }} |
| 30 | + <h2>{% trans topic=topic.title|e %}Split topic “{{ topic }}”{% endtrans %}</h2> |
| 31 | + <p> |
| 32 | + {% trans %}The chosen posts can form a new topic or be attached to an existing topic.{% endtrans %} |
| 33 | + </p> |
| 34 | + <dl> |
| 35 | + <dt> |
| 36 | + <input type="radio" name="action" value="new" id="id_new"{% if form.data.action == 'new' %} checked="checked"{% endif %} /> |
| 37 | + <label for="id_new">{% trans %}Create new topic{% endtrans %}</label> |
| 38 | + </dt> |
| 39 | + <dd> |
| 40 | + {% trans %}Forum of the new topic:{% endtrans %} {{ form.forum }}{{ form.errors.forum }} |
| 41 | + </dd> |
| 42 | + <dd> |
| 43 | + {% trans %}Title of the new topic:{% endtrans %} {{ form.title }}{{ form.errors.title }} |
| 44 | + </dd> |
| 45 | + <dd> |
| 46 | + Version des neuen Topics: |
| 47 | + {{ form.ubuntu_distro }}{{ form.errors.ubuntu_distro }} |
| 48 | + {{ form.ubuntu_version }}{{ form.errors.ubuntu_version }} |
| 49 | + </dd> |
| 50 | + <dt> |
| 51 | + <input type="radio" name="action" value="add" id="id_add"{% if form.data.action == 'add' %} checked="checked" {% endif %} /> |
| 52 | + <label for="id_add">{% trans %}Attach to old topic{% endtrans %}</label> |
| 53 | + </dt> |
| 54 | + <dd> |
| 55 | + {% trans %}Slug of the topic:{% endtrans %} {{ form.topic }}{{ form.errors.topic }} |
| 56 | + </dd> |
| 57 | + </dl> |
| 58 | + |
| 59 | + <h3>{% trans %}Preview{% endtrans %}</h3> |
| 60 | + <p>{% trans %}The following posts will be split off:{% endtrans %}</p> |
| 61 | + |
| 62 | + <table class="topic admin_link_hover"> |
| 63 | + <tbody> |
| 64 | + {%- for post in posts %} |
| 65 | + <tr id="post-{{ post.id }}"{% if post.hidden %} class="hidden"{% endif %}> |
| 66 | + <td class="author"{%- if post.author_id == USER.id %} style="background-color: #F6F4EF"{%- endif %}> |
| 67 | + <p class="username{% if not post.author.is_active %} inactive{% endif %}"> |
| 68 | + <a href="{{ post.author|url }}">{{ post.author.username|e }}</a> |
| 69 | + {%- if post.author.primary_group and post.author.primary_group.icon %} |
| 70 | + <img class="teamicon" src="{{ post.author.primary_group.icon_url }}" alt="Teamicon" /> |
| 71 | + {%- endif %} |
| 72 | + </p> |
| 73 | + {%- if post.author.member_title %} |
| 74 | + <div class="member_title">{{ post.author.member_title|e }}</div> |
| 75 | + {%- endif %} |
| 76 | + {%- if post.author == topic.author and not loop.first %} |
| 77 | + <div class="member_title">{% trans %}(Topic starter){% endtrans %}</div> |
| 78 | + {%- endif %} |
| 79 | + {%- if post.author.has_avatar and not USER.settings['hide_avatars'] %} |
| 80 | + {{ macros.add_user_avatar(post.author) }} |
| 81 | + {%- endif %} |
| 82 | + <p>{% trans %}Member since:{% endtrans %}<br />{{ post.author.date_joined|naturalday }}</p> |
| 83 | + <p>{% trans %}Posts:{% endtrans %} {{ post.author.post_count }}</p> |
| 84 | + </td> |
| 85 | + <td class="post"{%- if post.author_id == USER.id %} style="background-color: #F8F6F1"{% endif %}> |
| 86 | + <div class="postinfo"> |
| 87 | + <div class="linklist"> |
| 88 | + </div> |
| 89 | + <a href="{{ post|url }}" title="{% trans %}Link to this post{% endtrans %}">{# |
| 90 | + #}<img src="{{ href('static', 'img', 'icon_minipost.gif') }}" alt="{% trans %}Post{% endtrans %}" />{# |
| 91 | + #}</a> |
| 92 | + {{ post.pub_date|datetime }} |
| 93 | + </div> |
| 94 | + <div class="text"> |
| 95 | + {{ post.get_text() }} |
| 96 | + </div> |
| 97 | + {%- set attachments = post.grouped_attachments %} |
| 98 | + {%- if attachments %} |
| 99 | + <hr /> |
| 100 | + <dl class="attachments"> |
| 101 | + {%- for group, list, class in attachments %} |
| 102 | + {%- if group %} |
| 103 | + <dt>{{ group }}</dt> |
| 104 | + <ul class="attr_list{% if class %} {{ class }}{% endif %}"> |
| 105 | + {%- for att in list %} |
| 106 | + <li>{{ att.html_representation }}</li> |
| 107 | + {%- endfor %} |
| 108 | + </ul> |
| 109 | + {%- else %} |
| 110 | + {%- for att in list %} |
| 111 | + <dt>{{ att.name|e }} ({{ att.size|filesizeformat(true) }})</dt> |
| 112 | + {%- if att.comment %} |
| 113 | + <dd class="comment">{{ att.comment|e }}</dd> |
| 114 | + {%- endif %} |
| 115 | + <dd>{{ att.html_representation }}</dd> |
| 116 | + {%- endfor %} |
| 117 | + {%- endif %} |
| 118 | + {%- endfor %} |
| 119 | + </dl> |
| 120 | + {%- endif %} |
| 121 | + {%- if post.author.signature and not USER.settings['hide_signatures'] %} |
| 122 | + <div class="signature"> |
| 123 | + {{ post.author.signature_rendered }} |
| 124 | + </div> |
| 125 | + {%- endif %} |
| 126 | + </td> |
| 127 | + </tr> |
| 128 | + {%- endfor %} |
| 129 | + </tbody> |
| 130 | + </table> |
| 131 | + <input type="submit" name="split" value="{% trans %}Split posts{% endtrans %}" /> |
| 132 | + </form> |
| 133 | + #} |
| 134 | +{% endblock %} |
0 commit comments