mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 01:44:13 +00:00
[enable module] improved ui, fixed bug for wiki
This commit is contained in:
@@ -2615,3 +2615,10 @@ textarea:-moz-placeholder {/* for FF */
|
|||||||
#search-repo-form input[type=text] {
|
#search-repo-form input[type=text] {
|
||||||
margin: 4px 4px;
|
margin: 4px 4px;
|
||||||
}
|
}
|
||||||
|
#enable-mods {
|
||||||
|
color:#888;
|
||||||
|
}
|
||||||
|
#enable-mods:hover {
|
||||||
|
color:#666;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<form id="mods-enable-form" method="post" action="{% url 'group_toggle_modules' group.id %}" class="hide">{% csrf_token%}
|
<form id="mods-enable-form" method="post" action="{% url 'group_toggle_modules' group.id %}" class="hide">{% csrf_token%}
|
||||||
<h3>{% trans "Available Modules"%}</h3>
|
<h3>{% trans "Enable Modules"%}</h3>
|
||||||
<div>
|
<ul>
|
||||||
{% for mod in mods_available %}
|
{% for mod in mods_available %}
|
||||||
{% if mod == 'group wiki' %}
|
{% if mod == 'group wiki' %}
|
||||||
<span><input type="checkbox" name="group_wiki" {%if mod in mods_enabled%}checked {% endif%}/></span>
|
<li>
|
||||||
<span>{% trans "Wiki" %}</span>
|
<input class="vam" type="checkbox" name="group_wiki" {%if mod in mods_enabled%}checked {% endif%}/></span>
|
||||||
|
<span class="vam">{% trans "Wiki" %}</span>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</ul>
|
||||||
|
|
||||||
<input type="submit" id="mods-enable-submit" value="{% trans "Submit"%}" class="submit"/>
|
<input type="submit" id="mods-enable-submit" value="{% trans "Submit"%}" class="submit"/>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
{% if is_staff %}
|
{% if is_staff %}
|
||||||
<li class="tabnav-tab {% if cur == 'admin'%}tabnav-tab-cur{%endif%}"><a href="{% url 'group_manage' group.id %}">{% trans "Admin" %}</a></li>
|
<li class="tabnav-tab {% if cur == 'admin'%}tabnav-tab-cur{%endif%}"><a href="{% url 'group_manage' group.id %}">{% trans "Admin" %}</a></li>
|
||||||
|
|
||||||
<li class="tabnav-tab"><a id="enable-mods" href="#"><img src="{{MEDIA_URL}}img/calcplus-16.png" title="{% trans "Available Modules" %}" alt="{% trans "Available Modules"%}" /></a></li>
|
<li class="tabnav-tab"><a id="enable-mods" href="#" title="{% trans "Enable Modules" %}"><span class="icon-ellipsis-horizontal"></span></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<form id="mods-enable-form" method="post" action="{% url 'toggle_modules' %}" class="hide">{% csrf_token%}
|
<form id="mods-enable-form" method="post" action="{% url 'toggle_modules' %}" class="hide">{% csrf_token%}
|
||||||
<h3>{% trans "Available Modules"%}</h3>
|
<h3>{% trans "Enable Modules"%}</h3>
|
||||||
<div>
|
<ul>
|
||||||
{% for mod in mods_available %}
|
{% for mod in mods_available %}
|
||||||
{% if mod == 'personal wiki' %}
|
{% if mod == 'personal wiki' %}
|
||||||
<span><input type="checkbox" name="personal_wiki" {%if mod in mods_enabled%}checked {% endif%}/></span>
|
<li>
|
||||||
<span>{% trans "Personal Wiki" %}</span>
|
<input class="vam" type="checkbox" name="personal_wiki" {%if mod in mods_enabled%}checked {% endif%}/>
|
||||||
|
<span class="vam">{% trans "Personal Wiki" %}</span>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</ul>
|
||||||
|
|
||||||
<input type="submit" id="mods-enable-submit" value="{% trans "Submit"%}" class="submit"/>
|
<input type="submit" id="mods-enable-submit" value="{% trans "Submit"%}" class="submit"/>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<li class="tabnav-tab"><a id="enable-mods" href="#"><img src="{{MEDIA_URL}}img/calcplus-16.png" title="{% trans "Available Modules" %}" alt="{% trans "Available Modules"%}" /></a></li>
|
<li class="tabnav-tab"><a id="enable-mods" href="#" title="{% trans "Enable Modules" %}"><span class="icon-ellipsis-horizontal"></span></a></li>
|
||||||
|
@@ -46,8 +46,13 @@ def personal_wiki(request, page_name="home"):
|
|||||||
content, repo, dirent = get_personal_wiki_page(username, page_name)
|
content, repo, dirent = get_personal_wiki_page(username, page_name)
|
||||||
except WikiDoesNotExist:
|
except WikiDoesNotExist:
|
||||||
wiki_exists = False
|
wiki_exists = False
|
||||||
|
# get available modules(wiki, etc)
|
||||||
|
mods_available = get_available_mods_by_user(username)
|
||||||
|
mods_enabled = get_enabled_mods_by_user(username)
|
||||||
return render_to_response("wiki/personal_wiki.html", {
|
return render_to_response("wiki/personal_wiki.html", {
|
||||||
"wiki_exists": wiki_exists,
|
"wiki_exists": wiki_exists,
|
||||||
|
"mods_enabled": mods_enabled,
|
||||||
|
"mods_available": mods_available,
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
except WikiPageMissing:
|
except WikiPageMissing:
|
||||||
repo = get_personal_wiki_repo(username)
|
repo = get_personal_wiki_repo(username)
|
||||||
|
Reference in New Issue
Block a user