Make it possible to set the instance admin #113
@ -201,13 +201,16 @@ class CalendarSocialApp(Flask, RoutedMixin):
|
|||||||
|
|
||||||
user_count = User.query.count()
|
user_count = User.query.count()
|
||||||
event_count = Event.query.count()
|
event_count = Event.query.count()
|
||||||
|
admin_user = current_app.instance_admin
|
||||||
|
admin_profile = None if admin_user is None else admin_user.profile
|
||||||
|
|
||||||
return render_template('welcome.html',
|
return render_template('welcome.html',
|
||||||
calendar=calendar,
|
calendar=calendar,
|
||||||
user_only=False,
|
user_only=False,
|
||||||
login_form=login_form,
|
login_form=login_form,
|
||||||
user_count=user_count,
|
user_count=user_count,
|
||||||
event_count=event_count)
|
event_count=event_count,
|
||||||
|
admin_profile=admin_profile)
|
||||||
|
|
||||||
@RoutedMixin.route('/')
|
@RoutedMixin.route('/')
|
||||||
def hello(self):
|
def hello(self):
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
<img src="{{ url_for('static', filename='avatars/' + profile.builtin_avatar + '.svg') }}" alt="" class="ui circular avatar image">
|
<img src="{{ url_for('static', filename='avatars/' + profile.builtin_avatar + '.svg') }}" alt="" class="ui circular avatar image">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="display name">{{ profile.display_name }}</div>
|
<div class="display name">{{ profile.display_name }}</div>
|
||||||
<div class="handle">{{ profile }}</div>
|
<div class="handle">{{ profile or '' }}</div>
|
||||||
</a>
|
</a>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -73,8 +73,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="four wide column">
|
<div class="four wide column">
|
||||||
|
{% if admin_profile %}
|
||||||
<h2>{% trans %}Administered by{% endtrans %}</h2>
|
<h2>{% trans %}Administered by{% endtrans %}</h2>
|
||||||
{{ profile_link(none) }}
|
{{ profile_link(admin_profile) }}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user