diff --git a/inyoka_theme_default/static/style/inyoka/inyoka.less b/inyoka_theme_default/static/style/inyoka/inyoka.less index 11543c1..d108750 100644 --- a/inyoka_theme_default/static/style/inyoka/inyoka.less +++ b/inyoka_theme_default/static/style/inyoka/inyoka.less @@ -201,7 +201,12 @@ html, body { } } -button, input[type="button"], input[type="submit"] { +a.button { + &:extend(.btn); + &:extend(.btn-primary); +} + +.button, button, input[type="button"], input[type="submit"] { &:extend(.btn); &:extend(.btn-primary); margin-top: 10px; diff --git a/inyoka_theme_default/static/style/inyoka/portal.less b/inyoka_theme_default/static/style/inyoka/portal.less old mode 100644 new mode 100755 index fc40727..f5fd037 --- a/inyoka_theme_default/static/style/inyoka/portal.less +++ b/inyoka_theme_default/static/style/inyoka/portal.less @@ -54,9 +54,129 @@ } } } + &-usericon { font-size: 20ex; text-align: center; vertical-align: middle; } + + &-privmsg-table { + th.actions { + text-align: center; + } + .actions { + text-align: right; + } + th.delete { + text-align: center; + input { + margin-left: 5px; + } + } + .pn_delete { + text-align: center; + } + + @media (min-width: @screen-md-min) { + .actionscol {width:10%;} + .deletecol {width:14%;} + } + @media (min-width: @screen-lg-min) { + .actionscol {width:10%;} + .deletecol {width:12%;} + } + + @media (max-width: @screen-xs-max) { + thead {display:none;} + tbody { + tr { + display:block; + width:100%; + height:auto; + border-top:1px solid @gray-lighter; + margin:15px 0 25px; + } + td { + display: block; + float:left; + width:50%; + border:0; + } + td:before { + display: inline-block; + width: auto; + padding-right: 10px; + white-space: nowrap; + content: attr(data-title)':'; + } + td.action, + td.pn_delete { + margin-bottom: 25px; + } + } + tfoot > tr { + > td { + border-top: none; + } + } + } + } + .message { + margin-bottom: 25px; + .head { + background: @gray-lighter; + padding:10px 8px; + border: 1px solid #ddd; + @media (max-width: @screen-xs-max) { + position: relative; + } + .avatar { + @media (max-width: @screen-xs-max) { + position: absolute; + right: 8px; + top: 10px; + } + text-align: center; + .fa_icon-user { + font-size:25px; + } + } + } + .body { + background: #fff; + padding: 15px 8px; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + blockquote { + font-size: @font-size-base; + } + } + .foot{ + background: @gray-lighter; + border: 1px solid #ddd; + padding: 15px; + ul { + &:extend(.list-inline); + li { + &:extend(.list-inline > li); + border-right: 1px solid @gray-light; + &:last-child { + border-right:none; + } + } + } + span[class^='fa_icon'] { + @media (max-width: @screen-xs-max) { + font-size: 20px; + margin:0 8px; + } + } + .text { + @media (max-width: @screen-xs-max) { + display: none; + } + } + } + } } diff --git a/inyoka_theme_default/templates/confirm_action_flash.html b/inyoka_theme_default/templates/confirm_action_flash.html new file mode 100755 index 0000000..2a53110 --- /dev/null +++ b/inyoka_theme_default/templates/confirm_action_flash.html @@ -0,0 +1,13 @@ +{# + confirm_action_flash.html + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + :copyright: (c) 2013-2015 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% import 'macros.html' as macros %} + +{% call macros.outer_form(csrf_token(), form, action=action_url|e, manually_rendered=True, submit_label=confirm_label|e) %} +

{{ message|e }}

+ +{% endcall %} diff --git a/inyoka_theme_default/templates/macros.html b/inyoka_theme_default/templates/macros.html index 365beee..5c2a5e0 100644 --- a/inyoka_theme_default/templates/macros.html +++ b/inyoka_theme_default/templates/macros.html @@ -112,7 +112,7 @@

{% trans %}Staff{% endtrans %}

{# FORM #} -{% macro outer_form(csrf, form=None, bootstrap_class=None, action="", method="post", submit_label=None, manually_rendered=False) %} +{% macro outer_form(csrf, form=None, bootstrap_class=None, action="", method="post", submit_label=None, button_visible=True, manually_rendered=False) %} {# params * csrf: just give `csrf_token()` (workaround for a context-bug) * form: if given and manually_rendered not touched, all fields will be rendered @@ -125,6 +125,7 @@

{% trans %}Staff{% endtrans %}

(latter will generate an URL from the fields. It will look like ?=. So it will be visible in browser-history. Do not use for sensible information (passwords etc.)!) * submit_label: text for submit-button + * button_visible: hides the submit-button, if set to false * manually_rendered: disable automatic rendering of all form-fields by setting this True #}
{% trans %}Staff{% endtrans %} {{ caller() }} {% endif %} - + {% if button_visible %} + + {% endif %}
{% endmacro %} diff --git a/inyoka_theme_default/templates/portal/privmsg/base.html b/inyoka_theme_default/templates/portal/privmsg/base.html new file mode 100755 index 0000000..856bf7f --- /dev/null +++ b/inyoka_theme_default/templates/portal/privmsg/base.html @@ -0,0 +1,24 @@ +{# + portal/privmsg/base.html + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + :copyright: (c) 2013-2015 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} + +{% extends 'portal/base.html' %} + +{% block breadcrumb %} + {{ super() }} + {{ macros.breadcrumb_item(_('Messages'), href('portal', 'privmsg')) }} +{% endblock %} + +{% block sidebar %} + {% call macros.sidebar() %} + {{ macros.sidebar_item(_('Inbox'), href('portal', 'privmsg', 'inbox'), 'fa_icon-inbox') }} + {{ macros.sidebar_item(_('Sent Mail'), href('portal', 'privmsg', 'sent') , 'fa_icon-share-square') }} + {{ macros.sidebar_item(_('Archive'), href('portal', 'privmsg', 'archive'), 'fa_icon-archive') }} + {{ macros.sidebar_item(_('Trash'), href('portal', 'privmsg', 'trash'), 'fa_icon-trash') }} + {{ macros.sidebar_item(_('Compose message'), href('portal', 'privmsg', 'new'), 'fa_icon-envelope-square') }} + {% endcall %} +{% endblock %} diff --git a/inyoka_theme_default/templates/portal/privmsg/index.html b/inyoka_theme_default/templates/portal/privmsg/index.html new file mode 100755 index 0000000..6975d21 --- /dev/null +++ b/inyoka_theme_default/templates/portal/privmsg/index.html @@ -0,0 +1,232 @@ +{# + portal/privmsg/index.html + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Display a list of private messages. + + :copyright: (c) 2013-2015 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} + +{% extends 'portal/privmsg/base.html' %} + +{% block breadcrumb %} + {{ super() }} + {{ macros.breadcrumb_item(_(folder.name)) }} +{% endblock %} + +{% block content %} + {% if message %} +
+
+
+
+
+
+ {% trans %}From:{% endtrans %} +
+
+ + {{ message.author|e }} + +
+
+ {% trans %}To:{% endtrans %} +
+
+ {% for user in message.recipients %} + {{ user|e }} + {% if not loop.last %}, {% endif %} + {% endfor %} +
+
+ {% trans %}Subject:{% endtrans %} +
+
+ {{ message.subject|e }} +
+
+ {% trans %}Date:{% endtrans %} +
+
+ {{ message.pub_date|datetime }} +
+
+
+
{{ macros.add_user_avatar(message.author) }}
+
+
+ +
+ {{ message.rendered_text }} +
+ +
+ +
+
+ {% endif %} + + {% call macros.outer_form(csrf_token(), form, button_visible=False, manually_rendered=True) %} + {{ csrf_token() }} + + + + + + + + + + + + + + + + + + + + + {% for entry in entries %} + + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + +
{% trans %}Subject{% endtrans %}{% trans %}From{% endtrans %}{% trans %}To{% endtrans %}{% trans %}Date{% endtrans %}{% trans %}Actions{% endtrans %}{% trans %}Delete{% endtrans %}
+ {% if not entry.read %}{% endif %} + {{ entry.message.subject|e|truncate(50,false,'...') }} + {% if not entry.read %}{% endif %} + + + {{ entry.message.author|e }} + + + {% if entry.message.recipients|length == 0 %} + + {{ entry.message.author|e }} + + {% else %} + + {{ entry.message.recipients[0]|e }} + + {% endif %} + {% if entry.message.recipients|length > 1 %}, …{% endif %} + {{ entry.message.pub_date|datetime }} + {% if not entry.is_own_message %} + {% if entry.message.author.is_active %} + + + + {% endif %} + {% if entry.message.recipients|length > 1 %} + + + + {% endif %} + {% endif %} + + + + {% if not entry.in_archive %} + + + + {% endif %} + + +
+ {% trans %}Currently there are no messages in this folder.{% endtrans %} +
+
+ {{ macros.render_pagination(pagination) }} +

+ {% if one_page %} + + {% trans %}Split messages into multiple pages{% endtrans %} + + {% else %} + + {% trans %}Display all messages on one page{% endtrans %} + + {% endif %} +

+
+ +
+ {% endcall %} +{% endblock %} + +{% block scripts %} +{{ super() }} + +{% endblock %} diff --git a/inyoka_theme_default/templates/portal/privmsg/new.html b/inyoka_theme_default/templates/portal/privmsg/new.html new file mode 100755 index 0000000..e6293b8 --- /dev/null +++ b/inyoka_theme_default/templates/portal/privmsg/new.html @@ -0,0 +1,72 @@ +{# + portal/privmsg/new.html + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + This page shows a form where the user can create a new Private Message + + :copyright: (c) 2013-2015 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} + +{% extends 'portal/privmsg/base.html' %} + +{% block breadcrumb %} + {{ super() }} + {{ macros.breadcrumb_item(_('Compose message')) }} +{% endblock %} + +{% block content %} + {% call macros.outer_form(csrf_token(), form, action=href('portal', 'privmsg', 'new'), manually_rendered=True, submit_label=_('Send message')) %} + {% if USER.can('send_group_pm') %} + {{ macros.inner_form(form, ['recipient', 'group_recipient','subject', 'text']) }} + {% else %} + {{ macros.inner_form(form, ['recipient', 'subject', 'text']) }} + {% endif %} + + {% endcall %} + {% if preview %} +
+

{% trans %}Preview{% endtrans %}

+
{{ preview }}
+
+ {% endif %} +{% endblock %} + +{% block scripts %} + {{ super() }} + +{% endblock %}