]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/user.html
OSQA-263
[osqa.git] / forum / skins / default / templates / user.html
index ad71505094ccecb595f546f7cd581ead7c95ae23..89fd69f396ecf9de6111b72722506c8bfce3b9b7 100644 (file)
@@ -3,6 +3,8 @@
 {% load extra_tags %}
 {% load extra_filters %}
 {% load humanize %}
+{% load smart_if %}
+
 {% block title %}{% spaceless %}{{ page_title }}{% endspaceless %}{% endblock %}
 {% block forestyle%}
     <style type="text/css">
        </style>
 {% endblock %}
 {% block forejs %}
-    {% if request.user.is_superuser %}
-        <script type='text/javascript' src='{% media  "/media/js/jquery.form.js" %}'></script>
+    {% if request.user.is_superuser or request.user == view_user %}
+        <script type="text/javascript">google.load("jquery", "1.4.2");google.load("jqueryui", "1.8.1");</script>
+        <script src="{% media "/media/js/osqa.user.js" %}" type="text/javascript"></script>
+
+        <link rel="stylesheet" href="http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery-ui.css" type="text/css" media="all" />
+        <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />
+        <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/user.css" %}"/>
     {% endif %}
     <script type="text/javascript">
         var viewUserID = {{view_user.id}};
                 $("#nav_users").attr('className',"on");
             {% endifequal %}
         });
-
-        $(document).ready( function(){
-            var options = {
-                           success: function(a,b){$('.admin #action_status').html($.i18n._('changes saved'));},
-                           dataType:'json',
-                           timeout:5000,
-                           url: scriptUrl + $.i18n._('moderate-user/') + viewUserID +  '/'
-                            };
-            var form = $('.admin #moderate_user_form').ajaxForm(options);
-            var box = $('.admin input#id_is_approved').click(function(){
-                $('.admin #action_status').html($.i18n._('sending data...'));
-                form.ajaxSubmit(options);
-            });
-        });
     </script>
     {% block userjs %}
     {% endblock %}
 {% endblock %}
 {% block content %}
     <div id="mainbar-full">
-        {% include "user_info.html" %}
-        {% include "user_tabs.html" %}
+        {% include "users/info.html" %}
+        {% include "users/tabs.html" %}
         {% block usercontent %}
         {% endblock %}
-        {%comment%}{% include "user_footer.html" %}{%endcomment%}
+        {%comment%}{% include "users/footer.html" %}{%endcomment%}
        </div>
 {% endblock %}<!-- end user.html -->