diff options
-rw-r--r-- | askbot/api.py | 4 | ||||
-rw-r--r-- | askbot/context.py | 11 | ||||
-rw-r--r-- | askbot/skins/common/media/images/sprites.png | bin | 12545 -> 12940 bytes | |||
-rw-r--r-- | askbot/skins/default/media/images/sprites.png | bin | 12705 -> 12478 bytes | |||
-rw-r--r-- | askbot/skins/default/media/images/sprites_source/sprites.svg | 160 | ||||
-rw-r--r-- | askbot/skins/default/media/style/style.css | 408 | ||||
-rw-r--r-- | askbot/skins/default/media/style/style.less | 38 | ||||
-rw-r--r-- | askbot/skins/default/templates/meta/bottom_scripts.html | 6 | ||||
-rw-r--r-- | askbot/skins/default/templates/meta/html_head_stylesheets.html | 3 | ||||
-rw-r--r-- | askbot/skins/default/templates/widgets/meta_nav.html | 22 | ||||
-rw-r--r-- | askbot/tests/page_load_tests.py | 5 | ||||
-rw-r--r-- | askbot/views/commands.py | 10 | ||||
-rw-r--r-- | askbot/views/users.py | 11 |
13 files changed, 544 insertions, 134 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 3422c701..402183ea 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 @@ -46,9 +47,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 Binary files differindex e7244673..c372f9fa 100644 --- a/askbot/skins/common/media/images/sprites.png +++ b/askbot/skins/common/media/images/sprites.png diff --git a/askbot/skins/default/media/images/sprites.png b/askbot/skins/default/media/images/sprites.png Binary files differindex 8c513508..c4e9029c 100644 --- a/askbot/skins/default/media/images/sprites.png +++ b/askbot/skins/default/media/images/sprites.png diff --git a/askbot/skins/default/media/images/sprites_source/sprites.svg b/askbot/skins/default/media/images/sprites_source/sprites.svg index 585e578f..1c16c89c 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="1.8095563" + inkscape:cx="-20.257428" + inkscape:cy="137.9209" 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,89.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,127.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,163.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" @@ -501,7 +513,7 @@ sodipodi:cy="147.08873" sodipodi:rx="11.136931" sodipodi:ry="9.0156116" - d="m 234.75944,147.08873 a 11.136931,9.0156116 0 1 1 -22.27386,0 11.136931,9.0156116 0 1 1 22.27386,0 z" + d="m 234.75944,147.08873 c 0,4.97918 -4.98617,9.01561 -11.13693,9.01561 -6.15075,0 -11.13693,-4.03643 -11.13693,-9.01561 0,-4.97918 4.98618,-9.01561 11.13693,-9.01561 6.15076,0 11.13693,4.03643 11.13693,9.01561 z" transform="matrix(1.2054549,0,0,1.1341085,-99.371969,741.25595)" /> </g> </svg> diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css index c8d92f60..a2b6f194 100644 --- a/askbot/skins/default/media/style/style.css +++ b/askbot/skins/default/media/style/style.css @@ -29,7 +29,7 @@ body { line-height: 150%; margin: 0; padding: 0; - color: #000; + color: #666; font-family: Arial; } div { @@ -67,6 +67,11 @@ select { font-family: Trebuchet MS, "segoe ui", Helvetica, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif; margin-left: 0px; } +input[type="text"].prompt, +input[type="password"].prompt { + font-style: italic; + color: #707070; +} textarea:focus, input:focus { outline: none; @@ -194,10 +199,9 @@ body.user-messages { padding: 0; text-align: center; background-color: #f5dd69; - border-top: #fff 1px solid; font-family: 'Open Sans Condensed', Arial, sans-serif; } -.notify p.notification { +.notify .notification { margin-top: 6px; margin-bottom: 6px; font-size: 16px; @@ -307,16 +311,23 @@ body.user-messages { text-decoration: underline; } #metaNav #navTags { - background: -50px -5px url(../images/sprites.png) no-repeat; + background: 0px -95px url(../images/sprites.png) no-repeat; } #metaNav #navUsers { - background: -125px -5px url(../images/sprites.png) no-repeat; + background: 3px -132px url(../images/sprites.png) no-repeat; } #metaNav #navGroups { - background: -125px -5px url(../images/sprites.png) no-repeat; + background: 3px -132px url(../images/sprites.png) no-repeat; } #metaNav #navBadges { - background: -210px -5px url(../images/sprites.png) no-repeat; + background: 0px -170px url(../images/sprites.png) no-repeat; +} +#metaNav .dropdown { + float: left; +} +#metaNav .dropdown-menu { + top: 120%; + left: 7%; } #header.with-logo #userToolsNav { position: absolute; @@ -372,6 +383,22 @@ body.user-messages { #secondaryHeader #scopeWrapper .ask-message { font-size: 24px; } +.validate-email-page label { + color: #707070; + line-height: 1.35; + display: block; + margin: 10px 0; +} +.validate-email-page #validation-code { + padding-left: 5px; + border: #cce6ec 3px solid; + height: 25px; + font-size: 14px; + width: 200px; +} +.validate-email-page form { + margin-bottom: 30px; +} #searchBar { /* Main search form , check widgets/search_bar.html */ @@ -527,6 +554,7 @@ body.anon #searchBar .searchInputCancelable { margin-bottom: 4px; color: #707070; font-family: 'Open Sans Condensed', Arial, sans-serif; + font-size: 14px; } .box p.info-box-follow-up-links { text-align: right; @@ -557,6 +585,9 @@ body.anon #searchBar .searchInputCancelable { .box .contributorback { background: #eceeeb url(../images/contributorsback.png) no-repeat center left; } +.box form { + margin: 0px; +} .box label { color: #707070; font-size: 15px; @@ -600,6 +631,7 @@ body.anon #searchBar .searchInputCancelable { padding-left: 5px; border: #c9c9b5 1px solid; height: 25px; + font-size: 14px; } .box .inputs #ab-tag-search { width: 138px; @@ -762,13 +794,20 @@ body.anon #searchBar .searchInputCancelable { } .questions-related p { line-height: 20px; - padding: 4px 0px 4px 0px; + padding: 4px 0px 9px 0px; font-size: 16px; font-weight: normal; border-bottom: #cccccc 1px solid; } +.questions-related p:first-child { + margin-top: -4px; +} +.questions-related p:last-child { + border: none; +} .questions-related a { font-size: 13px; + line-height: 1.3; } /* tips and markdown help are widgets for ask template */ #tips li { @@ -1239,10 +1278,68 @@ ul#related-tags li { .tags a:hover { color: #1A1A1A; } +.users-page th, +.tags-page th, +.groups-page th, +.moderate-tags-page th { + padding-bottom: 5px; + font-weight: normal; +} .users-page h1, .tags-page h1, -.groups-page h1 { +.groups-page h1, +.moderate-tags-page h1 { float: left; + padding-top: 7px; +} +.moderate-tags-page button { + line-height: 18px; +} +.moderate-tags-page table { + border-spacing: 0; +} +.moderate-tags-page table.suggested-tags-table { + width: 100%; +} +.moderate-tags-page th { + font-style: italic; +} +.moderate-tags-page th, +.moderate-tags-page tr { + vertical-align: top; + text-align: left; + padding-right: 20px; +} +.moderate-tags-page td.per-thread-controls { + width: 120px; + /* 20px more to compensate for the padding */ + + height: 30px; +} +.moderate-tags-page td.per-thread-controls button { + display: none; +} +.moderate-tags-page th.decision-col, +.moderate-tags-page th.tags-col, +.moderate-tags-page th.users-col { + width: 100px; +} +.moderate-tags-page tr.per-tag-controls { + height: 30px; + text-align: center; +} +.moderate-tags-page tr.thread-info a { + line-height: 18px; +} +.moderate-tags-page tr.thread-info td { + padding-bottom: 5px; +} +.moderate-tags-page td.tags-col, +.moderate-tags-page td.users-col { + padding-top: 7px; +} +.moderate-tags-page td.thread-links-col { + padding-top: 5px; } .main-page h1 { margin-right: 5px; @@ -1358,7 +1455,116 @@ ul#related-tags li { font-size: 13px; } .ask-page #id_tags, -.edit-question-page #id_tags, +.edit-question-page #id_tags { + border: #cce6ec 3px solid; + height: 25px; + padding-left: 5px; + font-size: 14px; + width: 395px; +} +.ask-page #id_post_author_username, +.question-page #id_post_author_username, +.edit-question-page #id_post_author_username, +.edit-answer-page #id_post_author_username, +.ask-page #id_post_author_email, +.question-page #id_post_author_email, +.edit-question-page #id_post_author_email, +.edit-answer-page #id_post_author_email { + border: #cce6ec 3px solid; + height: 25px; + padding-left: 5px; + font-size: 14px; + width: 186px; +} +.ask-page #id_post_author_email, +.question-page #id_post_author_email, +.edit-question-page #id_post_author_email, +.edit-answer-page #id_post_author_email { + margin-left: 10px; +} +.ask-page table.proxy-user-info, +.question-page table.proxy-user-info, +.edit-question-page table.proxy-user-info, +.edit-answer-page table.proxy-user-info { + border-spacing: 0px; +} +.ask-page table.proxy-user-info .form-item, +.question-page table.proxy-user-info .form-item, +.edit-question-page table.proxy-user-info .form-item, +.edit-answer-page table.proxy-user-info .form-item { + float: left; +} +.groups-input, +.users-input { + width: 152px; + padding-left: 5px; + border: #c9c9b5 1px solid; + height: 25px; + font-size: 14px; +} +.add-groups, +.add-users { + border: 0; + font-weight: bold; + margin-top: -2px; + height: 27px; + font-size: 14px; + text-align: center; + text-decoration: none; + cursor: pointer; + color: #4a757f; + font-family: 'Open Sans Condensed', Arial, sans-serif; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; + border-top: #eaf2f3 1px solid; + background-color: #d1e2e5; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#d1e2e5), color-stop(25%, #d1e2e5), to(#a9c2c7)); + background-image: -webkit-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7); + background-image: -moz-linear-gradient(top, #d1e2e5, #d1e2e5 25%, #a9c2c7); + background-image: -ms-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7); + background-image: -o-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7); + background-image: linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7); + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-box-shadow: 1px 1px 2px #636363; + -moz-box-shadow: 1px 1px 2px #636363; + box-shadow: 1px 1px 2px #636363; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; +} +.share-input-col { + width: 160px; + text-align: center; +} +.add-everyone-group { + text-align: center; + margin: auto; + display: block; + padding: 0 10px; + height: 25px; +} +.add-groups:hover { + background-color: #cde5e9; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#cde5e9), color-stop(25%, #cde5e9), to(#94b3ba)); + background-image: -webkit-linear-gradient(#cde5e9, #cde5e9 25%, #94b3ba); + background-image: -moz-linear-gradient(top, #cde5e9, #cde5e9 25%, #94b3ba); + background-image: -ms-linear-gradient(#cde5e9, #cde5e9 25%, #94b3ba); + background-image: -o-linear-gradient(#cde5e9, #cde5e9 25%, #94b3ba); + background-image: linear-gradient(#cde5e9, #cde5e9 25%, #94b3ba); + text-decoration: none; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; +} #id_user, #id_user_author { border: #cce6ec 3px solid; @@ -1372,6 +1578,14 @@ ul#related-tags li { font-size: 13px; margin-bottom: 5px; } +.ask-page .title-desc, +.question-page .title-desc, +.ask-page .tags-desc, +.question-page .tags-desc { + color: #707070; + font-style: italic; + font-size: 16px; +} #fmanswer input.submit, .ask-page input.submit, .edit-question-page input.submit { @@ -1428,6 +1642,10 @@ ul#related-tags li { } .wmd-container { border: #cce6ec 3px solid; + min-height: 250px; +} +.wmd-container textarea { + border: none; } .users-page .wmd-container { width: 200px; @@ -1445,6 +1663,12 @@ ul#related-tags li { width: 710px; padding: 6px; } +.ask-page .retagger-buttons button, +.question-page .retagger-buttons button, +.edit-question-page .retagger-buttons button, +.edit-answer-page .retagger-buttons button { + margin: 8px 10px 5px 0; +} #editor { /* adjustment for editor preview */ @@ -1590,6 +1814,12 @@ ul#related-tags li { width: 682px; margin-bottom: 10px; } +.question-page .question-content pre, +.question-page .answer pre, +.question-page .question-content code, +.question-page .answer code { + clear: both; +} .question-page #question-table { float: left; border-top: #f0f0f0 1px solid; @@ -1781,9 +2011,6 @@ ul#related-tags li { .question-page #fmanswer_button { margin: 8px 0px; } -.question-page #fmanswer_button.answer-own-question { - width: 150px; -} .question-page .question-img-favorite:hover { background: url(../images/vote-favorite-on.png); } @@ -2311,6 +2538,26 @@ ul#related-tags li { .user-profile-page .cancel:hover { background: url(../images/small-button-cancel.png) repeat-x bottom !important; } +.openid-signin .re, +.meta .re, +.users-page .re, +.user-profile-edit-page .re, +.user-profile-page .re { + float: left; + width: 960px; +} +.inbox-flags.user-profile-page .re { + width: 810px; +} +.inbox-flags.user-profile-page .post-moderation-controls { + float: left; + width: 150px; + margin-top: 23px; + text-align: right; +} +.inbox-flags.user-profile-page .dropdown:hover ul.dropdown-menu { + display: block; +} .openid-signin form { margin-bottom: 5px; } @@ -2443,7 +2690,6 @@ ul#related-tags li { } /* tags page */ .tabBar-tags { - width: 270px; margin-bottom: 15px; } /* badges page */ @@ -2801,7 +3047,7 @@ ins { width: 100%; clear: both; border-top: 1px solid #000; - padding: 6px 0 0 0; + padding: 16px 0 0 0; background: #16160f; font-size: 16px; font-family: 'Open Sans Condensed', Arial, sans-serif; @@ -2812,14 +3058,14 @@ ins { .footer-links { color: #EEE; text-align: left; - width: 500px; + width: 450px; float: left; } .footer-links a { color: #e7e8a8; } .powered-link { - width: 500px; + width: 450px; float: left; text-align: left; } @@ -2828,7 +3074,7 @@ ins { } .copyright { color: #616161; - width: 450px; + width: 500px; float: right; text-align: right; } @@ -3394,38 +3640,41 @@ a.edit { padding-left: 3px; color: #145bff; } -.str { +pre { + /* name conflict here with tags */ + +} +pre .str { color: #080; } -.kwd { +pre .kwd { color: #008; } -.com { +pre .com { color: #800; } -.typ { +pre .typ { color: #606; } -.lit { +pre .lit { color: #066; } -.pun { +pre .pun { color: #660; } -.pln { +pre .pln { color: #000; } -.tag { +pre .tag { color: #008; } -/* name conflict here */ -.atn { +pre .atn { color: #606; } -.atv { +pre .atv { color: #080; } -.dec { +pre .dec { color: #606; } pre.prettyprint { @@ -3434,38 +3683,38 @@ pre.prettyprint { border: 0px solid #888; } @media print { - .str { + pre .str { color: #060; } - .kwd { + pre .kwd { color: #006; font-weight: bold; } - .com { + pre .com { color: #600; font-style: italic; } - .typ { + pre .typ { color: #404; font-weight: bold; } - .lit { + pre .lit { color: #044; } - .pun { + pre .pun { color: #440; } - .pln { + pre .pln { color: #000; } - .tag { + pre .tag { color: #006; font-weight: bold; } - .atn { + pre .atn { color: #404; } - .atv { + pre .atv { color: #060; } } @@ -3563,6 +3812,13 @@ textarea.tipped-input { font-size: 14px; line-height: 25px; } +.select-box li input { + margin: 0 0 2px -5px; + font-size: 14px; + line-height: 14px; + vertical-align: middle; + color: #707070; +} .select-box li.selected, .select-box li.selected:hover { background-color: #fcf8e3; @@ -3572,6 +3828,78 @@ textarea.tipped-input { background-color: #cecece; color: white; } +/* category selector */ +.category-selector { + border-spacing: 0; +} +.category-selector ul.select-box { + height: 150px; + width: 235px; + overflow: auto; + border: #ccc 3px solid; +} +.category-selector td { + vertical-align: top; +} +.category-selector li { + position: relative; + color: #707070; +} +.category-selector li.tree:after { + content: ">>"; + position: absolute; + right: 5px; + font-weight: bold; +} +.category-selector li.selected.tree:after { + color: #C09853; +} +.category-selector th { + color: #707070; + font-style: italic; + font-size: 16px; + font-weight: normal; + padding-top: 5px; + text-align: left; +} +.question-page .category-selector ul.select-box { + width: 217px; +} +.question-page .category-selector ul.select-box input { + width: 95px; +} +.question-page .tag-editor { + width: 660px; + margin-left: 0; +} +.editor-status { + float: right; + margin: 7px 350px 0 0; + font-weight: bold; +} +.editor-status span { + display: none; +} +/* tag editor */ +.tag-editor { + height: 64px; + border: #ccc 3px solid; + padding-left: 8px; +} +.tag-editor ul.tags { + margin: 0; +} +.tag-editor ul.tags li { + margin-top: 8px; + height: 13px; +} +.tag-editor input.new-tags-input { + border-style: none; + font-size: 15px; + font-color: #707070; + line-height: 16px; + margin-top: 9px; +} /* fixes for bootstrap */ .caret { margin-bottom: 7px; diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less index cb72efe4..fd934141 100644 --- a/askbot/skins/default/media/style/style.less +++ b/askbot/skins/default/media/style/style.less @@ -313,19 +313,28 @@ body.user-messages { } #navTags{ - .sprites(-50px,-5px) + .sprites(0px,-95px) } #navUsers{ - .sprites(-125px,-5px) + .sprites(3px,-132px) } #navGroups{ - .sprites(-125px,-5px) + .sprites(3px,-132px) } #navBadges{ - .sprites(-210px,-5px) + .sprites(0px,-170px) + } + + .dropdown { + float:left; + } + + .dropdown-menu{ + top: 120%; + left: 7%; } } @@ -3840,3 +3849,24 @@ textarea.tipped-input { box-shadow: none; } } + +/* fixes for bootstrap */ +.caret { + margin-bottom: 7px; +} +.btn-group { + text-align: left; +} +.btn-toolbar { + margin: 0; +} +.modal-footer { + text-align: left; +} +.modal p { + font-size: 14px; +} +.modal-body > textarea { + 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 ea763b76..067e4cc4 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"> /*<![CDATA[*/ $(document).ready(function(){ @@ -75,6 +78,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 5f83cea1..cadc69e0 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 1b28c787..6cfd44a5 100644 --- a/askbot/skins/default/templates/widgets/meta_nav.html +++ b/askbot/skins/default/templates/widgets/meta_nav.html @@ -1,20 +1,28 @@ +{% 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" 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" href="{% url users %}" {% if active_tab == 'users' %}class="on"{% endif %} >{% trans %}users{% endtrans %}</a> -{% if settings.GROUPS_ENABLED %} -<a - id="navGroups" - href="{% url groups %}" - {% if active_tab == 'groups' %}class="on"{% endif %} ->{% trans %}groups{% endtrans %} -</a> {% endif %} {% if settings.BADGES_MODE == 'public' %} <a diff --git a/askbot/tests/page_load_tests.py b/askbot/tests/page_load_tests.py index 7d833339..f3e10c1e 100644 --- a/askbot/tests/page_load_tests.py +++ b/askbot/tests/page_load_tests.py @@ -519,6 +519,11 @@ class PageLoadTestCase(AskbotTestCase): template='user_profile/user_inbox.html', ) + def test_user_page_with_groups_enabled(self): + askbot_settings.GROUPS_ENABLED = True + self.try_url('users', status_code=302) + askbot_settings.GROUPS_ENABLED = False + self.try_url('users', status_code=200) class AvatarTests(AskbotTestCase): 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) diff --git a/askbot/views/users.py b/askbot/views/users.py index d192ade9..7494f932 100644 --- a/askbot/views/users.py +++ b/askbot/views/users.py @@ -59,6 +59,15 @@ def owner_or_moderator_required(f): def show_users(request, by_group=False, group_id=None, group_slug=None): """Users view, including listing of users by group""" + + if askbot_settings.GROUPS_ENABLED and not by_group: + default_group = get_global_group() + group_slug = slugify(default_group.name) + new_url = reverse('users_by_group', + kwargs={'group_id': default_group.id, + 'group_slug': group_slug}) + return HttpResponseRedirect(new_url) + users = models.User.objects.exclude(status = 'b') group = None group_email_moderation_enabled = False @@ -397,7 +406,7 @@ def user_stats(request, user, context): interesting_tag_names = None ignored_tag_names = None subscribed_tag_names = None - + # tags = models.Post.objects.filter(author=user).values('id', 'thread', 'thread__tags') # post_ids = set() # thread_ids = set() |