forked from karolpiczak-old/meltdown-pl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New optional admin interface, and closing OSQA 253.
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@254 0cfe37f9-358a-4d5e-be75-b63607b5c754
- Loading branch information
hernani
committed
May 13, 2010
1 parent
19af2f1
commit 1876ec0
Showing
20 changed files
with
356 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
textarea { | ||
width: 100%; | ||
} | ||
|
||
input.longstring { | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{% extends basetemplate %} | ||
|
||
{% load i18n %} | ||
{% load user_tags %} | ||
|
||
{% block subtitle %} | ||
{% trans "Dashboard" %} | ||
{% endblock %} | ||
{% block description %} | ||
{% trans "Welcome to the OSQA administration area." %} | ||
{% endblock %} | ||
|
||
{% block admincontent %} | ||
<div class="module" style="width:49%; display: inline-block; vertical-align: top;"> | ||
<table style="width: 100%; height: 100%;"> | ||
<caption>{% trans "Quick statistics" %}</caption> | ||
<tr> | ||
<td> | ||
{{ statistics.total_questions }} {% trans "question" %}{{ statistics.total_questions|pluralize }} ({{ statistics.questions_last_24 }} {% trans "in the last 24 hours" %}) | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
{{ statistics.total_answers }} {% trans "answer" %}{{ statistics.total_answers|pluralize }} ({{ statistics.answers_last_24 }} {% trans "in the last 24 hours" %}) | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
{{ statistics.total_users }} {% trans "user" %}{{ statistics.total_users|pluralize }} ({{ statistics.users_last_24 }} {% trans "joined in the last 24 hours" %}) | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class="module" style="width:49%; display: inline-block;"> | ||
<table> | ||
<caption>{%trans "Site status" %}</caption> | ||
<tr> | ||
<td> | ||
{% ifequal settings_pack "bootstrap" %} | ||
{% trans "Your site is running in bootstrap mode, click the button below to revert to defaults." %}<br /> | ||
{% else %} | ||
{% ifequal settings_pack "default" %} | ||
{% trans "Your site is running in standard mode, click the button below to run in bootstrap mode." %}<br /> | ||
{% else %} | ||
{% trans "Your site is running with some customized settings, click the buttons below to run with defaults or in bootstrap mode" %} | ||
{% endifequal %} | ||
{% endifequal %} | ||
{% ifnotequal settings_pack "default" %} | ||
<button onclick="if (window.confirm('{% trans "Are you sure you want to revert to the defaults?" %}')) window.location='{% url admin_go_defaults %}';">{% trans "revert to defaults" %}</button> | ||
{% endifnotequal %} | ||
{% ifnotequal settings_pack "bootstrap" %} | ||
<button onclick="if (window.confirm('{% trans "Are you sure you want to run bootstrap mode?" %}')) window.location='{% url admin_go_bootstrap %}';">{% trans "go bootstrap" %}</button> | ||
{% endifnotequal %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<em>"Bootstrap mode" relaxes the minimum required reputation to perform actions like voting and commenting. | ||
This is useful to help new communities get started.</em> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class="module" style="width:98%; display: inline-block;"> | ||
<table width="100%"> | ||
<caption>{% trans "Recent activity" %}</caption> | ||
<tr> | ||
<td colspan="2"> | ||
<table width="100%"> | ||
{% for activity in recent_activity %} | ||
<tr><td>{% activity_item activity request.user %}</td></tr> | ||
{% endfor %} | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
{% endblock %} |
103 changes: 103 additions & 0 deletions
103
forum/skins/default/templates/osqaadmin/djstyle_base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{% load extra_tags %} | ||
{% load i18n %} | ||
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/base.css" type="text/css"/> | ||
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/forms.css" type="text/css"/> | ||
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/changelists.css" type="text/css"/> | ||
<link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/djstyle_admin.css" %}"/> | ||
<script src="http://www.google.com/jsapi" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
//<!-- | ||
google.load("jquery", "1.3"); | ||
//--> | ||
</script> | ||
<script type="text/javascript" src="{% media "/media/js/osqa.admin.js" %}"></script> | ||
{% block adminjs %}{% endblock %} | ||
<title>{% trans "OSQA administration area" %} - {% block subtitle %}{% endblock %}</title> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<div id="header"> | ||
{% block header %} | ||
<div id="branding"> | ||
<h1 id="site-name"><a href="{% url index %}">{{ settings.APP_SHORT_NAME }} - {% trans "Administration Area" %}</a> </h1> | ||
</div> | ||
{% endblock %} | ||
<div id="user-tools"> | ||
{% trans "Welcome," %} | ||
<strong>{{ request.user.username }}</strong>. | ||
<a href="{% url admin_switch_interface %}?to=default">{% trans "To standard interface" %}</a> / <a href="{% url logout %}">{% trans "Log out" %}</a> | ||
</div> | ||
</div> | ||
<div class="breadcrumbs"> | ||
<a href="{% url index %}">{% trans "Home" %}</a> > | ||
<a href="{% url admin_index %}">{% trans "Dashboard" %}</a> > | ||
{% block pagename %}{% endblock %} - | ||
{% block description %}{% endblock %} | ||
</div> | ||
<div id="content" class="colMS"> | ||
<div id="content-main"> | ||
{% block admincontent %}{% endblock %} | ||
</div> | ||
<div id="content-related"> | ||
<div id="basic-sets-menu" class="module"> | ||
<h2>{% trans "Basic settings" %}</h2> | ||
<ul> | ||
<li><a href="{% url admin_set allsets.basic.name %}">{{ allsets.basic.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.users.name %}">{{ allsets.users.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.email.name %}">{{ allsets.email.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.paths.name %}">{{ allsets.paths.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.extkeys.name %}">{{ allsets.extkeys.title }}</a></li> | ||
</ul> | ||
</div> | ||
<div id="workflow-sets-menu" class="module"> | ||
<h2>{% trans "Workflow settings" %}</h2> | ||
<ul> | ||
<li><a href="{% url admin_set allsets.repgain.name %}">{{ allsets.repgain.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.minrep.name %}">{{ allsets.minrep.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.voting.name %}">{{ allsets.voting.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.badges.name %}">{{ allsets.badges.title }}</a></li> | ||
</ul> | ||
</div> | ||
<div id="forum-sets-menu" class="module"> | ||
<h2>{% trans "Forum settings" %}</h2> | ||
<ul> | ||
<li><a href="{% url admin_set allsets.form.name %}">{{ allsets.form.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.moderation.name %}">{{ allsets.moderation.title }}</a></li> | ||
</ul> | ||
</div> | ||
<div id="pages-sets-menu" class="module"> | ||
<h2>{% trans "Static content" %}</h2> | ||
<ul> | ||
<li><a href="{% url admin_set allsets.about.name %}">{{ allsets.about.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.faq.name %}">{{ allsets.faq.title }}</a></li> | ||
<li><a href="{% url admin_set allsets.sidebar.name %}">{{ allsets.sidebar.title }}</a></li> | ||
</ul> | ||
</div> | ||
<div id="other-sets-menu" class="module"> | ||
<h2>{% trans "Other settings" %}</h2> | ||
<ul> | ||
{% for set in othersets %} | ||
<li><a href="{% url admin_set set.name %}">{{ set.title }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% comment %}<div id="tools-menu" class="module"> | ||
<h2>{% trans "Tools" %}</h2> | ||
<ul> | ||
<li><a href="{% url admin_statistics %}">{% trans "Statistics" %}</a></li> | ||
</ul> | ||
</div>{% endcomment %} | ||
</div> | ||
</div> | ||
<div id="footer" class="breadcumbs"> | ||
<a href="http://www.osqa.net">OSQA</a> <span class="version">{{ settings.OSQA_VERSION }}</span> | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="module" style="width:385px; height:300px; display: inline-block;"> | ||
<table style="width: 100%; height: 100%"> | ||
<caption>{{ graph.caption }}</caption> | ||
<tr> | ||
<td> | ||
<div style="width: 100%; height: 100%" id="{{ graph.id }}"></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.