summaryrefslogtreecommitdiff
path: root/gstudio/templates/metadashboard/grpdashboard.html
blob: 8a1b335ea9ce45f5d2eef51a00a1445ce479fd8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
{% extends "gstudio/base.html" %}
{% load gstudio_tags %}
{% load pagination_tags %}
{% load adminmedia grp_tags %}
{% load i18n comments gstudio_tags %} 
{% load tagging_tags comments i18n %}
 {% block title %}{{meet_ob.title}}{% endblock %}
{% block content %}
<script src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" >
      $(window).load(function() {
      $("#content").css({
    "width": "620px",});});
$(window).load(function() {
 $("#chart").hide();});
$(window).load(function() {
 
 $("#graphcss").hide();
$(".savecontent").hide();   
$(".submitresponse").hide();
$("#editthreadsave").hide();
  });
var i=0;
var availableTags = [];
$.merge(availableTags, {% get_add_tag %})

function notifedtdel()
{


urlnot="/gstudio/group/notify/"+activity+"/"+not_obj+"/{{user.id}}"

subactivity(urlnot,activity);
}

function subactivity(urlnot,activity)
{
      if(activity=='added_response')
      {
        submitform(activity);
      }

      if (activity != 'undefined')
      {

      $.ajax({
       url: urlnot,
       type:'GET',
       success: function(){

            submitform(activity);
       }
     });
      }
      else
      {
      submitform(activity);
      }
}

function submitform(activity)
{


if (activity=='edited_thread')
{

document.forms["threadform"].submit();
}
if(activity=='edited_twist')
{


$("#topicsubmit"+submtobj).trigger('click');
}
if(activity=='added_response')
{

$("#topicsubmit"+submtobj).trigger('click');
}
if(activity=='deleted_response')
{

 document.forms["response"].submit();
}
}








function Subscribeuser()
{
if (confirm("{{user.username}},Do you want to Subscribe to get all alerts in  your mail for this page"))
{

url = "/gstudio/group/notify/{{meet_ob.id}}/{{user.id}}"

<!--alert(url);-->
<!-- $.get(url,function(){ -->
<!-- alert("notified user"); -->
<!-- }); -->
$.ajax({
       url: '/gstudio/group/notify/{{meet_ob.id}}/{{user.id}}',
       success: function(){
              <!--alert('notified user');-->
       }
     }); 
$("#sub2").val("UnSubscribe");
$("#sub2").attr("onclick","UnSubscribeuser()");
}
}





function UnSubscribeuser()
{
url = "/gstudio/group/notify/unsubscribe/{{meet_ob.id}}/{{user.id}}"

<!--alert(url);-->
<!-- $.get(url,function(){ -->
<!-- alert("notified user"); -->
<!-- }); -->
$.ajax({
       url: '/gstudio/group/notify/unsubscribe/{{meet_ob.id}}/{{user.id}}',
       success: function(){
              <!--alert('notified user');-->
       }
     }); 
$("#sub1").val("Subscribe");
$("#sub1").attr("onclick","Subscribeuser()");
}
</script>
<style type="text/css">
#div2
{
 background-color:#E8E8E8 ;
}
#div1
{
 background-color:#F4F4F4;
}
</style>


<!--   <input type="button" value="Home" onClick="location.href='/gstudio/user/{{user.username}}';">
  <h>Hello Welcome to the {{ meet_ob.title }}</h></br> -->

  
<h2 style="line-height:1">{{meet_ob.title}}{% if user.is_authenticated %} {% edit_title meet_ob.id meet_ob.title %} {% endif %}</h2>
<font size ="3" > {{admin_m.username}}'s initial twist to the thread  &nbsp;[ <a href="{{ meet_ob.get_absolute_url }}" title="{{ meet_ob.title }}" rel="bookmark">Show Graph</a> ] &nbsp;</font>
</br>
{% if user.is_authenticated %}

{% check_subscribe meet_ob user as subscribe %}
{%if subscribe %}
<input type="button" id="sub1" value="UnSubscribe" name="edittitle" onclick="UnSubscribeuser()">
{% else %}
<input type="button" id="sub2" value="Subscribe" name="edittitle" onclick="Subscribeuser()">
{% endif %}
{% endif %}
{% with meet_ob.html_content|safe as meet_ob_content %}
<font size ="3" >{{meet_ob_content}} </font>
{% endwith %}
{% if user.is_authenticated %}
<form method="post" name="threadform" action=".">{% csrf_token %}
<input type="hidden" id="threadid" value={{meet_ob.id}} style="visibility:hidden;" name="editiden">
<input type="hidden" id="threadedit{{meet_ob.id}}" style="visibility:hidden;" name="editval">
<input type="hidden" id="threadcontent{{meet_ob.id}}" value="{{meet_ob.content_org}}" style="visibility:hidden;" name="editcont">
<input type="button" id="threadorg" value={{meet_ob.title}} style="visibility:hidden;" name="edittitle">
<br/>
<input type="button" id="threadedit" value="Edit">
<input type="button" id="editthreadsave" value="Save">
<input type="button" id="subeditresp" value="Submit" style="visibility:hidden;">

</form>


{% if flag %}
{% check_release meet_ob as release %}
{% if not release %}
   <div id="Release"> 
   <form method="post" action=".">{% csrf_token %}
   <input type="submit" value="Release responses">
       <input type="hidden" value="hits" name = "release">
   </form>
   </div>
{% else %}
   <div>
   <form method="post" action=".">{% csrf_token %}
   <input type="submit" value="Block responses">
       <input type="hidden" value="hits" name = "block">
   </form>
   </div>
   {% endif %}
   </br>
{% endif %}
{% endif %}

<!--ADDING AND DISPLAY TAG-->
{% addtag ot meet_ob.id user %}

	<br/>
{% if user.is_authenticated %}
	<form method="post" action=".">{% csrf_token %}
      <!--  <input type="hidden" value="{{meet_ob.id}}" name = "meetid">-->
	<input type="button" id="twistaddbtn" value="Add your twist" onClick="location.href='topicadd1/{{meet_ob.id}}';">
        </form>
{% endif %}
<!-- direct link to identica 
<a href="http://www.addtoany.com/add_to/identi_ca?linkurl=ur url&linkname={{post}} via" ><img src="http://www.tildehash.com/identishare/share.png" ></img></a>
-->
<!-- Twitter syndicating button 
<a href="https://twitter.com/share" class="twitter-share-button"  data-url="https://127.0.0.1:8000/chat/" data-via="{{user.title}}" data-lang="en" data-text="{{post}}" data-related="anywhereTheJavascriptAPI" data-count="none">Tweet</a>
-->
<!-- Diaspora syndicating button 
<script type="text/javascript" src="https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js"></script>
<input id="diasporacontent" value="{{post}}" type="hidden" name="diaspora"></input>
<div id="R-button" style="width:44px;height:44px;cursor:pointer;">
<img id="asterisk" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQ1JREFUeNpi/P//PwO9ACMJajuA2BiL+FkgriDGABYSLANZ5EKJz5gY6AhGLaO6ZaAEoERl85WQUzCyZeVAfBeIz0DZShRYUA41B2ReGjZF/7FgZIt341CzG80CdPl36BaF4jCIWjgUORhdaJw2UMx/R2OfgYOSGYgFgfgoED8HYikon1rgHhDPAuJOIH6PqwzEFdnEYFiiMiYnGc8k0pIOSkNFiYT4fEepZbtJDMJV5FpUTmaclZNqkTER8YMvOIlOHIIEUmIHET4/Q0pb4z+echAZrCLCUXiLFVJSmyC0ZMelh2AxGIojubuQEL/vYIUvsflrNwkprBxLlUNW8ic276wi5ChGeraIAQIMAFUG5PAQfeaJAAAAAElFTkSuQmCC" width="26" height="26">
</div>
-->
</br>   {% autoescape off %}
   {% for each in topic %}
      	<h4><font size="5" >{{each.title}}</font>&nbsp;[ <a href="{{ each.get_absolute_url }}" title="{{ each.title }}" rel="bookmark">Show Graph</a> ]</h4>
      		Posted on : {{each.creation_date}}
		by : 
   		{% for author in each.authors.all %} 
   			{{author}}
   		{% endfor %}</br>
     		<!-- Current rating is <h5>{{ each.rating.get_rating }}</h5> -->
   	{%autoescape on%}
		{% with each.html_content|safe as each_content %}
		<font size ="3" > {{each_content}} </font>
		{% endwith %}
	{% endautoescape%}
	<div>
	<form method="post" action=".">{% csrf_token %}
                
    		<input type="hidden" class="reptext" id="topictext{{ each.id }}" name = "reply" style="display:none">
	<input type="hidden" id="hidden{{ each.id }}" value="{{ each.id }}" name ="hiddenid">
		 <input type="hidden" id="commentdata{{each.id}}" value="{{each.content_org}}">
	        <input type="hidden" value={{user.username}} name = "usr">
    		<input type="hidden" value="{{each.id}}" name = "iden">
	    	<input type="hidden" value="{{user.id}}" name = "idusr">
<br/>			{% if user.is_authenticated %}
		 <input type="button" class="editcontent" name="{{each.content_org}}"  id="{{each.id}}" value="Edit">
		 <input type="button" class="editor" id="{{ each.id }}" value="Add Response"/>
		 <input type="hidden" class="editval" id="edit{{each.id}}" name="edit" value="empty">
                <input type="button" class="savecontent" id="save{{ each.id }}" value="Save" onclick="topicsaveclick(document.getElementById('hidden{{ each.id }}').value)"><br/>
              
	        <input type="submit" class="submitresponse" id="topicsubmit{{ each.id }}" value="Submit"></br>
			{% endif %}
		{% ifequal user.id admin_id %}		
		<input class="topicchk" id="chk{{ each.id }}" name="del_topic" type="checkbox" value="delete_topic"/>
		<input type="submit" class="topicdelete" id="delete{{ each.id }}" value="Delete the twist"></br>
		{% else %}
   		{% for author in each.authors.all %} 
   			{% ifequal user.id author.id %}
		<input class="topicchk" id="chk{{ each.id }}" name="del_topic" type="checkbox" value="delete_topic"/>
		<input type="submit" class="topicdelete" id="delete{{ each.id }}" value="Delete the twist"></br>
			{% endifequal %}
   		{% endfor %}

		{% endifequal %}
  
         <!--	Rate this ? </br>
		<input name="star1" type="radio" value=1 class="star"/>
		<input name="star1" type="radio" value=2 class="star"/>
		<input name="star1" type="radio" value=3 class="star"/>
		<input name="star1" type="radio" value=4 class="star"/>
		<input name="star1" type="radio" value=5 class="star"/>
		<!--topic id and user id hidden fields
		</br>
		<input type="submit" value="Rate it!!!">  -->
         </form>
	</div>   

<!--ADDING AND DISPLAY TAG-->
{% addtag each each.id user %}

	<br/>
        <p>
	 Responses :
	<!--	<div id="main">
	<div id="sidetree">
	<div class="treeheader">&nbsp;</div>
 	<a href="?#">Expand All</a> </div>-->
	<!--<ul class="treeview" id="tree">
 	<li class="expandable"><div class="hitarea expandable-hitarea"></div>Expand the replies</li>-->
         {% show_comment each user.id flag1 admin_id attribute  %}
     {% endfor %}
	The discussion freezes at {{endtime}}
{% endautoescape %}


{% endblock %}