Commit 8e9249aad20053054a5bee02e353a00f1205c6cb

Authored by fbormann
2 parents 1923eeb8 a02b60aa

Merge branch 'refactoring' of https://github.com/amadeusproject/amadeuslms into refactoring

amadeus/static/css/.sass-cache/a7f87b90919294b62ab4f8079e31dcda8f485534/green.sassc
No preview for this file type
amadeus/static/css/themes/green.css
... ... @@ -459,7 +459,7 @@ a.add-row {
459 459 .suggestions {
460 460 background: #FFFFFF; }
461 461  
462   -.mural-category, .mural-subject {
  462 +.mural-ungeneral {
463 463 background: #EEE; }
464 464  
465 465 .btn:not(.btn-raised):not(.btn-link):focus, .btn:not(.btn-raised):not(.btn-link):hover, .input-group-btn .btn:not(.btn-raised):not(.btn-link):focus, .input-group-btn .btn:not(.btn-raised):not(.btn-link):hover {
... ...
amadeus/static/css/themes/green.css.map
1 1 {
2 2 "version": 3,
3   -"mappings": "AAOA,gJAAgJ;EAC5I,gBAAgB,EAAE,KAAK;;AAG3B,mBAAmB;EACf,KAAK,EAXO,OAAO;;AAcvB,gGAA4F;EACxF,gBAAgB,EAfJ,OAAO;;AAkBvB,kGAA8F;EAC1F,YAAY,EAnBA,OAAO;;AAsBvB,iMAAiM;EAC7L,KAAK,EAAE,IAAI;EACX,gBAAgB,EAxBJ,OAAO;EAyBnB,YAAY,EAzBA,OAAO;;AA4BvB,+BAA+B;EAC3B,gBAAgB,EA7BJ,OAAO;EA8BnB,KAAK,EAAE,yBAAqB;;AAGhC,aAAa;EACT,gBAAgB,EAAE,kBAAkB;;AAGxC,YAAY;EACR,UAAU,EAtCE,OAAO;;AAyCvB,iBAAiB;EACb,UAAU,EAzCI,OAAO;;;AA+CzB,+CAA+C;EAC3C,UAAU,EAAE,OAAO;EACnB,KAAK,EAlDO,OAAO;;AAqDvB,qDAAqD;EACjD,KAAK,EAtDO,OAAO;;;AA2DvB,mBAAmB;EACf,gBAAgB,EA5DJ,OAAO;EA6DnB,KAAK,EAAE,KAAK;;AAGhB,qBAAqB;EACjB,KAAK,EAAE,KAAK;;AAGh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,6BAA6B;EACzB,KAAK,EAAE,OAAO;;AAGlB,WAAW;EACP,KAAK,EAAE,OAAO;;AAGlB,mBAAmB;EACf,gBAAgB,EAAE,OAAO;EACzB,UAAU,EAAE,OAAO;;AAGvB,sCAAsC;EAClC,YAAY,EAAE,OAAO;EACrB,UAAU,EArkBN,OAAO;;AAwkBf,gBAAgB;EACZ,UAAU,EA1kBE,OAAO;EA2kBnB,gBAAgB,EAAE,OAAO;;AAG7B,mCAAmC;EAC/B,KAAK,EAAE,OAAO;;AAGlB,aAAa;EACT,KAAK,EAAE,OAAO;;AAGlB,UAAU;EACN,KAAK,EAAE,kBAAkB;;AAG7B,QAAQ;EACJ,KAAK,EAAE,kBAAkB;;AAG7B,YAAY;EACR,UAAU,EA/lBE,OAAO;;AAkmBvB,eAAe;EACX,KAAK,EAAE,OAAO;;AAId,kBAAK;EACD,KAAK,EAAE,OAAO;;AAIlB,cAAC;EACG,KAAK,EAAE,OAAO;;AAGtB,YAAY;EACR,UAAU,EAhnBN,OAAO;;AAmnBf,gBAAgB;EACZ,UAAU,EAAE,IAAI;;AAGpB,gNAAgN;EAC5M,gBAAgB,EAAE,OAAO;;;EAKzB,mDAAmD;IAC/C,KAAK,EAAE,kBAAkB;;EAE7B,yDAAyD;IACrD,KAAK,EAAE,kBAAyB",
4 4 "sources": ["green.sass"],
5 5 "names": [],
6 6 "file": "green.css"
... ...
amadeus/static/css/themes/green.sass
... ... @@ -629,7 +629,7 @@ a.add-row
629 629 background: $white
630 630  
631 631  
632   -.mural-category, .mural-subject
  632 +.mural-ungeneral
633 633 background: #EEE
634 634  
635 635  
... ...
amadeus/static/js/mural_category.js
... ... @@ -1,188 +0,0 @@
1   -$('.mural-category').on('shown.bs.collapse', function(e) {
2   - if($(this).is(e.target)){
3   - var li = $(".breadcrumb").find('li:last-child');
4   - var li_text = $(li).html();
5   - var url = $(".mural_url").val();
6   - var new_li = $(li).clone();
7   -
8   - new_li.html($(this).parent().find('.panel-title span').text());
9   -
10   - $(li).html("<a href='" + url + "'>" + li_text + "</a>");
11   - $(li).append("<span class='divider'>/</span>");
12   -
13   - new_li.appendTo('.breadcrumb');
14   -
15   - var post_section = $(this).find('.posts'),
16   - without = $(this).find('.no-subjects'),
17   - loading = $(this).find('.loading-posts'),
18   - more = $(this).find('.more-posts'),
19   - filters = $(this).find('.post-filters'),
20   - clear_filters = $(this).find('.clear_filter'),
21   - mural = post_section.parent().parent();
22   -
23   - if (post_section.children().length == 0) {
24   - var url = $(this).find('.mural').data('url');
25   -
26   - $.ajax({
27   - url: url,
28   - dataType: 'json',
29   - success: function (data) {
30   - loading.hide();
31   -
32   - if (data.count > 0) {
33   - post_section.append(data.posts);
34   -
35   - mural.data('pages', data.num_pages);
36   - mural.data('page', data.num_page);
37   -
38   - setTimeout(function () { postHeightLimits() }, 100);
39   -
40   - if (data.num_page < data.num_pages) {
41   - more.show();
42   - } else {
43   - more.hide();
44   - }
45   -
46   - $('.mural_badge').each(function () {
47   - var actual = $(this).text();
48   -
49   - if (actual != "+99") {
50   - actual = parseInt(actual, 10) - data.unviewed;
51   -
52   - if (actual <= 0) {
53   - $(this).hide();
54   - } else {
55   - $(this).text(actual);
56   - }
57   - }
58   - });
59   -
60   - $('.cat_badge').each(function () {
61   - var actual = $(this).text();
62   -
63   - if (actual != "+99") {
64   - actual = parseInt(actual, 10) - data.unviewed;
65   -
66   - if (actual < 0) {
67   - actual = 0;
68   - }
69   -
70   - $(this).text(actual);
71   - }
72   - });
73   -
74   - without.hide();
75   - } else {
76   - more.hide();
77   -
78   - without.show();
79   - }
80   - }
81   - });
82   - }
83   -
84   - more.click(function () {
85   - var url = mural.data('url'),
86   - pageNum = mural.data('page'),
87   - numberPages = mural.data('pages'),
88   - favorites = mural.data('fav'),
89   - mine = mural.data('mine'),
90   - showing = new_posts.join(',');
91   -
92   - if (pageNum == numberPages) {
93   - return false
94   - }
95   -
96   - pageNum = pageNum + 1;
97   -
98   - more.hide();
99   -
100   - loading.show();
101   -
102   - $.ajax({
103   - url: url,
104   - data: {'page': pageNum, 'favorite': favorites, 'mine': mine, 'showing': showing},
105   - dataType: 'json',
106   - success: function (data) {
107   - loading.hide();
108   -
109   - post_section.append(data.posts);
110   -
111   - mural.data('pages', data.num_pages);
112   - mural.data('page', data.num_page);
113   -
114   - setTimeout(function () { postHeightLimits() }, 100);
115   -
116   - if (data.num_page < data.num_pages) {
117   - more.show();
118   - } else {
119   - more.hide();
120   - }
121   - }
122   - });
123   - });
124   -
125   - filters.submit(function () {
126   - var favorite = $(this).find("input[name='favorite']").is(':checked') ? "True" : "",
127   - mine = $(this).find("input[name='mine']").is(':checked') ? "True" : "",
128   - url = mural.data('url');
129   -
130   - post_section.html('');
131   -
132   - more.hide();
133   - loading.show();
134   -
135   - $.ajax({
136   - url: url,
137   - data: {'favorite': favorite, 'mine': mine},
138   - dataType: 'json',
139   - success: function (data) {
140   - loading.hide();
141   -
142   - if (data.count > 0) {
143   - post_section.append(data.posts);
144   -
145   - mural.data('pages', data.num_pages);
146   - mural.data('page', data.num_page);
147   -
148   - if (data.num_page < data.num_pages) {
149   - more.show();
150   - } else {
151   - more.hide();
152   - }
153   -
154   - setTimeout(function () { postHeightLimits() }, 100);
155   -
156   - without.hide();
157   - } else {
158   - without.show();
159   - }
160   -
161   - mural.data('fav', favorite);
162   - mural.data('mine', mine);
163   - }
164   - });
165   -
166   - return false;
167   - });
168   -
169   - clear_filters.click(function () {
170   - var frm = $(this).parent();
171   -
172   - frm.find("input[type='checkbox']").prop('checked', false);
173   -
174   - frm.submit();
175   - });
176   - }
177   -});
178   -
179   -$('.mural-category').on('hidden.bs.collapse', function(e) {
180   - if($(this).is(e.target)){
181   - $(".breadcrumb").find('li:last-child').remove();
182   -
183   - var li = $(".breadcrumb").find('li:last-child');
184   - var text = $(li).find('a').text();
185   -
186   - $(li).html(text);
187   - }
188   -});
189 0 \ No newline at end of file
amadeus/static/js/mural_subject.js
... ... @@ -80,6 +80,47 @@ $(&#39;.mural-subject&#39;).on(&#39;shown.bs.collapse&#39;, function(e) {
80 80 }
81 81 });
82 82 }
  83 +
  84 + more.click(function () {
  85 + var url = mural.data('url'),
  86 + pageNum = mural.data('page'),
  87 + numberPages = mural.data('pages'),
  88 + favorites = mural.data('fav'),
  89 + mine = mural.data('mine'),
  90 + showing = new_posts.join(',');
  91 +
  92 + if (pageNum == numberPages) {
  93 + return false
  94 + }
  95 +
  96 + pageNum = pageNum + 1;
  97 +
  98 + more.hide();
  99 +
  100 + loading.show();
  101 +
  102 + $.ajax({
  103 + url: url,
  104 + data: {'page': pageNum, 'favorite': favorites, 'mine': mine, 'showing': showing},
  105 + dataType: 'json',
  106 + success: function (data) {
  107 + loading.hide();
  108 +
  109 + post_section.append(data.posts);
  110 +
  111 + mural.data('pages', data.num_pages);
  112 + mural.data('page', data.num_page);
  113 +
  114 + setTimeout(function () { postHeightLimits() }, 100);
  115 +
  116 + if (data.num_page < data.num_pages) {
  117 + more.show();
  118 + } else {
  119 + more.hide();
  120 + }
  121 + }
  122 + });
  123 + });
83 124 }
84 125 });
85 126  
... ...
amadeus/static/js/mural_ungeneral.js 0 → 100644
... ... @@ -0,0 +1,188 @@
  1 +$('.mural-ungeneral').on('shown.bs.collapse', function(e) {
  2 + if($(this).is(e.target)){
  3 + var li = $(".breadcrumb").find('li:last-child');
  4 + var li_text = $(li).html();
  5 + var url = $(".mural_url").val();
  6 + var new_li = $(li).clone();
  7 +
  8 + new_li.html($(this).parent().find('.panel-title span').text());
  9 +
  10 + $(li).html("<a href='" + url + "'>" + li_text + "</a>");
  11 + $(li).append("<span class='divider'>/</span>");
  12 +
  13 + new_li.appendTo('.breadcrumb');
  14 +
  15 + var post_section = $(this).find('.posts'),
  16 + without = $(this).find('.no-subjects'),
  17 + loading = $(this).find('.loading-posts'),
  18 + more = $(this).find('.more-posts'),
  19 + filters = $(this).find('.post-filters'),
  20 + clear_filters = $(this).find('.clear_filter'),
  21 + mural = post_section.parent().parent();
  22 +
  23 + if (post_section.children().length == 0) {
  24 + var url = $(this).find('.mural').data('url');
  25 +
  26 + $.ajax({
  27 + url: url,
  28 + dataType: 'json',
  29 + success: function (data) {
  30 + loading.hide();
  31 +
  32 + if (data.count > 0) {
  33 + post_section.append(data.posts);
  34 +
  35 + mural.data('pages', data.num_pages);
  36 + mural.data('page', data.num_page);
  37 +
  38 + setTimeout(function () { postHeightLimits() }, 100);
  39 +
  40 + if (data.num_page < data.num_pages) {
  41 + more.show();
  42 + } else {
  43 + more.hide();
  44 + }
  45 +
  46 + $('.mural_badge').each(function () {
  47 + var actual = $(this).text();
  48 +
  49 + if (actual != "+99") {
  50 + actual = parseInt(actual, 10) - data.unviewed;
  51 +
  52 + if (actual <= 0) {
  53 + $(this).hide();
  54 + } else {
  55 + $(this).text(actual);
  56 + }
  57 + }
  58 + });
  59 +
  60 + $('.ung_badge').each(function () {
  61 + var actual = $(this).text();
  62 +
  63 + if (actual != "+99") {
  64 + actual = parseInt(actual, 10) - data.unviewed;
  65 +
  66 + if (actual < 0) {
  67 + actual = 0;
  68 + }
  69 +
  70 + $(this).text(actual);
  71 + }
  72 + });
  73 +
  74 + without.hide();
  75 + } else {
  76 + more.hide();
  77 +
  78 + without.show();
  79 + }
  80 + }
  81 + });
  82 + }
  83 +
  84 + more.click(function () {
  85 + var url = mural.data('url'),
  86 + pageNum = mural.data('page'),
  87 + numberPages = mural.data('pages'),
  88 + favorites = mural.data('fav'),
  89 + mine = mural.data('mine'),
  90 + showing = new_posts.join(',');
  91 +
  92 + if (pageNum == numberPages) {
  93 + return false
  94 + }
  95 +
  96 + pageNum = pageNum + 1;
  97 +
  98 + more.hide();
  99 +
  100 + loading.show();
  101 +
  102 + $.ajax({
  103 + url: url,
  104 + data: {'page': pageNum, 'favorite': favorites, 'mine': mine, 'showing': showing},
  105 + dataType: 'json',
  106 + success: function (data) {
  107 + loading.hide();
  108 +
  109 + post_section.append(data.posts);
  110 +
  111 + mural.data('pages', data.num_pages);
  112 + mural.data('page', data.num_page);
  113 +
  114 + setTimeout(function () { postHeightLimits() }, 100);
  115 +
  116 + if (data.num_page < data.num_pages) {
  117 + more.show();
  118 + } else {
  119 + more.hide();
  120 + }
  121 + }
  122 + });
  123 + });
  124 +
  125 + filters.submit(function () {
  126 + var favorite = $(this).find("input[name='favorite']").is(':checked') ? "True" : "",
  127 + mine = $(this).find("input[name='mine']").is(':checked') ? "True" : "",
  128 + url = mural.data('url');
  129 +
  130 + post_section.html('');
  131 +
  132 + more.hide();
  133 + loading.show();
  134 +
  135 + $.ajax({
  136 + url: url,
  137 + data: {'favorite': favorite, 'mine': mine},
  138 + dataType: 'json',
  139 + success: function (data) {
  140 + loading.hide();
  141 +
  142 + if (data.count > 0) {
  143 + post_section.append(data.posts);
  144 +
  145 + mural.data('pages', data.num_pages);
  146 + mural.data('page', data.num_page);
  147 +
  148 + if (data.num_page < data.num_pages) {
  149 + more.show();
  150 + } else {
  151 + more.hide();
  152 + }
  153 +
  154 + setTimeout(function () { postHeightLimits() }, 100);
  155 +
  156 + without.hide();
  157 + } else {
  158 + without.show();
  159 + }
  160 +
  161 + mural.data('fav', favorite);
  162 + mural.data('mine', mine);
  163 + }
  164 + });
  165 +
  166 + return false;
  167 + });
  168 +
  169 + clear_filters.click(function () {
  170 + var frm = $(this).parent();
  171 +
  172 + frm.find("input[type='checkbox']").prop('checked', false);
  173 +
  174 + frm.submit();
  175 + });
  176 + }
  177 +});
  178 +
  179 +$('.mural-ungeneral').on('hidden.bs.collapse', function(e) {
  180 + if($(this).is(e.target)){
  181 + $(".breadcrumb").find('li:last-child').remove();
  182 +
  183 + var li = $(".breadcrumb").find('li:last-child');
  184 + var text = $(li).find('a').text();
  185 +
  186 + $(li).html(text);
  187 + }
  188 +});
0 189 \ No newline at end of file
... ...
amadeus/static/js/socket.js
... ... @@ -10,35 +10,38 @@ socket.onmessage = function(e) {
10 10 content = JSON.parse(e.data);
11 11  
12 12 if (content.type == "mural") {
13   - if (content.subtype == "create") {
14   - muralNotificationCreate(content);
15   - } else if (content.subtype == "update") {
16   - muralNotificationUpdate(content);
17   - } else if (content.subtype == "delete") {
18   - muralNotificationDelete(content);
19   - } else if (content.subtype == "create_comment") {
  13 + if (content.subtype == "post") {
  14 + muralNotificationPost(content);
  15 + } else if (content.subtype == "mural_update") {
  16 + muralNotificationMuralUpdate(content);
  17 + } else if (content.subtype == "mural_delete") {
  18 + muralNotificationMuralDelete(content);
  19 + } else if (content.subtype == "comment") {
20 20 muralNotificationComment(content);
21   - } else if (content.subtype == "update_comment") {
22   - muralNotificationCommentUpdate(content);
23   - } else if (content.subtype == "delete_comment") {
24   - muralNotificationCommentDelete(content);
25   - } else if (content.subtype == "create_cat") {
26   - muralNotificationCategory(content);
27   - } else if (content.subtype == "update_cat") {
28   - muralNotificationCategoryUpdate(content);
29   - } else if (content.subtype == "delete_cat") {
30   - muralNotificationCategoryDelete(content);
31 21 }
32 22 }
33 23 }
34 24 // Call onopen directly if socket is already open
35 25 if (socket.readyState == WebSocket.OPEN) socket.onopen();
36 26  
37   -function muralNotificationCreate(content) {
38   - if (window.location.pathname == content.pathname) {
39   - $('.posts').prepend(content.complete);
  27 +function muralNotificationPost(content) {
  28 + var page = window.location.pathname,
  29 + render = (content.paths.indexOf(page) != -1);
40 30  
41   - $('.no-subjects').attr('style', 'display:none');
  31 + if ((render && page.indexOf(content.post_type) != -1) || (render && content.post_type == "general")) {
  32 + if (content.accordion) {
  33 + var section = $(content.container);
  34 +
  35 + if (section.is(':visible')) {
  36 + section.find('.posts').prepend(content.complete);
  37 +
  38 + section.find('.no-subjects').hide();
  39 + }
  40 + } else {
  41 + $(content.container).prepend(content.complete);
  42 +
  43 + $('.no-subjects').attr('style', 'display:none');
  44 + }
42 45 } else {
43 46 $('.mural_badge').each(function () {
44 47 var actual = $(this).text();
... ... @@ -55,12 +58,43 @@ function muralNotificationCreate(content) {
55 58  
56 59 $(this).show();
57 60 });
  61 +
  62 + $('.mural-tabs').find('li').each(function () {
  63 + var identity = $(this).data('mural');
  64 +
  65 + if (identity == content.post_type) {
  66 + var span = $(this).find('span'),
  67 + actual = span.text();
  68 +
  69 + actual = parseInt(actual, 10) + 1;
  70 +
  71 + span.text(actual);
  72 + }
  73 + });
  74 +
  75 + if (content.post_type == "subject") {
  76 + var slug = content.container.substring(1, content.container.length),
  77 + subject_mbadge = $("#subject_" + slug).find('.mural_notify'),
  78 + actual = subject_mbadge.text();
  79 +
  80 + if (actual != "+99") {
  81 + actual = parseInt(actual, 10) + 1;
  82 +
  83 + if (actual > 99) {
  84 + actual = "+99";
  85 + }
  86 +
  87 + subject_mbadge.text(actual);
  88 + }
  89 +
  90 + subject_mbadge.show();
  91 + }
58 92 }
59 93  
60 94 if (("Notification" in window)) {
61 95 var options = {
62 96 icon: content.user_icon,
63   - body: content.simple
  97 + body: content.simple_notify
64 98 }
65 99  
66 100 if (Notification.permission === "granted") {
... ... @@ -71,36 +105,59 @@ function muralNotificationCreate(content) {
71 105 }
72 106 }
73 107  
74   -function muralNotificationUpdate(content) {
75   - if (window.location.pathname == content.pathname) {
76   - var post = $("#post-" + content.post_id);
  108 +function muralNotificationMuralUpdate(content) {
  109 + var page = window.location.pathname,
  110 + render = (content.paths.indexOf(page) != -1);
  111 +
  112 + if (render) {
  113 + var mural_item = $(content.container);
77 114  
78   - if (post.is(":visible")) {
79   - post.before(content.complete);
  115 + if (mural_item.is(":visible") || mural_item.is(":hidden")) {
  116 + mural_item.before(content.complete);
80 117  
81   - post.remove();
  118 + mural_item.remove();
82 119 }
83 120 }
84 121 }
85 122  
86   -function muralNotificationDelete(content) {
87   - if (window.location.pathname == content.pathname) {
88   - var post = $("#post-" + content.post_id);
  123 +function muralNotificationMuralDelete(content) {
  124 + var page = window.location.pathname,
  125 + render = (content.paths.indexOf(page) != -1);
89 126  
90   - if (post.is(":visible")) {
91   - post.remove();
  127 + if (render) {
  128 + var mural_item = $(content.container);
  129 +
  130 + if (mural_item.is(":visible") || mural_item.is(":hidden")) {
  131 + mural_item.remove();
92 132 }
93 133 }
94 134 }
95 135  
96 136 function muralNotificationComment(content) {
97   - if (window.location.pathname == content.pathname) {
98   - if ($("#post-" + content.post_id).is(":visible")) {
99   - var section = $("#post-" + content.post_id).find('.comment-section');
  137 + var page = window.location.pathname,
  138 + render = (content.paths.indexOf(page) != -1),
  139 + checker = "general";
  140 +
  141 + switch (content.post_type) {
  142 + case "categorypost":
  143 + checker = "categories";
  144 + break;
  145 + case "subjectpost":
  146 + checker = "subjects";
  147 + break;
  148 + }
  149 +
  150 + if ((render && page.indexOf(checker) != -1) || (render && content.post_type == "generalpost" && page.indexOf("categories") == -1 && page.indexOf("subjects") == -1)) {
  151 + var section = $(content.container);
  152 +
  153 + if (section.is(":visible") || section.is(":hidden")) {
  154 + var comments = section.find('.comment-section');
100 155  
101   - section.append(content.complete);
  156 + comments.append(content.complete);
102 157 }
103 158 } else {
  159 + console.log("Lester");
  160 +
104 161 $('.mural_badge').each(function () {
105 162 var actual = $(this).text();
106 163  
... ... @@ -116,55 +173,23 @@ function muralNotificationComment(content) {
116 173  
117 174 $(this).show();
118 175 });
119   - }
120 176  
121   - if (("Notification" in window)) {
122   - var options = {
123   - icon: content.user_icon,
124   - body: content.simple
125   - }
  177 + $('.mural-tabs').find('li').each(function () {
  178 + var identity = $(this).data('mural');
126 179  
127   - if (Notification.permission === "granted") {
128   - var notification = new Notification("", options);
  180 + if ((identity == checker) || (identity == "general" && content.post_type == "generalpost")) {
  181 + var span = $(this).find('span'),
  182 + actual = span.text();
129 183  
130   - setTimeout(notification.close.bind(notification), 3000);
131   - }
132   - }
133   -}
134   -
135   -function muralNotificationCommentUpdate(content) {
136   - if (window.location.pathname == content.pathname) {
137   - var comment = $("#comment-" + content.comment_id);
138   -
139   - if (comment.is(":visible")) {
140   - comment.before(content.complete);
141   -
142   - comment.remove();
143   - }
144   - }
145   -}
146   -
147   -function muralNotificationCommentDelete(content) {
148   - if (window.location.pathname == content.pathname) {
149   - var comment = $("#comment-" + content.comment_id);
  184 + actual = parseInt(actual, 10) + 1;
150 185  
151   - if (comment.is(":visible")) {
152   - comment.remove();
153   - }
154   - }
155   -}
  186 + span.text(actual);
  187 + }
  188 + });
156 189  
157   -function muralNotificationCategory(content) {
158   - var cat_section = $("#" + content.cat);
159   -
160   - if (window.location.pathname == content.pathname && cat_section.is(':visible')) {
161   -
162   - cat_section.find('.posts').prepend(content.complete);
163   -
164   - cat_section.find('.no-subjects').hide();
165   - } else {
166   - $('.mural_badge').each(function () {
167   - var actual = $(this).text();
  190 + if (content.post_type == "subjectpost") {
  191 + var subject_mbadge = $("#subject_" + content.type_slug).find('.mural_notify'),
  192 + actual = subject_mbadge.text();
168 193  
169 194 if (actual != "+99") {
170 195 actual = parseInt(actual, 10) + 1;
... ... @@ -173,17 +198,17 @@ function muralNotificationCategory(content) {
173 198 actual = "+99";
174 199 }
175 200  
176   - $(this).text(actual);
  201 + subject_mbadge.text(actual);
177 202 }
178 203  
179   - $(this).show();
180   - });
  204 + subject_mbadge.show();
  205 + }
181 206 }
182 207  
183 208 if (("Notification" in window)) {
184 209 var options = {
185 210 icon: content.user_icon,
186   - body: content.simple
  211 + body: content.simple_notify
187 212 }
188 213  
189 214 if (Notification.permission === "granted") {
... ... @@ -192,26 +217,4 @@ function muralNotificationCategory(content) {
192 217 setTimeout(notification.close.bind(notification), 3000);
193 218 }
194 219 }
195   -}
196   -
197   -function muralNotificationCategoryUpdate(content) {
198   - if (window.location.pathname == content.pathname) {
199   - var post = $("#post-" + content.post_id);
200   -
201   - if (post.is(":visible") || post.is(":hidden")) {
202   - post.before(content.complete);
203   -
204   - post.remove();
205   - }
206   - }
207   -}
208   -
209   -function muralNotificationCategoryDelete(content) {
210   - if (window.location.pathname == content.pathname) {
211   - var post = $("#post-" + content.post_id);
212   -
213   - if (post.is(":visible") || post.is(":hidden")) {
214   - post.remove();
215   - }
216   - }
217 220 }
218 221 \ No newline at end of file
... ...
mural/models.py
... ... @@ -32,7 +32,11 @@ class Mural(KnowsChild):
32 32  
33 33 @always_as_child
34 34 def get_space(self):
35   - pass
  35 + pass
  36 +
  37 + @always_as_child
  38 + def get_space_slug(self):
  39 + pass
36 40  
37 41 @always_as_child
38 42 def update_link(self):
... ... @@ -51,6 +55,9 @@ class GeneralPost(Mural):
51 55 def get_space(self):
52 56 return self.space
53 57  
  58 + def get_space_slug(self):
  59 + return ""
  60 +
54 61 def update_link(self):
55 62 return "mural:update_general"
56 63  
... ... @@ -66,6 +73,9 @@ class CategoryPost(Mural):
66 73 def get_space(self):
67 74 return self.space.id
68 75  
  76 + def get_space_slug(self):
  77 + return self.space.slug
  78 +
69 79 def update_link(self):
70 80 return "mural:update_category"
71 81  
... ... @@ -82,6 +92,9 @@ class SubjectPost(Mural):
82 92 def get_space(self):
83 93 return self.space.id
84 94  
  95 + def get_space_slug(self):
  96 + return self.space.slug
  97 +
85 98 def update_link(self):
86 99 return "mural:update_subject"
87 100  
... ...
mural/templates/mural/list.html
... ... @@ -13,10 +13,10 @@
13 13  
14 14 {% block content %}
15 15 <div id="core-subjects-options-div">
16   - <ul class="core-subjects-options">
17   - <a href="{% url 'mural:manage_general' %}"><li class="active">{% trans "General" %} ({{ totals.general }})</li></a>
18   - <a href="{% url 'mural:manage_category' %}"><li>{% trans "Per Category" %} ({{ totals.category }})</li></a>
19   - <a href="{% url 'mural:manage_subject' %}"><li>{% trans "Per Subject" %} ({{ totals.subject }})</li></a>
  16 + <ul class="core-subjects-options mural-tabs">
  17 + <a href="{% url 'mural:manage_general' %}"><li data-mural="general" class="active">{% trans "General" %} (<span>{{ totals.general }}</span>)</li></a>
  18 + <a href="{% url 'mural:manage_category' %}"><li data-mural="categories">{% trans "Per Category" %} (<span>{{ totals.category }}</span>)</li></a>
  19 + <a href="{% url 'mural:manage_subject' %}"><li data-mural="subjects">{% trans "Per Subject" %} (<span>{{ totals.subject }}</span>)</li></a>
20 20 </ul>
21 21 </div>
22 22  
... ...
mural/templates/mural/list_category.html
... ... @@ -15,10 +15,10 @@
15 15 <input type="hidden" value="{% url 'mural:manage_category' %}" class="mural_url" />
16 16  
17 17 <div id="core-subjects-options-div">
18   - <ul class="core-subjects-options">
19   - <a href="{% url 'mural:manage_general' %}"><li>{% trans "General" %} ({{ totals.general }})</li></a>
20   - <a href="{% url 'mural:manage_category' %}"><li class="active">{% trans "Per Category" %} (<span class="cat_badge">{{ totals.category }}</span>)</li></a>
21   - <a href="{% url 'mural:manage_subject' %}"><li>{% trans "Per Subject" %} ({{ totals.subject }})</li></a>
  18 + <ul class="core-subjects-options mural-tabs">
  19 + <a href="{% url 'mural:manage_general' %}"><li data-mural="general">{% trans "General" %} (<span>{{ totals.general }}</span>)</li></a>
  20 + <a href="{% url 'mural:manage_category' %}"><li data-mural="categories" class="active">{% trans "Per Category" %} (<span class="ung_badge">{{ totals.category }}</span>)</li></a>
  21 + <a href="{% url 'mural:manage_subject' %}"><li data-mural="subjects">{% trans "Per Subject" %} (<span>{{ totals.subject }}</span>)</li></a>
22 22 </ul>
23 23 </div>
24 24  
... ... @@ -65,7 +65,7 @@
65 65 </div>
66 66 </div>
67 67 </div>
68   - <div id="{{category.slug}}" class="panel-collapse panel-body collapse mural-category">
  68 + <div id="{{category.slug}}" class="panel-collapse panel-body collapse mural-ungeneral">
69 69 <div class="col-md-12 cards-content mural" data-url="{% url 'mural:load_category' category.id %}">
70 70 <div class="col-md-9 col-sm-9 col-xs-9 mural-list">
71 71 <div class="post_make panel panel-default">
... ... @@ -134,5 +134,5 @@
134 134  
135 135 <script type="text/javascript" src="{% static 'js/category.js' %}"></script>
136 136 <script type="text/javascript" src="{% static 'js/mural.js' %}"></script>
137   - <script type="text/javascript" src="{% static 'js/mural_category.js' %}"></script>
  137 + <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script>
138 138 {% endblock %}
139 139 \ No newline at end of file
... ...
mural/templates/mural/list_subject.html
... ... @@ -15,10 +15,10 @@
15 15 <input type="hidden" value="{% url 'mural:manage_subject' %}" class="mural_url" />
16 16  
17 17 <div id="core-subjects-options-div">
18   - <ul class="core-subjects-options">
19   - <a href="{% url 'mural:manage_general' %}"><li>{% trans "General" %} ({{ totals.general }})</li></a>
20   - <a href="{% url 'mural:manage_category' %}"><li>{% trans "Per Category" %} ({{ totals.category }})</li></a>
21   - <a href="{% url 'mural:manage_subject' %}"><li class="active">{% trans "Per Subject" %} (<span class="sub_badge">{{ totals.subject }}</span>)</li></a>
  18 + <ul class="core-subjects-options mural-tabs">
  19 + <a href="{% url 'mural:manage_general' %}"><li data-mural="general">{% trans "General" %} (<span>{{ totals.general }}</span>)</li></a>
  20 + <a href="{% url 'mural:manage_category' %}"><li data-mural="categories">{% trans "Per Category" %} (<span>{{ totals.category }}</span>)</li></a>
  21 + <a href="{% url 'mural:manage_subject' %}"><li data-mural="subjects" class="active">{% trans "Per Subject" %} (<span class="ung_badge">{{ totals.subject }}</span>)</li></a>
22 22 </ul>
23 23 </div>
24 24  
... ... @@ -64,7 +64,7 @@
64 64 </div>
65 65 </div>
66 66 </div>
67   - <div id="{{subject.slug}}" class="panel-collapse panel-body collapse mural-subject">
  67 + <div id="{{subject.slug}}" class="panel-collapse panel-body collapse mural-ungeneral">
68 68 <div class="col-md-12 cards-content mural" data-url="{% url 'mural:load_subject' subject.id %}">
69 69 <div class="col-md-9 col-sm-9 col-xs-9 mural-list">
70 70 <div class="post_make panel panel-default">
... ... @@ -133,5 +133,6 @@
133 133  
134 134 <script type="text/javascript" src="{% static 'js/category.js' %}"></script>
135 135 <script type="text/javascript" src="{% static 'js/mural.js' %}"></script>
136   - <script type="text/javascript" src="{% static 'js/mural_subject.js' %}"></script>
  136 + <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script>
  137 + <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script>
137 138 {% endblock %}
138 139 \ No newline at end of file
... ...
mural/templates/mural/subject_view.html 0 → 100644
... ... @@ -0,0 +1,109 @@
  1 +{% extends 'subjects/view.html' %}
  2 +
  3 +{% load static i18n pagination permissions_tags subject_counter %}
  4 +{% load django_bootstrap_breadcrumbs %}
  5 +
  6 +{% block breadcrumbs %}
  7 + {{ block.super }}
  8 +
  9 + {% trans 'Mural' as mural %}
  10 +
  11 + {% breadcrumb mural 'mural:subject_view' subject.slug %}
  12 +{% endblock %}
  13 +
  14 +{% block content %}
  15 + {% subject_permissions request.user subject as has_subject_permissions %}
  16 +
  17 + {% if subject.visible %}
  18 + <div class="panel panel-info subject-panel" id="subject_{{subject.slug}}">
  19 + <div class="panel-heading">
  20 + {% elif has_subject_permissions %}
  21 + <div class="panel panel-info subject-panel-invisible" id="subject_{{subject.slug}}">
  22 + <div class="panel-heading panel-invisible">
  23 + {% endif %}
  24 + <div class="row">
  25 + <div class="col-md-12 category-header">
  26 + <h4 class="panel-title" style="margin-top: 10px; margin-bottom: 8px">
  27 + <span>{{subject.name}}</span>
  28 + </h4>
  29 +
  30 + <div class="col-md-5 pull-right category-card-items">
  31 + {% if request.user in subject.professor.all or request.user in subject.category.coordinators.all or request.user.is_staff %}
  32 + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  33 + <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
  34 + </a>
  35 + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions">
  36 + {% if request.user not in subject.professor.all %}
  37 + <li><a href="{% url 'subjects:replicate' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li>
  38 + {% endif %}
  39 + <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li>
  40 + <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li>
  41 + <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i>&nbsp;{% trans 'Remove' %}</a></li>
  42 + </ul>
  43 + {% endif %}
  44 +
  45 + <a href="{% url 'mural:subject_view' subject.slug %}" class="pull-right action_icon">
  46 + <i class="fa fa-list" aria-hidden="true"></i>
  47 + {% mural_number subject request.user %}
  48 + </a>
  49 + </div>
  50 + </div>
  51 + </div>
  52 + </div>
  53 + <div id="{{subject.slug}}" class="panel-collapse panel-body in collapse mural-ungeneral">
  54 + <div class="col-md-12 cards-content mural" data-url="{% url 'mural:subject_view' subject.slug %}" data-pages="{{ paginator.num_pages }}" data-page="{{ page_obj.number }}" data-fav="{{ favorites }}" data-mine="{{ mines }}">
  55 + <div class="col-md-9 col-sm-9 col-xs-9 mural-list">
  56 + <div class="post_make panel panel-default">
  57 + <div class="panel-body">
  58 + <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 user-img text-center">
  59 + <img src="{{ request.user.image_url }}" class="img-responsive" />
  60 + </div>
  61 + <div class="col-lg-11 col-md-11 col-sm-11 col-xs-11 post-field">
  62 + <div>
  63 + <h4 data-url="{% url 'mural:create_subject' subject.slug %}">{% trans 'Wish to make a new post?' %}</h4>
  64 + </div>
  65 + </div>
  66 + </div>
  67 + </div>
  68 +
  69 + <div class="posts">
  70 + {% for post in posts %}
  71 + {% include 'mural/_view.html' %}
  72 + {% endfor %}
  73 + </div>
  74 + <div id="loading_posts" class="alert alert-success" role="alert" style="display:none">
  75 + <center>
  76 + <span class="fa fa-spin fa-circle-o-notch"></span>
  77 + </center>
  78 + </div>
  79 + <div class="text-center no-subjects" {% if posts.count > 0 %} style="display:none" {% endif %}>
  80 + <i class="fa fa-list"></i>
  81 + <h4>{% trans 'There are no posts in this mural yet.' %}</h4>
  82 + </div>
  83 + </div>
  84 + <div class="col-md-3 col-sm-3 col-xs-3 post-filter">
  85 + <h4>{% trans 'Filter' %}</h4>
  86 +
  87 + <form id="post-filters" action="" method="GET">
  88 + <div class="checkbox">
  89 + <label>
  90 + <input name="favorite" type="checkbox" {{ favorites }}> {% trans 'Favorite posts' %} <i class="fa fa-thumb-tack"></i>
  91 + </label>
  92 + </div>
  93 + <div class="checkbox">
  94 + <label>
  95 + <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %}
  96 + </label>
  97 + </div>
  98 + <button type="submit" class="btn btn-success btn-raised btn-block">{% trans 'Filter' %}</button>
  99 + <button type="button" id="clear_filter" class="btn btn-default btn-raised btn-block clear_filter">{% trans 'Clean Filters' %}</button>
  100 + </form>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +
  105 + <div class="modal fade" id="post-modal-form" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div>
  106 +
  107 + <script type="text/javascript" src="{% static 'js/mural.js' %}"></script>
  108 + <script type="text/javascript" src="{% static 'js/mural_general.js' %}"></script>
  109 +{% endblock %}
0 110 \ No newline at end of file
... ...
mural/urls.py
... ... @@ -14,6 +14,7 @@ urlpatterns = [
14 14 url(r'^delete_gen/(?P<pk>[\w_-]+)/$', views.GeneralDelete.as_view(), name='delete_general'),
15 15 url(r'^delete_cat/(?P<pk>[\w_-]+)/$', views.CategoryDelete.as_view(), name='delete_category'),
16 16 url(r'^delete_sub/(?P<pk>[\w_-]+)/$', views.SubjectDelete.as_view(), name='delete_subject'),
  17 + url(r'^subject/(?P<slug>[\w_-]+)/$', views.SubjectView.as_view(), name='subject_view'),
17 18 url(r'^load_category/([\w_-]+)/$', views.load_category_posts, name='load_category'),
18 19 url(r'^load_subject/([\w_-]+)/$', views.load_subject_posts, name='load_subject'),
19 20 url(r'^favorite/([\w_-]+)/$', views.favorite, name='favorite'),
... ...
mural/utils.py
... ... @@ -9,5 +9,14 @@ def getSpaceUsers(user, post):
9 9 space = post.get_space()
10 10  
11 11 return User.objects.filter(Q(is_staff = True) | Q(coordinators__id = space) | Q(professors__category__id = space) | Q(subject_student__category__id = space)).exclude(id = user)
  12 + elif post._my_subclass == "subjectpost":
  13 + space = post.get_space()
  14 +
  15 + if post.subjectpost.resource:
  16 + resource = post.subjectpost.resource
  17 +
  18 + return User.objects.filter(Q(is_staff = True) | Q(professors__id = space) | Q(coordinators__subject_category__id = space) | Q(resource_students = resource) | Q(group_participants__resource_groups = resource) | (Q(subject_student__id = space) & Q(subject_student__topic_subject__resource_topic = resource) & Q(subject_student__topic_subject__resource_topic__all_students = True))).exclude(id = user)
  19 + else:
  20 + return User.objects.filter(Q(is_staff = True) | Q(professors__id = space) | Q(coordinators__subject_category__id = space) | Q(subject_student__id = space)).exclude(id = user)
12 21  
13 22 return None
14 23 \ No newline at end of file
... ...
mural/views.py
... ... @@ -61,9 +61,9 @@ class GeneralIndex(LoginRequiredMixin, generic.ListView):
61 61 general_visualizations = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__generalpost__isnull = False) | Q(comment__post__generalpost__isnull = False))).distinct()
62 62  
63 63 self.totals['general'] = general_visualizations.count()
64   - self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(user__is_staff = True) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
65   - self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
66   -
  64 + self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__categorypost__isnull = False) | Q(comment__post__categorypost__isnull = False))) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
  65 + self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__subjectpost__isnull = False) | Q(comment__post__subjectpost__isnull = False))) | Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
  66 +
67 67 general_visualizations.update(viewed = True)
68 68  
69 69 MuralVisualizations.objects.filter(user = user, viewed = False, comment__post__generalpost__isnull = False).update(viewed = True)
... ... @@ -119,15 +119,25 @@ class GeneralCreate(LoginRequiredMixin, generic.edit.CreateView):
119 119 users = User.objects.all().exclude(id = self.request.user.id)
120 120 entries = []
121 121  
122   - notify_type = "mural"
123   - user_icon = self.object.user.image_url
124   - _view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
125   - simple_notify = _("%s has made a post in General")%(str(self.object.user))
126   - pathname = reverse("mural:manage_general")
  122 + paths = [reverse("mural:manage_general")]
  123 +
  124 + notification = {
  125 + "type": "mural",
  126 + "subtype": "post",
  127 + "paths": paths,
  128 + "user_icon": self.object.user.image_url,
  129 + "simple_notify": _("%s has made a post in General")%(str(self.object.user)),
  130 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  131 + "container": ".post",
  132 + "accordion": False,
  133 + "post_type": "general"
  134 + }
  135 +
  136 + notification = json.dumps(notification)
127 137  
128 138 for user in users:
129 139 entries.append(MuralVisualizations(viewed = False, user = user, post = self.object))
130   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "create", "user_icon": user_icon, "pathname": pathname, "simple": simple_notify, "complete": _view})})
  140 + Group("user-%s" % user.id).send({'text': notification})
131 141  
132 142 MuralVisualizations.objects.bulk_create(entries)
133 143  
... ... @@ -166,12 +176,20 @@ class GeneralUpdate(LoginRequiredMixin, generic.UpdateView):
166 176  
167 177 users = User.objects.all().exclude(id = self.request.user.id)
168 178  
169   - notify_type = "mural"
170   - _view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
171   - pathname = reverse("mural:manage_general")
  179 + paths = [reverse("mural:manage_general")]
  180 +
  181 + notification = {
  182 + "type": "mural",
  183 + "subtype": "mural_update",
  184 + "paths": paths,
  185 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  186 + "container": "#post-" + str(self.object.id),
  187 + }
  188 +
  189 + notification = json.dumps(notification)
172 190  
173 191 for user in users:
174   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "update", "pathname": pathname, "complete": _view, "post_id": self.object.id})})
  192 + Group("user-%s" % user.id).send({'text': notification})
175 193  
176 194 return super(GeneralUpdate, self).form_valid(form)
177 195  
... ... @@ -202,12 +220,20 @@ class GeneralDelete(LoginRequiredMixin, generic.DeleteView):
202 220  
203 221 def get_success_url(self):
204 222 users = User.objects.all().exclude(id = self.request.user.id)
205   -
206   - notify_type = "mural"
207   - pathname = reverse("mural:manage_general")
  223 +
  224 + paths = [reverse("mural:manage_general")]
  225 +
  226 + notification = {
  227 + "type": "mural",
  228 + "subtype": "mural_delete",
  229 + "paths": paths,
  230 + "container": "#post-" + str(self.object.id),
  231 + }
  232 +
  233 + notification = json.dumps(notification)
208 234  
209 235 for user in users:
210   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "delete", "pathname": pathname, "post_id": self.object.id})})
  236 + Group("user-%s" % user.id).send({'text': notification})
211 237  
212 238 return reverse_lazy('mural:deleted_post')
213 239  
... ... @@ -284,8 +310,8 @@ class CategoryIndex(LoginRequiredMixin, generic.ListView):
284 310 categories = Category.objects.filter(Q(coordinators__pk = user.pk) | Q(subject_category__professor__pk = user.pk) | Q(subject_category__students__pk = user.pk, visible = True)).distinct()
285 311  
286 312 self.totals['general'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__generalpost__isnull = False) | Q(comment__post__generalpost__isnull = False))).distinct().count()
287   - self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(user__is_staff = True) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
288   - self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
  313 + self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__categorypost__isnull = False) | Q(comment__post__categorypost__isnull = False))) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
  314 + self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__subjectpost__isnull = False) | Q(comment__post__subjectpost__isnull = False))) | Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
289 315  
290 316 return categories
291 317  
... ... @@ -324,16 +350,26 @@ class CategoryCreate(LoginRequiredMixin, generic.edit.CreateView):
324 350  
325 351 users = getSpaceUsers(self.request.user.id, self.object)
326 352 entries = []
327   -
328   - notify_type = "mural"
329   - user_icon = self.object.user.image_url
330   - _view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
331   - simple_notify = _("%s has made a post in %s")%(str(self.object.user), str(self.object.space))
332   - pathname = reverse("mural:manage_category")
  353 +
  354 + paths = [reverse("mural:manage_category")]
  355 +
  356 + notification = {
  357 + "type": "mural",
  358 + "subtype": "post",
  359 + "paths": paths,
  360 + "user_icon": self.object.user.image_url,
  361 + "simple_notify": _("%s has made a post in %s")%(str(self.object.user), str(self.object.space)),
  362 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  363 + "container": "#" + slug,
  364 + "accordion": True,
  365 + "post_type": "categories"
  366 + }
  367 +
  368 + notification = json.dumps(notification)
333 369  
334 370 for user in users:
335 371 entries.append(MuralVisualizations(viewed = False, user = user, post = self.object))
336   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "create_cat", "user_icon": user_icon, "pathname": pathname, "simple": simple_notify, "complete": _view, "cat": slug})})
  372 + Group("user-%s" % user.id).send({'text': notification})
337 373  
338 374 MuralVisualizations.objects.bulk_create(entries)
339 375  
... ... @@ -372,12 +408,20 @@ class CategoryUpdate(LoginRequiredMixin, generic.UpdateView):
372 408  
373 409 users = getSpaceUsers(self.request.user.id, self.object)
374 410  
375   - notify_type = "mural"
376   - _view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
377   - pathname = reverse("mural:manage_category")
  411 + paths = [reverse("mural:manage_category")]
  412 +
  413 + notification = {
  414 + "type": "mural",
  415 + "subtype": "mural_update",
  416 + "paths": paths,
  417 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  418 + "container": "#post-" + str(self.object.id),
  419 + }
  420 +
  421 + notification = json.dumps(notification)
378 422  
379 423 for user in users:
380   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "update_cat", "pathname": pathname, "complete": _view, "post_id": self.object.id})})
  424 + Group("user-%s" % user.id).send({'text': notification})
381 425  
382 426 return super(CategoryUpdate, self).form_valid(form)
383 427  
... ... @@ -409,11 +453,19 @@ class CategoryDelete(LoginRequiredMixin, generic.DeleteView):
409 453 def get_success_url(self):
410 454 users = getSpaceUsers(self.request.user.id, self.object)
411 455  
412   - notify_type = "mural"
413   - pathname = reverse("mural:manage_category")
  456 + paths = [reverse("mural:manage_category")]
  457 +
  458 + notification = {
  459 + "type": "mural",
  460 + "subtype": "mural_delete",
  461 + "paths": paths,
  462 + "container": "#post-" + str(self.object.id),
  463 + }
  464 +
  465 + notification = json.dumps(notification)
414 466  
415 467 for user in users:
416   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "delete_cat", "pathname": pathname, "post_id": self.object.id})})
  468 + Group("user-%s" % user.id).send({'text': notification})
417 469  
418 470 return reverse_lazy('mural:deleted_post')
419 471  
... ... @@ -490,8 +542,8 @@ class SubjectIndex(LoginRequiredMixin, generic.ListView):
490 542 subjects = Subject.objects.filter(Q(category__coordinators__pk = user.pk) | Q(professor__pk = user.pk) | Q(students__pk = user.pk, visible = True)).distinct()
491 543  
492 544 self.totals['general'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__generalpost__isnull = False) | Q(comment__post__generalpost__isnull = False))).distinct().count()
493   - self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(user__is_staff = True) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
494   - self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
  545 + self.totals['category'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__categorypost__isnull = False) | Q(comment__post__categorypost__isnull = False))) | Q(post__categorypost__space__coordinators = user) | Q(comment__post__categorypost__space__coordinators = user) | Q(post__categorypost__space__subject_category__students = user) | Q(comment__post__categorypost__space__subject_category__students = user) | Q(post__categorypost__space__subject_category__professor = user) | Q(comment__post__categorypost__space__subject_category__professor = user))).distinct().count()
  546 + self.totals['subject'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & ((Q(user__is_staff = True) & (Q(post__subjectpost__isnull = False) | Q(comment__post__subjectpost__isnull = False))) | Q(post__subjectpost__space__professor = user) | Q(comment__post__subjectpost__space__professor = user) | Q(post__subjectpost__space__students = user) | Q(comment__post__subjectpost__space__students = user))).distinct().count()
495 547  
496 548 return subjects
497 549  
... ... @@ -539,20 +591,30 @@ class SubjectCreate(LoginRequiredMixin, generic.edit.CreateView):
539 591  
540 592 self.object.save()
541 593  
542   - #users = User.objects.filter(Q(is_staff = True) | Q(coordinators = cat) | Q(professors__category = cat) | Q(subject_student__category = cat)).exclude(id = self.request.user.id)
  594 + users = getSpaceUsers(self.request.user.id, self.object)
543 595 entries = []
544 596  
545   - notify_type = "mural"
546   - user_icon = self.object.user.image_url
547   - #_view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
548   - simple_notify = _("%s has made a post in %s")%(str(self.object.user), str(self.object.space))
549   - pathname = reverse("mural:manage_category")
  597 + paths = [reverse("mural:manage_subject")]
  598 +
  599 + notification = {
  600 + "type": "mural",
  601 + "subtype": "post",
  602 + "paths": paths,
  603 + "user_icon": self.object.user.image_url,
  604 + "simple_notify": _("%s has made a post in %s")%(str(self.object.user), str(self.object.space)),
  605 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  606 + "container": "#" + slug,
  607 + "accordion": True,
  608 + "post_type": "subjects"
  609 + }
550 610  
551   - #for user in users:
552   - # entries.append(MuralVisualizations(viewed = False, user = user, post = self.object))
553   - # Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "create_cat", "user_icon": user_icon, "pathname": pathname, "simple": simple_notify, "complete": _view, "cat": slug})})
  611 + notification = json.dumps(notification)
554 612  
555   - #MuralVisualizations.objects.bulk_create(entries)
  613 + for user in users:
  614 + entries.append(MuralVisualizations(viewed = False, user = user, post = self.object))
  615 + Group("user-%s" % user.id).send({'text': notification})
  616 +
  617 + MuralVisualizations.objects.bulk_create(entries)
556 618  
557 619 return super(SubjectCreate, self).form_valid(form)
558 620  
... ... @@ -594,14 +656,22 @@ class SubjectUpdate(LoginRequiredMixin, generic.UpdateView):
594 656  
595 657 self.object.save()
596 658  
597   - #users = User.objects.all().exclude(id = self.request.user.id)
  659 + users = getSpaceUsers(self.request.user.id, self.object)
598 660  
599   - notify_type = "mural"
600   - _view = render_to_string("mural/_view.html", {"post": self.object}, self.request)
601   - pathname = reverse("mural:manage_category")
  661 + paths = [reverse("mural:manage_subject")]
602 662  
603   - #for user in users:
604   - # Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "update_cat", "pathname": pathname, "complete": _view, "post_id": self.object.id})})
  663 + notification = {
  664 + "type": "mural",
  665 + "subtype": "mural_update",
  666 + "paths": paths,
  667 + "complete": render_to_string("mural/_view.html", {"post": self.object}, self.request),
  668 + "container": "#post-" + str(self.object.id),
  669 + }
  670 +
  671 + notification = json.dumps(notification)
  672 +
  673 + for user in users:
  674 + Group("user-%s" % user.id).send({'text': notification})
605 675  
606 676 return super(SubjectUpdate, self).form_valid(form)
607 677  
... ... @@ -631,16 +701,89 @@ class SubjectDelete(LoginRequiredMixin, generic.DeleteView):
631 701 return context
632 702  
633 703 def get_success_url(self):
634   - #users = User.objects.all().exclude(id = self.request.user.id)
  704 + users = getSpaceUsers(self.request.user.id, self.object)
635 705  
636   - notify_type = "mural"
637   - pathname = reverse("mural:manage_subject")
  706 + paths = [reverse("mural:manage_subject")]
  707 +
  708 + notification = {
  709 + "type": "mural",
  710 + "subtype": "mural_delete",
  711 + "paths": paths,
  712 + "container": "#post-" + str(self.object.id),
  713 + }
638 714  
639   - #for user in users:
640   - # Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "delete_cat", "pathname": pathname, "post_id": self.object.id})})
  715 + notification = json.dumps(notification)
  716 +
  717 + for user in users:
  718 + Group("user-%s" % user.id).send({'text': notification})
641 719  
642 720 return reverse_lazy('mural:deleted_post')
643 721  
  722 +class SubjectView(LoginRequiredMixin, generic.ListView):
  723 + login_url = reverse_lazy("users:login")
  724 + redirect_field_name = 'next'
  725 +
  726 + template_name = 'mural/subject_view.html'
  727 + context_object_name = "posts"
  728 + paginate_by = 10
  729 +
  730 + def get_queryset(self):
  731 + user = self.request.user
  732 + favorites = self.request.GET.get('favorite', False)
  733 + mines = self.request.GET.get('mine', False)
  734 + showing = self.request.GET.get('showing', False)
  735 + page = self.request.GET.get('page', False)
  736 + slug = self.kwargs.get('slug')
  737 + subject = get_object_or_404(Subject, slug = slug)
  738 +
  739 + if not favorites:
  740 + if mines:
  741 + posts = SubjectPost.objects.extra(select = {"most_recent": "greatest(last_update, (select max(mural_comment.last_update) from mural_comment where mural_comment.post_id = mural_subjectpost.mural_ptr_id))"}).filter(mural_ptr__user = user, space = subject)
  742 + else:
  743 + posts = SubjectPost.objects.extra(select = {"most_recent": "greatest(last_update, (select max(mural_comment.last_update) from mural_comment where mural_comment.post_id = mural_subjectpost.mural_ptr_id))"}).filter(space = subject)
  744 + else:
  745 + if mines:
  746 + posts = SubjectPost.objects.extra(select = {"most_recent": "greatest(last_update, (select max(mural_comment.last_update) from mural_comment where mural_comment.post_id = mural_subjectpost.mural_ptr_id))"}).filter(favorites_post__isnull = False, favorites_post__user = user, mural_ptr__user = user, space = subject)
  747 + else:
  748 + posts = SubjectPost.objects.extra(select = {"most_recent": "greatest(last_update, (select max(mural_comment.last_update) from mural_comment where mural_comment.post_id = mural_subjectpost.mural_ptr_id))"}).filter(favorites_post__isnull = False, favorites_post__user = user, space = subject)
  749 +
  750 + if showing: #Exclude ajax creation posts results
  751 + showing = showing.split(',')
  752 + posts = posts.exclude(id__in = showing)
  753 +
  754 + if not page: #Don't need this if is pagination
  755 + MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__space = subject) | Q(comment__post__subjectpost__space = subject))).update(viewed = True)
  756 +
  757 + return posts.order_by("-most_recent")
  758 +
  759 + def get_context_data(self, **kwargs):
  760 + context = super(SubjectView, self).get_context_data(**kwargs)
  761 +
  762 + page = self.request.GET.get('page', '')
  763 +
  764 + slug = self.kwargs.get('slug', None)
  765 + subject = get_object_or_404(Subject, slug = slug)
  766 +
  767 + if page:
  768 + self.template_name = "mural/_list_view.html"
  769 +
  770 + context['title'] = _('%s - Mural')%(str(subject))
  771 + context['subject'] = subject
  772 + context['favorites'] = ""
  773 + context['mines'] = ""
  774 +
  775 + favs = self.request.GET.get('favorite', False)
  776 +
  777 + if favs:
  778 + context['favorites'] = "checked"
  779 +
  780 + mines = self.request.GET.get('mine', False)
  781 +
  782 + if mines:
  783 + context['mines'] = "checked"
  784 +
  785 + return context
  786 +
644 787 """
645 788 Section for common post functions
646 789 """
... ... @@ -712,16 +855,30 @@ class CommentCreate(LoginRequiredMixin, generic.edit.CreateView):
712 855  
713 856 users = getSpaceUsers(self.request.user.id, post)
714 857 entries = []
715   -
716   - notify_type = "mural"
717   - user_icon = self.object.user.image_url
718   - _view = render_to_string("mural/_view_comment.html", {"comment": self.object}, self.request)
719   - simple_notify = _("%s has commented in a post")%(str(self.object.user))
720   - pathname = reverse("mural:manage_general")
  858 +
  859 + paths = [
  860 + reverse("mural:manage_general"),
  861 + reverse("mural:manage_category"),
  862 + reverse("mural:manage_subject")
  863 + ]
  864 +
  865 + notification = {
  866 + "type": "mural",
  867 + "subtype": "comment",
  868 + "paths": paths,
  869 + "user_icon": self.object.user.image_url,
  870 + "simple_notify": _("%s has commented in a post")%(str(self.object.user)),
  871 + "complete": render_to_string("mural/_view_comment.html", {"comment": self.object}, self.request),
  872 + "container": "#post-" + str(post.get_id()),
  873 + "post_type": post._my_subclass,
  874 + "type_slug": post.get_space_slug()
  875 + }
  876 +
  877 + notification = json.dumps(notification)
721 878  
722 879 for user in users:
723 880 entries.append(MuralVisualizations(viewed = False, user = user, comment = self.object))
724   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "create_comment", "user_icon": user_icon, "pathname": pathname, "simple": simple_notify, "complete": _view, "post_id": post.get_id()})})
  881 + Group("user-%s" % user.id).send({'text': notification})
725 882  
726 883 MuralVisualizations.objects.bulk_create(entries)
727 884  
... ... @@ -762,12 +919,24 @@ class CommentUpdate(LoginRequiredMixin, generic.UpdateView):
762 919  
763 920 users = getSpaceUsers(self.request.user.id, self.object.post)
764 921  
765   - notify_type = "mural"
766   - _view = render_to_string("mural/_view_comment.html", {"comment": self.object}, self.request)
767   - pathname = reverse("mural:manage_general")
  922 + paths = [
  923 + reverse("mural:manage_general"),
  924 + reverse("mural:manage_category"),
  925 + reverse("mural:manage_subject")
  926 + ]
  927 +
  928 + notification = {
  929 + "type": "mural",
  930 + "subtype": "mural_update",
  931 + "paths": paths,
  932 + "complete": render_to_string("mural/_view_comment.html", {"comment": self.object}, self.request),
  933 + "container": "#comment-" + str(self.object.id),
  934 + }
  935 +
  936 + notification = json.dumps(notification)
768 937  
769 938 for user in users:
770   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "update_comment", "pathname": pathname, "complete": _view, "comment_id": self.object.id})})
  939 + Group("user-%s" % user.id).send({'text': notification})
771 940  
772 941 return super(CommentUpdate, self).form_valid(form)
773 942  
... ... @@ -798,12 +967,24 @@ class CommentDelete(LoginRequiredMixin, generic.DeleteView):
798 967  
799 968 def get_success_url(self):
800 969 users = getSpaceUsers(self.request.user.id, self.object.post)
801   -
802   - notify_type = "mural"
803   - pathname = reverse("mural:manage_general")
  970 +
  971 + paths = [
  972 + reverse("mural:manage_general"),
  973 + reverse("mural:manage_category"),
  974 + reverse("mural:manage_subject")
  975 + ]
  976 +
  977 + notification = {
  978 + "type": "mural",
  979 + "subtype": "mural_delete",
  980 + "paths": paths,
  981 + "container": "#comment-" + str(self.object.id),
  982 + }
  983 +
  984 + notification = json.dumps(notification)
804 985  
805 986 for user in users:
806   - Group("user-%s" % user.id).send({'text': json.dumps({"type": notify_type, "subtype": "delete_comment", "pathname": pathname, "comment_id": self.object.id})})
  987 + Group("user-%s" % user.id).send({'text': notification})
807 988  
808 989 return reverse_lazy('mural:deleted_comment')
809 990  
... ...
subjects/templates/subjects/badge.html
1   -{% if number > 0 %}
2   - <span class="badge notify_badge">{% if number > 99 %} +99 {% else %} {{ number }} {% endif %}</span>
3   -{% endif %}
4 1 \ No newline at end of file
  2 +<span class="badge notify_badge {{ custom_class }}" {% if number <= 0 %} style="display:none" {% endif %}>{% if number > 99 %} +99 {% else %} {{ number }} {% endif %}</span>
5 3 \ No newline at end of file
... ...
subjects/templates/subjects/subject_card.html
... ... @@ -40,7 +40,10 @@
40 40 {% notifies_number subject request.user %}
41 41 </a>
42 42 <a href="" class="pull-right action_icon"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
43   - <a href="" class="pull-right action_icon"><i class="fa fa-list" aria-hidden="true"></i></a>
  43 + <a href="{% url 'mural:subject_view' subject.slug %}" class="pull-right action_icon">
  44 + <i class="fa fa-list" aria-hidden="true"></i>
  45 + {% mural_number subject request.user %}
  46 + </a>
44 47 </div>
45 48 </div>
46 49 </div>
... ...
subjects/templates/subjects/view.html
... ... @@ -29,10 +29,10 @@
29 29 {% subject_permissions request.user subject as has_subject_permissions %}
30 30  
31 31 {% if subject.visible %}
32   - <div class="panel panel-info subject-panel">
  32 + <div class="panel panel-info subject-panel" id="subject_{{subject.slug}}">
33 33 <div class="panel-heading">
34 34 {% elif has_subject_permissions %}
35   - <div class="panel panel-info subject-panel-invisible">
  35 + <div class="panel panel-info subject-panel-invisible" id="subject_{{subject.slug}}">
36 36 <div class="panel-heading panel-invisible">
37 37 {% endif %}
38 38 <div class="row">
... ... @@ -62,7 +62,10 @@
62 62 {% notifies_number subject request.user %}
63 63 </a>
64 64 <a href="" class="pull-right action_icon"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
65   - <a href="" class="pull-right action_icon"><i class="fa fa-list" aria-hidden="true"></i></a>
  65 + <a href="{% url 'mural:subject_view' subject.slug %}" class="pull-right action_icon">
  66 + <i class="fa fa-list" aria-hidden="true"></i>
  67 + {% mural_number subject request.user %}
  68 + </a>
66 69 </div>
67 70 </div>
68 71 </div>
... ...
subjects/templatetags/subject_counter.py
... ... @@ -2,6 +2,7 @@ import datetime
2 2 from django import template
3 3 from django.db.models import Q
4 4  
  5 +from mural.models import MuralVisualizations
5 6 from notifications.models import Notification
6 7  
7 8 register = template.Library()
... ... @@ -24,6 +25,25 @@ def notifies_number(subject, user):
24 25 context = {}
25 26  
26 27 context['number'] = Notification.objects.filter(task__resource__topic__subject = subject, creation_date = datetime.datetime.now(), viewed = False, user = user).count()
  28 + context['custom_class'] = 'pendencies_notify'
  29 +
  30 + return context
  31 +
  32 +@register.inclusion_tag('subjects/badge.html')
  33 +def mural_number(subject, user):
  34 + context = {}
  35 +
  36 + context['number'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__space = subject) | Q(comment__post__subjectpost__space = subject))).count()
  37 + context['custom_class'] = 'mural_notify'
  38 +
  39 + return context
  40 +
  41 +@register.inclusion_tag('subjects/badge.html')
  42 +def resource_mural_number(resource, user):
  43 + context = {}
  44 +
  45 + context['number'] = MuralVisualizations.objects.filter(Q(user = user) & Q(viewed = False) & (Q(post__subjectpost__resource = resource) | Q(comment__post__subjectpost__resource = resource))).count()
  46 + context['custom_class'] = 'mural_resource_notify'
27 47  
28 48 return context
29 49  
... ...
webpage/templates/webpages/view.html
1 1 {% extends 'subjects/view.html' %}
2 2  
3   -{% load static i18n pagination permissions_tags %}
  3 +{% load static i18n pagination permissions_tags subject_counter %}
4 4 {% load django_bootstrap_breadcrumbs %}
5 5  
6 6 {% block javascript%}
... ... @@ -41,7 +41,10 @@
41 41 </h4>
42 42  
43 43 <div class="col-md-5 pull-right category-card-items">
44   - <a href="" ><i class="fa fa-list" aria-hidden="true"></i></a>
  44 + <a href="" >
  45 + <i class="fa fa-list" aria-hidden="true"></i>
  46 + {% resource_mural_number webpage request.user %}
  47 + </a>
45 48 </div>
46 49 </div>
47 50 </div>
... ...
youtube_video/templates/youtube/view.html
1 1 {% extends 'subjects/view.html' %}
2 2  
3   -{% load static i18n pagination permissions_tags %}
  3 +{% load static i18n pagination permissions_tags subject_counter %}
4 4 {% load django_bootstrap_breadcrumbs %}
5 5  
6 6 {% block javascript%}
... ... @@ -41,7 +41,10 @@
41 41 </h4>
42 42  
43 43 <div class="col-md-5 pull-right category-card-items">
44   - <a href=""><i class="fa fa-list" aria-hidden="true"></i></a>
  44 + <a href="">
  45 + <i class="fa fa-list" aria-hidden="true"></i>
  46 + {% resource_mural_number youtube request.user %}
  47 + </a>
45 48 </div>
46 49 </div>
47 50 </div>
... ...