summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-21 23:14:40 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-21 23:14:40 -0600
commit4dc291874ac195875b5727a9c91c0830e5d7e79d (patch)
tree89c47a66926809d9b4298efe17a7a332f8a80cb4
parentc53f74c7ac9a5b7ad76ee3025466b1e27f9f006c (diff)
downloadaskbot-4dc291874ac195875b5727a9c91c0830e5d7e79d.tar.gz
askbot-4dc291874ac195875b5727a9c91c0830e5d7e79d.tar.bz2
askbot-4dc291874ac195875b5727a9c91c0830e5d7e79d.zip
added dropdown menu to lists groups in the templates, modified the sprite file to make it work better
-rw-r--r--askbot/api.py4
-rw-r--r--askbot/context.py11
-rw-r--r--askbot/skins/common/media/images/sprites.pngbin12545 -> 12940 bytes
-rw-r--r--askbot/skins/default/media/images/sprites.pngbin12705 -> 12997 bytes
-rw-r--r--askbot/skins/default/media/images/sprites_source/sprites.svg158
-rw-r--r--askbot/skins/default/media/style/style.less19
-rw-r--r--askbot/skins/default/templates/meta/bottom_scripts.html6
-rw-r--r--askbot/skins/default/templates/meta/html_head_stylesheets.html3
-rw-r--r--askbot/skins/default/templates/widgets/meta_nav.html15
-rw-r--r--askbot/views/commands.py10
10 files changed, 137 insertions, 89 deletions
diff --git a/askbot/api.py b/askbot/api.py
index 57d5c1aa..9f37995e 100644
--- a/askbot/api.py
+++ b/askbot/api.py
@@ -9,7 +9,7 @@ from askbot import models
from askbot import const
def get_info_on_moderation_items(user):
- """returns a dictionary with
+ """returns a dictionary with
counts of new and seen moderation items for a given user
if user is not a moderator or admin, returns None
"""
@@ -48,7 +48,7 @@ def get_admin(seed_user_id = None):
if the user is not found, or there are no moderators/admins
User.DoesNotExist will be raised
-
+
The reason this function is here and not on a manager of
the user object is because we still patch the django-auth User table
and it's probably better not to patch the manager
diff --git a/askbot/context.py b/askbot/context.py
index 03a2d1d8..5db008ff 100644
--- a/askbot/context.py
+++ b/askbot/context.py
@@ -6,6 +6,7 @@ import sys
from django.conf import settings
import askbot
from askbot import api
+from askbot import models
from askbot import const
from askbot.conf import settings as askbot_settings
from askbot.skins.loaders import get_skin
@@ -44,9 +45,17 @@ def application_settings(request):
my_settings['LOGOUT_REDIRECT_URL'] = url_utils.get_logout_redirect_url()
my_settings['USE_ASKBOT_LOGIN_SYSTEM'] = 'askbot.deps.django_authopenid' \
in settings.INSTALLED_APPS
- return {
+ context = {
'settings': my_settings,
'skin': get_skin(request),
'moderation_items': api.get_info_on_moderation_items(request.user),
'noscript_url': const.DEPENDENCY_URLS['noscript'],
}
+
+ if askbot_settings.GROUPS_ENABLED:
+ context['group_list'] = models.Tag.group_tags.get_all().filter(
+ deleted=False
+ ).exclude(
+ name__startswith='_internal_')
+
+ return context
diff --git a/askbot/skins/common/media/images/sprites.png b/askbot/skins/common/media/images/sprites.png
index e7244673..c372f9fa 100644
--- a/askbot/skins/common/media/images/sprites.png
+++ b/askbot/skins/common/media/images/sprites.png
Binary files differ
diff --git a/askbot/skins/default/media/images/sprites.png b/askbot/skins/default/media/images/sprites.png
index 8c513508..4e7dd074 100644
--- a/askbot/skins/default/media/images/sprites.png
+++ b/askbot/skins/default/media/images/sprites.png
Binary files differ
diff --git a/askbot/skins/default/media/images/sprites_source/sprites.svg b/askbot/skins/default/media/images/sprites_source/sprites.svg
index 585e578f..0fce0ed1 100644
--- a/askbot/skins/default/media/images/sprites_source/sprites.svg
+++ b/askbot/skins/default/media/images/sprites_source/sprites.svg
@@ -14,9 +14,9 @@
height="207"
id="svg3448"
version="1.1"
- inkscape:version="0.48.1 r9760"
+ inkscape:version="0.48.3.1 r9886"
sodipodi:docname="sprites.svg"
- inkscape:export-filename="/home/bcorrales/personal/askbot/sprites.png"
+ inkscape:export-filename="/home/fitoria/code/askbot-devel/askbot/skins/default/media/images/sprites.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
@@ -221,16 +221,16 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="-14.220783"
- inkscape:cy="199.46611"
+ inkscape:zoom="5.118198"
+ inkscape:cx="12.402135"
+ inkscape:cy="109.70793"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1316"
- inkscape:window-height="744"
- inkscape:window-x="50"
- inkscape:window-y="24"
+ inkscape:window-width="1366"
+ inkscape:window-height="723"
+ inkscape:window-x="-3"
+ inkscape:window-y="-3"
inkscape:window-maximized="1" />
<metadata
id="metadata3453">
@@ -240,7 +240,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -348,69 +348,81 @@
x="28.158876"
y="953.7583"
style="font-size:14.30124187px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#e90f0f;fill-opacity:1;font-family:Trebuchet MS;-inkscape-font-specification:Trebuchet MS">X</tspan></text>
- <path
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="/home/bcorrales/personal/oxfam/arte/disenoindex.png"
- id="path5443"
- d="m 60.268935,856.20911 c -1.0424,-0.85947 -2.66478,-0.61037 -3.61221,0.54899 -0.95263,1.15795 -0.86987,2.79882 0.17873,3.65569 1.0444,0.86116 2.66667,0.61206 3.61631,-0.54959 0.94503,-1.16205 0.86746,-2.79822 -0.17854,-3.65559 z m 5.88263,18.6866 -12.99549,-10.63781 c -0.44703,-0.36346 -0.64755,-0.93014 -0.58638,-1.50242 -0.05,-0.11386 -0.087,-0.2505 -0.10985,-0.41064 l -1.33739,-8.83579 c -0.14424,-0.94964 0.5206,-1.76262 1.48163,-1.8085 l 8.91926,-0.44173 c 0.38495,-0.019 1.49952,0.35486 1.78501,0.58457 l 12.99449,10.6375 c 0.74232,0.60366 0.7989,1.77001 0.12665,2.5924 l -7.71322,9.43427 c -0.66824,0.82178 -1.8207,0.99492 -2.56061,0.38925 z"
- clip-rule="evenodd"
- style="fill:#e7e8a8;fill-opacity:1;fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#16160f;fill-opacity:1;fill-rule:evenodd"
- clip-rule="evenodd"
- d="m 60.685375,857.34507 c -0.92055,-0.75811 -2.28652,-0.61896 -3.04183,0.30448 -0.75951,0.92235 -0.62036,2.28942 0.30498,3.04553 0.92224,0.7595 2.28822,0.62046 3.04513,-0.30508 0.75321,-0.92595 0.61866,-2.28902 -0.30479,-3.04533 z m 5.77547,15.77522 -11.47288,-9.38529 c -0.39445,-0.32067 -0.58837,-0.79999 -0.56038,-1.27301 -0.047,-0.097 -0.084,-0.21191 -0.11056,-0.34586 l -1.50572,-7.39855 c -0.16224,-0.79519 0.36786,-1.44284 1.18105,-1.44084 l 7.54948,0.01 c 0.32578,4e-4 1.28701,0.35796 1.53911,0.56048 l 11.47158,9.38508 c 0.65525,0.53279 0.75211,1.50442 0.21612,2.15966 l -6.14833,7.51602 c -0.5325,0.65474 -1.50312,0.75031 -2.15627,0.21591 z"
- id="path5445"
- inkscape:export-filename="/home/bcorrales/personal/oxfam/arte/disenoindex.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90"
- inkscape:transform-center-x="0.5180824"
- inkscape:transform-center-y="-0.28622416" />
- <path
- inkscape:connector-curvature="0"
- id="path5457"
- d="m 143.74707,850.88647 c -5.0386,0.15973 -7.45306,6.82507 -4.44845,10.23363 -5.35784,2.62945 -3.73419,8.64761 -3.90826,13.70497 6.23105,0 12.46221,0 18.69326,0 -0.0342,-5.17704 1.38659,-11.61813 -4.44823,-13.9621 3.5491,-4.27537 -0.52838,-10.73631 -5.88832,-9.9765 z"
- style="fill:#e7e8a8;fill-opacity:1;stroke:none" />
- <path
- sodipodi:type="arc"
- style="fill:#16160f;fill-opacity:1;stroke:none"
- id="path5461"
- sodipodi:cx="-1766"
- sodipodi:cy="1210.3622"
- sodipodi:rx="20.875"
- sodipodi:ry="19.875"
- d="m -1746.6683,1217.8622 c -4.3506,10.1651 -16.5325,15.0477 -27.209,10.9056 -10.6766,-4.1422 -15.8049,-15.7405 -11.4544,-25.9056 4.3506,-10.1651 16.5325,-15.0477 27.209,-10.9056 10.6563,4.1342 15.789,15.6991 11.4755,25.8559"
- sodipodi:start="0.38694167"
- sodipodi:end="6.6674319"
- sodipodi:open="true"
- transform="matrix(0.23246322,0,0,0.23246322,554.98367,575.74893)" />
- <path
- style="fill:#16160f;fill-opacity:1;stroke:none"
- d="m 142.46627,862.02883 c -2.77296,0 -5.03938,2.03973 -5.40307,4.70966 l -0.021,0 0,0.11384 c -0.0243,0.20805 -0.0408,0.42712 -0.0408,0.64178 0,0.21103 0.0177,0.41632 0.0408,0.62106 l 0,5.0718 15.40196,0 0,-5.0718 c 0.0232,-0.20474 0.0408,-0.41003 0.0408,-0.62106 0,-0.21466 -0.0177,-0.43373 -0.0408,-0.64178 l 0,-0.11384 -0.021,0 c -0.3638,-2.66993 -2.63021,-4.70966 -5.40306,-4.70966 l -1.03504,0 -1.35592,2.81554 -1.36629,-2.81554 -0.79699,0 z"
- id="path5463"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:0.95734594;fill:#e7e8a8;fill-opacity:1;stroke:none"
- d="m 230.09729,852.03013 c -1.6542,0.0555 -2.75231,2.08638 -1.97699,3.52883 -0.63135,1.02386 -1.18707,3.28768 -2.84533,2.51282 -1.58254,0.6738 -2.41713,-1.60371 -3.98172,-0.91457 -2.15656,0.50838 -2.50044,3.95528 -0.28646,4.60984 0.66658,0.11836 1.38854,0.19214 1.38577,1.01628 1.32012,1.04282 0.20536,3.35241 -1.27491,3.51052 -2.03524,0.99474 -1.52604,4.44609 0.79456,4.64674 1.48119,0.14147 2.53871,-1.5326 4.09258,-0.89608 1.17551,0.24938 1.76747,1.60242 2.05078,2.54048 -1.0087,1.8897 1.18605,4.16804 3.10405,3.20566 1.39067,-0.4601 1.85188,-2.07121 1.37652,-3.31653 0.41369,-0.83912 1.05271,-1.65965 1.6075,-2.34648 1.24643,-0.35941 2.55425,-0.14896 3.50119,0.71142 2.08378,0.88286 4.38154,-1.75378 2.95628,-3.63073 -0.53953,-1.15942 -2.19299,-0.66667 -2.50358,-1.94916 -0.82635,-1.06372 -0.34544,-2.40575 0.47111,-3.2519 0.51485,-0.51216 1.80066,-0.20231 2.15249,-1.1363 1.70737,-1.91245 -1.15266,-5.07734 -3.21491,-3.54741 -0.69552,1.09312 -1.98439,0.81045 -3.03932,0.8406 -0.98808,-0.56654 -1.66816,-1.89082 -1.84763,-2.90081 0.49774,-1.68564 -0.70875,-3.40169 -2.52198,-3.23322 z"
- id="path5491"
- inkscape:connector-curvature="0" />
- <path
- id="path5404"
- d="m 230.30968,853.20332 c -0.69043,0 -1.25641,0.56589 -1.25641,1.25632 0,0.41517 0.20601,0.77958 0.51734,1.00695 l -2.22628,3.81547 -4.22185,-0.009 c 0,0 0,-0.009 0,-0.009 -0.11993,-0.56552 -0.62747,-0.98854 -1.22877,-0.98854 -0.69034,0 -1.24707,0.55663 -1.24707,1.24716 0,0.69044 0.55673,1.24708 1.24707,1.24708 0.21813,0 0.4221,-0.0582 0.60056,-0.15692 l 2.01389,3.51967 -1.85688,3.19642 c -0.13232,-0.0472 -0.27629,-0.0841 -0.42497,-0.0841 -0.69044,0 -1.24717,0.55674 -1.24717,1.24727 0,0.69052 0.55673,1.25641 1.24717,1.25641 0.54915,0 1.01452,-0.35784 1.18244,-0.84994 l 3.88926,-0.0185 2.19872,3.72291 c -0.28692,0.22904 -0.48036,0.57421 -0.48036,0.96996 0,0.69053 0.55664,1.24726 1.24717,1.24726 0.69044,0 1.25641,-0.55673 1.25641,-1.24726 0,-0.37153 -0.16764,-0.70403 -0.42497,-0.93297 l 2.24487,-3.7599 4.02786,-0.009 c 0.13796,0.54037 0.62682,0.94231 1.21018,0.94231 0.69053,0 1.24717,-0.55673 1.24717,-1.24716 0,-0.69053 -0.55664,-1.25643 -1.24717,-1.25643 -0.18003,0 -0.3534,0.0425 -0.5081,0.11087 l -1.95849,-3.4089 2.05087,-3.53826 c 0.18262,0.10449 0.38447,0.16634 0.60971,0.16634 0.69053,0 1.25641,-0.55663 1.25641,-1.24707 0,-0.69062 -0.56588,-1.24726 -1.25641,-1.24726 -0.63921,0 -1.15415,0.48026 -1.22867,1.09941 l -4.13864,0.0185 -2.32808,-3.83387 c 0.28794,-0.22904 0.48045,-0.57347 0.48045,-0.96996 0,-0.69053 -0.55673,-1.25641 -1.24726,-1.25641 z"
- style="opacity:0.95734594;fill:#16160f;fill-opacity:1;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- transform="matrix(0.05048908,0,0,0.04995915,374.93399,727.37564)"
- d="m -2780.5,2735.8623 c 0,45.5635 -37.3842,82.5 -83.5,82.5 -46.1158,0 -83.5,-36.9365 -83.5,-82.5 0,-45.5635 37.3842,-82.5 83.5,-82.5 46.1158,0 83.5,36.9365 83.5,82.5 z"
- sodipodi:ry="82.5"
- sodipodi:rx="83.5"
- sodipodi:cy="2735.8623"
- sodipodi:cx="-2864"
- id="path5754"
- style="opacity:0.95734594;fill:#e7e8a8;fill-opacity:1;stroke:none"
- sodipodi:type="arc" />
+ <g
+ id="g3045"
+ transform="translate(-46.460961,81.75573)">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#e7e8a8;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ clip-rule="evenodd"
+ d="m 60.268935,856.20911 c -1.0424,-0.85947 -2.66478,-0.61037 -3.61221,0.54899 -0.95263,1.15795 -0.86987,2.79882 0.17873,3.65569 1.0444,0.86116 2.66667,0.61206 3.61631,-0.54959 0.94503,-1.16205 0.86746,-2.79822 -0.17854,-3.65559 z m 5.88263,18.6866 -12.99549,-10.63781 c -0.44703,-0.36346 -0.64755,-0.93014 -0.58638,-1.50242 -0.05,-0.11386 -0.087,-0.2505 -0.10985,-0.41064 l -1.33739,-8.83579 c -0.14424,-0.94964 0.5206,-1.76262 1.48163,-1.8085 l 8.91926,-0.44173 c 0.38495,-0.019 1.49952,0.35486 1.78501,0.58457 l 12.99449,10.6375 c 0.74232,0.60366 0.7989,1.77001 0.12665,2.5924 l -7.71322,9.43427 c -0.66824,0.82178 -1.8207,0.99492 -2.56061,0.38925 z"
+ id="path5443"
+ inkscape:export-filename="/home/bcorrales/personal/oxfam/arte/disenoindex.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ inkscape:transform-center-y="-0.28622416"
+ inkscape:transform-center-x="0.5180824"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/bcorrales/personal/oxfam/arte/disenoindex.png"
+ id="path5445"
+ d="m 60.685375,857.34507 c -0.92055,-0.75811 -2.28652,-0.61896 -3.04183,0.30448 -0.75951,0.92235 -0.62036,2.28942 0.30498,3.04553 0.92224,0.7595 2.28822,0.62046 3.04513,-0.30508 0.75321,-0.92595 0.61866,-2.28902 -0.30479,-3.04533 z m 5.77547,15.77522 -11.47288,-9.38529 c -0.39445,-0.32067 -0.58837,-0.79999 -0.56038,-1.27301 -0.047,-0.097 -0.084,-0.21191 -0.11056,-0.34586 l -1.50572,-7.39855 c -0.16224,-0.79519 0.36786,-1.44284 1.18105,-1.44084 l 7.54948,0.01 c 0.32578,4e-4 1.28701,0.35796 1.53911,0.56048 l 11.47158,9.38508 c 0.65525,0.53279 0.75211,1.50442 0.21612,2.15966 l -6.14833,7.51602 c -0.5325,0.65474 -1.50312,0.75031 -2.15627,0.21591 z"
+ clip-rule="evenodd"
+ style="fill:#16160f;fill-opacity:1;fill-rule:evenodd"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g3049"
+ transform="translate(-130.64701,119.66187)">
+ <path
+ style="fill:#e7e8a8;fill-opacity:1;stroke:none"
+ d="m 143.74707,850.88647 c -5.0386,0.15973 -7.45306,6.82507 -4.44845,10.23363 -5.35784,2.62945 -3.73419,8.64761 -3.90826,13.70497 6.23105,0 12.46221,0 18.69326,0 -0.0342,-5.17704 1.38659,-11.61813 -4.44823,-13.9621 3.5491,-4.27537 -0.52838,-10.73631 -5.88832,-9.9765 z"
+ id="path5457"
+ inkscape:connector-curvature="0" />
+ <path
+ transform="matrix(0.23246322,0,0,0.23246322,554.98367,575.74893)"
+ sodipodi:open="true"
+ sodipodi:end="6.6674319"
+ sodipodi:start="0.38694167"
+ d="m -1746.6683,1217.8622 c -4.3506,10.1651 -16.5325,15.0477 -27.209,10.9056 -10.6766,-4.1422 -15.8049,-15.7405 -11.4544,-25.9056 4.3506,-10.1651 16.5325,-15.0477 27.209,-10.9056 10.6563,4.1342 15.789,15.6991 11.4755,25.8559"
+ sodipodi:ry="19.875"
+ sodipodi:rx="20.875"
+ sodipodi:cy="1210.3622"
+ sodipodi:cx="-1766"
+ id="path5461"
+ style="fill:#16160f;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path5463"
+ d="m 142.46627,862.02883 c -2.77296,0 -5.03938,2.03973 -5.40307,4.70966 l -0.021,0 0,0.11384 c -0.0243,0.20805 -0.0408,0.42712 -0.0408,0.64178 0,0.21103 0.0177,0.41632 0.0408,0.62106 l 0,5.0718 15.40196,0 0,-5.0718 c 0.0232,-0.20474 0.0408,-0.41003 0.0408,-0.62106 0,-0.21466 -0.0177,-0.43373 -0.0408,-0.64178 l 0,-0.11384 -0.021,0 c -0.3638,-2.66993 -2.63021,-4.70966 -5.40306,-4.70966 l -1.03504,0 -1.35592,2.81554 -1.36629,-2.81554 -0.79699,0 z"
+ style="fill:#16160f;fill-opacity:1;stroke:none" />
+ </g>
+ <g
+ id="g3054"
+ transform="translate(-214.86075,155.94135)">
+ <path
+ inkscape:connector-curvature="0"
+ id="path5491"
+ d="m 230.09729,852.03013 c -1.6542,0.0555 -2.75231,2.08638 -1.97699,3.52883 -0.63135,1.02386 -1.18707,3.28768 -2.84533,2.51282 -1.58254,0.6738 -2.41713,-1.60371 -3.98172,-0.91457 -2.15656,0.50838 -2.50044,3.95528 -0.28646,4.60984 0.66658,0.11836 1.38854,0.19214 1.38577,1.01628 1.32012,1.04282 0.20536,3.35241 -1.27491,3.51052 -2.03524,0.99474 -1.52604,4.44609 0.79456,4.64674 1.48119,0.14147 2.53871,-1.5326 4.09258,-0.89608 1.17551,0.24938 1.76747,1.60242 2.05078,2.54048 -1.0087,1.8897 1.18605,4.16804 3.10405,3.20566 1.39067,-0.4601 1.85188,-2.07121 1.37652,-3.31653 0.41369,-0.83912 1.05271,-1.65965 1.6075,-2.34648 1.24643,-0.35941 2.55425,-0.14896 3.50119,0.71142 2.08378,0.88286 4.38154,-1.75378 2.95628,-3.63073 -0.53953,-1.15942 -2.19299,-0.66667 -2.50358,-1.94916 -0.82635,-1.06372 -0.34544,-2.40575 0.47111,-3.2519 0.51485,-0.51216 1.80066,-0.20231 2.15249,-1.1363 1.70737,-1.91245 -1.15266,-5.07734 -3.21491,-3.54741 -0.69552,1.09312 -1.98439,0.81045 -3.03932,0.8406 -0.98808,-0.56654 -1.66816,-1.89082 -1.84763,-2.90081 0.49774,-1.68564 -0.70875,-3.40169 -2.52198,-3.23322 z"
+ style="opacity:0.95734594;fill:#e7e8a8;fill-opacity:1;stroke:none" />
+ <path
+ inkscape:connector-curvature="0"
+ style="opacity:0.95734594;fill:#16160f;fill-opacity:1;stroke:none"
+ d="m 230.30968,853.20332 c -0.69043,0 -1.25641,0.56589 -1.25641,1.25632 0,0.41517 0.20601,0.77958 0.51734,1.00695 l -2.22628,3.81547 -4.22185,-0.009 c 0,0 0,-0.009 0,-0.009 -0.11993,-0.56552 -0.62747,-0.98854 -1.22877,-0.98854 -0.69034,0 -1.24707,0.55663 -1.24707,1.24716 0,0.69044 0.55673,1.24708 1.24707,1.24708 0.21813,0 0.4221,-0.0582 0.60056,-0.15692 l 2.01389,3.51967 -1.85688,3.19642 c -0.13232,-0.0472 -0.27629,-0.0841 -0.42497,-0.0841 -0.69044,0 -1.24717,0.55674 -1.24717,1.24727 0,0.69052 0.55673,1.25641 1.24717,1.25641 0.54915,0 1.01452,-0.35784 1.18244,-0.84994 l 3.88926,-0.0185 2.19872,3.72291 c -0.28692,0.22904 -0.48036,0.57421 -0.48036,0.96996 0,0.69053 0.55664,1.24726 1.24717,1.24726 0.69044,0 1.25641,-0.55673 1.25641,-1.24726 0,-0.37153 -0.16764,-0.70403 -0.42497,-0.93297 l 2.24487,-3.7599 4.02786,-0.009 c 0.13796,0.54037 0.62682,0.94231 1.21018,0.94231 0.69053,0 1.24717,-0.55673 1.24717,-1.24716 0,-0.69053 -0.55664,-1.25643 -1.24717,-1.25643 -0.18003,0 -0.3534,0.0425 -0.5081,0.11087 l -1.95849,-3.4089 2.05087,-3.53826 c 0.18262,0.10449 0.38447,0.16634 0.60971,0.16634 0.69053,0 1.25641,-0.55663 1.25641,-1.24707 0,-0.69062 -0.56588,-1.24726 -1.25641,-1.24726 -0.63921,0 -1.15415,0.48026 -1.22867,1.09941 l -4.13864,0.0185 -2.32808,-3.83387 c 0.28794,-0.22904 0.48045,-0.57347 0.48045,-0.96996 0,-0.69053 -0.55673,-1.25641 -1.24726,-1.25641 z"
+ id="path5404" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.95734594;fill:#e7e8a8;fill-opacity:1;stroke:none"
+ id="path5754"
+ sodipodi:cx="-2864"
+ sodipodi:cy="2735.8623"
+ sodipodi:rx="83.5"
+ sodipodi:ry="82.5"
+ d="m -2780.5,2735.8623 c 0,45.5635 -37.3842,82.5 -83.5,82.5 -46.1158,0 -83.5,-36.9365 -83.5,-82.5 0,-45.5635 37.3842,-82.5 83.5,-82.5 46.1158,0 83.5,36.9365 83.5,82.5 z"
+ transform="matrix(0.05048908,0,0,0.04995915,374.93399,727.37564)" />
+ </g>
<path
style="fill:url(#radialGradient5712-8);fill-opacity:1"
d="m 9.7549531,922.45495 c -0.094,-0.046 -0.2146,-0.1465 -0.2675,-0.2235 -0.092,-0.1328 -0.097,-0.507 -0.1104,-7.2852 l -0.014,-7.1451 5.5932999,-4.8985 c 3.0763,-2.6941 5.6262,-4.9108 5.6664,-4.9262 0.044,-0.017 2.291499,1.9154 5.694699,4.8961 l 5.6214,4.9239 -0.014,7.1474 c -0.013,6.7953 -0.019,7.1546 -0.1108,7.2883 -0.2172,0.3162 -0.1184,0.3086 -4.0168,0.3086 l -3.5623,0 -6e-4,-3.0266 c -6e-4,-1.6648 -0.016,-3.1187 -0.035,-3.2313 -0.022,-0.1319 -0.098,-0.2677 -0.2151,-0.3832 l -0.1811,-0.1789 -3.152299,0 -3.1523,0 -0.181,0.1789 c -0.1168,0.1155 -0.1931,0.2513 -0.2152,0.3832 -0.019,0.1126 -0.034,1.5665 -0.035,3.2313 l -5e-4,3.0266 -3.5704,0 c -3.1432,0 -3.5909999,-0.012 -3.7417999,-0.085 z m -4.3178,-15.0177 c -0.4595,-0.5139 -0.8170004,-0.9502 -0.7943004,-0.9695 0.023,-0.019 3.6131004,-3.1609 7.9784003,-6.9811 4.3654,-3.82019 7.9797,-6.94589 8.0317,-6.94589 0.052,0 3.651199,3.11599 7.998399,6.92429 4.3473,3.8085 7.9377,6.949 7.9789,6.9791 0.059,0.043 -0.096,0.24591 -0.764,0.9929 -0.7293,0.8159 -0.8498,0.9293 -0.9245,0.8704 -0.047,-0.038 -3.2709,-2.8571 -7.1641,-6.26639 -3.8931,-3.40961 -7.098499,-6.1989 -7.123099,-6.1989 -0.025,0 -3.2475,2.8051 -7.1619,6.23339 -3.9143999,3.4285 -7.1400999,6.2475 -7.1684999,6.2648 -0.028,0.018 -0.4273,-0.3892 -0.887,-0.9031 z m 3.9274,-9.9518 0,-2.96499 2.0325999,0 2.0326,0 0,0.9707 c 0,1.5539 0.2495,1.16 -2.0161,3.1826 -1.0729,0.95779 -1.9728999,1.74949 -1.9998999,1.75909 -0.03,0.011 -0.048,-1.1677 -0.048,-2.9474 z"
diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less
index 51a9d77a..67e678b9 100644
--- a/askbot/skins/default/media/style/style.less
+++ b/askbot/skins/default/media/style/style.less
@@ -312,19 +312,28 @@ body.user-messages {
}
#navTags{
- .sprites(-50px,-5px)
+ .sprites(7px,-81px)
}
#navUsers{
- .sprites(-125px,-5px)
+ .sprites(12px,-120px)
}
#navGroups{
- .sprites(-125px,-5px)
+ .sprites(10px,-120px)
}
#navBadges{
- .sprites(-210px,-5px)
+ .sprites(10px,-157px)
+ }
+
+ .dropdown {
+ float:left;
+ }
+
+ .dropdown-menu{
+ top: 120%;
+ left: 7%;
}
}
@@ -3802,3 +3811,5 @@ textarea.tipped-input {
width: 515px;
margin-bottom: 0px;
}
+
+
diff --git a/askbot/skins/default/templates/meta/bottom_scripts.html b/askbot/skins/default/templates/meta/bottom_scripts.html
index 2a7c85a5..de0df142 100644
--- a/askbot/skins/default/templates/meta/bottom_scripts.html
+++ b/askbot/skins/default/templates/meta/bottom_scripts.html
@@ -41,6 +41,9 @@
});
</script>
{% endif %}
+{%if settings.GROUPS_ENABLED%}
+<script type="text/javascript" src="{{'/bootstrap/js/bootstrap.js'|media}}" /></script>
+{% endif %}
<script type="text/javascript">
$(document).ready(function(){
{% if active_tab == 'questions' %}
@@ -74,6 +77,9 @@
if (askbot['data']['userIsAdminOrMod']) {
$('body').addClass('admin');
}
+ {%if settings.GROUPS_ENABLED%}
+ $(".dropdown-toggle").dropdown();
+ {% endif %}
});
{% if user_messages %}
$('#validate_email_alert').click(function(){notify.close(true)})
diff --git a/askbot/skins/default/templates/meta/html_head_stylesheets.html b/askbot/skins/default/templates/meta/html_head_stylesheets.html
index 8977f152..d97b0bff 100644
--- a/askbot/skins/default/templates/meta/html_head_stylesheets.html
+++ b/askbot/skins/default/templates/meta/html_head_stylesheets.html
@@ -1,3 +1,6 @@
+{%if settings.GROUPS_ENABLED%}
+<link href="{{'/bootstrap/css/bootstrap.css'|media}}" rel="stylesheet" type="text/css" />
+{% endif %}
{% if settings.ASKBOT_CSS_DEVEL == False %}
<link href="{{"/style/style.css"|media }}" rel="stylesheet" type="text/css" />
diff --git a/askbot/skins/default/templates/widgets/meta_nav.html b/askbot/skins/default/templates/widgets/meta_nav.html
index 077e781e..6cfd44a5 100644
--- a/askbot/skins/default/templates/widgets/meta_nav.html
+++ b/askbot/skins/default/templates/widgets/meta_nav.html
@@ -1,15 +1,22 @@
+{% import "macros.html" as macros%}
<a
id="navTags"
href="{% url tags %}"
{% if active_tab == 'tags' %}class="on"{% endif %}
>{% trans %}tags{% endtrans %}</a>
{% if settings.GROUPS_ENABLED %}
+<span class="dropdown">
<a
- id="navGroups"
- href="{% url groups %}"
- {% if active_tab == 'groups' %}class="on"{% endif %}
->{% trans %}people & groups{% endtrans %}
+ id="navGroups" class='dropdown-toggle {% if active_tab == 'groups' %}"on"{% endif %}'
+ href="{% url groups %}" data-target="#" >
+ {% trans %}people & groups{% endtrans %}
</a>
+<ul id="groups-dropdown" class="dropdown-menu" role="menu" aria-labelledby="navGroups">
+ {%for group in group_list%}
+ <li>{{ macros.user_group_link(group) }}</li>
+ {%endfor%}
+</ul>
+</span>
{%else%}
<a
id="navUsers"
diff --git a/askbot/views/commands.py b/askbot/views/commands.py
index aa602f55..a399e8c8 100644
--- a/askbot/views/commands.py
+++ b/askbot/views/commands.py
@@ -331,7 +331,7 @@ def vote(request, id):
response_data['count'] = post.offensive_flag_count
response_data['success'] = 1
-
+
elif vote_type in ['7.6', '8.6']:
#flag question or answer
if vote_type == '7.6':
@@ -469,7 +469,7 @@ def get_tags_by_wildcard(request):
wildcard = request.GET.get('wildcard', None)
if wildcard is None:
raise Http404
-
+
matching_tags = models.Tag.objects.get_by_wildcards( [wildcard,] )
count = matching_tags.count()
names = matching_tags.values_list('name', flat = True)[:20]
@@ -917,7 +917,7 @@ def edit_group_membership(request):
@decorators.admins_only
def save_group_logo_url(request):
"""saves urls for the group logo"""
- form = forms.GroupLogoURLForm(request.POST)
+ form = forms.GroupLogoURLForm(request.POST)
if form.is_valid():
group_id = form.cleaned_data['group_id']
image_url = form.cleaned_data['image_url']
@@ -1055,8 +1055,8 @@ def save_post_reject_reason(request):
@decorators.admins_only
def moderate_suggested_tag(request):
"""accepts or rejects a suggested tag
- if thread id is given, then tag is
- applied to or removed from only one thread,
+ if thread id is given, then tag is
+ applied to or removed from only one thread,
otherwise the decision applies to all threads
"""
form = forms.ModerateTagForm(request.POST)