base.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {% extends "misago/base.html" %}
  2. {% load i18n misago_avatars %}
  3. {% block title %}{{ profile }}: {{ active_page.name }} {% if page_number > 1 %}({% blocktrans with page=page_number %}Page {{ number }}{% endblocktrans %}) {% endif %}| {{ block.super }}{% endblock title %}
  4. {% block meta-description %}{% blocktrans trimmed with user=profile joined_on=profile.joined_on|date %}
  5. {{ user }} is member since {{ joined_on }}.
  6. {% endblocktrans %}{% endblock meta-description %}
  7. {% block content %}
  8. <div class="user-profile {% if profile.rank.css_class %}profile-{{ profile.rank.css_class }}{% endif %}">
  9. <div class="page-header profile-header">
  10. <div class="container">
  11. <div class="row">
  12. <div class="col-md-9 col-md-offset-3">
  13. {% include "misago/profile/header.html" %}
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="container">
  19. <div class="row">
  20. <div class="col-md-3 profile-side">
  21. {% include "misago/profile/side.html" %}
  22. </div>
  23. <div class="col-md-9">
  24. {% block page %}{% endblock page %}
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <div id="reply-form-placeholder"></div>
  30. {% endblock content %}
  31. {% block javascripts %}
  32. {% include "misago/modusers/mod_js.html" %}
  33. <script type="text/javascript">
  34. $(function() {
  35. {% if profile.acl_.can_have_attitude %}
  36. $('.dynamic-button').submit(function() {
  37. var $form = $(this);
  38. var $button = $form.find('button');
  39. $.post($form.attr('action'), $form.serialize(), function(data) {
  40. Misago.Alerts.success(data.message);
  41. if (data.is_following) {
  42. $button.addClass('active');
  43. } else {
  44. $button.removeClass('active');
  45. }
  46. });
  47. return false;
  48. });
  49. {% endif %}
  50. {% if can_message %}
  51. $('.btn-message').click(function() {
  52. Misago.Posting.load({
  53. api_url: "{% url 'misago:start_private_thread' %}",
  54. on_load: function() {
  55. var participants = new Misago.Participants($('.thread-participants-input'));
  56. participants.add_user({
  57. username: "{{ profile.username }}",
  58. avatar: {30: "{{ profile|avatar:30 }}"}
  59. })
  60. }
  61. });
  62. });
  63. {% endif %}
  64. });
  65. </script>
  66. {% endblock javascripts %}