mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
“我的域”功能
This commit is contained in:
1 parent
d4e849a133
commit
eaed0e84f5
11 files changed
+122
-27
No files matched your search
@@ -29,6 +29,16 @@
|
||||
name:'name',
|
||||
required:true
|
||||
}) }}
|
||||
{{ form.form_textarea({
|
||||
label:'Bulletin',
|
||||
name:'bulletin',
|
||||
markdown:true,
|
||||
required:true
|
||||
}) }}
|
||||
{{ form.form_text({
|
||||
label:'Gravatar',
|
||||
name:'gravatar'
|
||||
}) }}
|
||||
<div class="row"><div class="columns">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
<button type="submit" class="rounded primary button">
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
{% extends "layout/home_base.html" %}
|
||||
{% block home_content %}
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('My Domains') }}</h1>
|
||||
<div class="section__tools">
|
||||
{% if handler.user.hasPriv(model.builtin.PRIV.PRIV_CREATE_DOMAIN) %}
|
||||
<a class="primary rounded button" href="{{ url('home_domain_create') }}"><span class="icon icon-add"></span> {{ _('Create Domain') }}</a>
|
||||
{% endif %}
|
||||
<a class="tool-button" href="{{ url('wiki', page='help', anchor='domain') }}"><span class="icon icon-help"></span> {{ _("What's domain?") }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section__body no-padding">
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--icon">
|
||||
<col class="col--name">
|
||||
<col class="col--role">
|
||||
<col class="col--action">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--icon"> </th>
|
||||
<th class="col--name">{{ _('Name') }} ({{ _('ID') }})</th>
|
||||
<th class="col--role">{{ _('My Role') }}</th>
|
||||
<th class="col--action">{{ _('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ddoc in ddocs %}
|
||||
<tr>
|
||||
<td class="col--icon">
|
||||
<img src="{{ gravatar(ddoc.gravatar) }}" width="32" height="32">
|
||||
</td>
|
||||
<td class="col--name">
|
||||
{{ ddoc['name'] }} ({{ ddoc['_id'] }})
|
||||
</td>
|
||||
<td class="col--role">
|
||||
{{ dudict[ddoc._id].role|default('default') }}
|
||||
</td>
|
||||
<td class="col--action">
|
||||
<a class="typo-a" href="{{ url('homepage', domainId=ddoc['_id']) }}">{{ _('Visit') }}</a>
|
||||
{% if canManage[ddoc['_id']] %}
|
||||
· <a class="typo-a" href="{{ url('domain_manage', domainId=ddoc['_id']) }}">{{ _('Manage') }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user