summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/tags
diff options
context:
space:
mode:
authoranujag <anujag@anujag-D630.(none)>2012-08-09 18:38:06 +0530
committeranujag <anujag@anujag-D630.(none)>2012-08-09 18:38:06 +0530
commitb1f71c5439e3bdf7a3c0fb2c1730d6242c6356d9 (patch)
treed49de61f85ce1c6bc68c5b851d9a2754b653e4a3 /gstudio/templates/gstudio/tags
parent1a2ce999facc219c6fe3d2a64e8a39ff09ec9e01 (diff)
downloadgnowsys-b1f71c5439e3bdf7a3c0fb2c1730d6242c6356d9.tar.gz
added loom studio
Diffstat (limited to 'gstudio/templates/gstudio/tags')
-rw-r--r--gstudio/templates/gstudio/tags/comment.html204
1 files changed, 158 insertions, 46 deletions
diff --git a/gstudio/templates/gstudio/tags/comment.html b/gstudio/templates/gstudio/tags/comment.html
index cf446fe..8e1d480 100644
--- a/gstudio/templates/gstudio/tags/comment.html
+++ b/gstudio/templates/gstudio/tags/comment.html
@@ -15,54 +15,166 @@
<!-- Flag1 outside {{flag}}-->
{% for each in child.authors.all %}
{% ifequal idusr admin_id %}
- <li>{{each}} says <font style = "color:red;" size = 3>{{child.title}}</font>
- <form method="post" action=".">{% csrf_token %}
- <input type="text" name = "reply">
- <input type="hidden" value={{child.id}} name = "parentid">
- <input type="hidden" value={{idusr}} name="idusr">
- <input type="submit" value="Post a Reply">
- <input type="checkbox" name="del_comment" value="delete_comment">
- <input type="submit" value="delete this comment">
- </form>
- {% show_comment child idusr flag admin_id attribute%}
- </li>
- {% else %}
- {% ifequal idusr each.id %}
- <li>{{each}} says <font style = "color:red;" size = 3>{{child.title}}</font>
- <form method="post" action=".">{% csrf_token %}
- <input type="text" name = "reply">
- <input type="hidden" value={{child.id}} name = "parentid">
- <input type="hidden" value={{idusr}} name="idusr">
- <input type="submit" value="Post a Reply">
- <input type="checkbox" name="del_comment" value="delete_comment">
- <input type="submit" value="delete this comment">
- </form>
- {% show_comment child idusr flag admin_id attribute%}
- </li>
- {% else %}
- {% ifequal attribute "true" %}
-
- <li>{{each}} says <font style = "color:red;" size = 3>{{child.title}}</font>
- <form method="post" action=".">{% csrf_token %}
- <input type="text" name = "reply">
- <input type="hidden" value={{child.id}} name = "parentid">
- <input type="hidden" value={{idusr}} name="idusr">
- <input type="submit" value="Post a Reply">
- <input type="checkbox" name="del_comment" value="delete_comment">
- <input type="submit" value="delete this comment">
- </form>
- {% show_comment child idusr flag admin_id attribute%}
- </li>
- {% endifequal %}
- {% endifequal %}
- {% endifequal %}
- {% endfor %}
-
-
-{% endfor %}
-</ul>
+<!-- If user is admin -->
+<div class="response_change" id="divchange">
+<script type="text/javascript">
+i = i+1;
+if (i%2 == 0)
+{
+document.getElementById("divchange").setAttribute("id","div1");
+}
+else
+{
+document.getElementById("divchange").setAttribute("id","div2");
+}
+</script>
+
+
+ <li>{{each}}'s fabric
+{% if child.rating.get_rating %}
+Current rating is {{ child.rating.get_rating }}<br/>
{% endif %}
+<font style = "color:red;" size = 3>{{child.content}}</font>
+ <form method="post" action=".">{% csrf_token %}
+ <input type="text" class="commentreptext"id="{{child.id}}" name = "reply" style="visibility:hidden">
+ <input type="hidden" value={{child.id}} name = "parentid">
+ <input type="hidden" value={{idusr}} name="idusr">
+ <!-- <input type="hidden" value="{{child.id}}" name = "iden"> -->
+ <!-- <input type="text" id="commentreptext" name = "reply" style="visibility:hidden"> -->
+
+
+ <br/><br/><br/><br/>
+
+ <input type="button" class="commenteditor" id="{{ child.id }}" value="Reply">
+ <input type="button" class="commentsavecontent" id="{{child.id}}" value="Save">
+ <input type="submit" id="postreply" value="Post a Reply">
+ <input type="checkbox" id="chk" name="del_comment" value="delete_comment">
+ <input type="submit" value="delete" onclick="setcheck()">
+<br/>
+ Do you wanna rate it ? </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 Response">
+ </form>
+</div>
+
+
+ {% show_comment child idusr flag admin_id attribute%}
+
+
+ {% else %}
+ {% ifequal idusr each.id %}
+
+<div class="response_change" id="divchange">
+<script type="text/javascript">
+i = i+1;
+if (i%2 == 0)
+{
+document.getElementById("divchange").setAttribute("id","div1");
+}
+else
+{
+document.getElementById("divchange").setAttribute("id","div2");
+}
+</script>
+{{each}}'s Response <br/>
+{% if child.rating.get_rating %}
+Current rating is {{ child.rating.get_rating }}<br/>
+{% endif %}
+ <font style = "color:red;" size ="3"></font>{{child.content}}
+ <form method="post" action="">{% csrf_token %}
+ <input type="text" class="commentreptext" id="{{child.id}}" name="reply" style="visibility:hidden">
+ <input type="hidden" class="parent" value="{{child.id}}" name="parentid">
+ <input type="hidden" value="{{idusr}}" name="idusr">
+<!-- <input type="hidden" value="{{child.id}}" name="iden"> -->
+ <!-- <input type="text" id="commentreptext" name = "reply" style="visibility:hidden"> -->
+ <br/><br/><br/><br/>
+
+ <input type="button" class="commenteditor" id="{{ child.id }}" value="Reply">
+ <input type="button" class="commentsavecontent" id="{{child.id}}" value="Save">
+ <input type="submit" class="postreply" value="Post a Reply">
+ <input type="checkbox" class="chk" name="del_comment" value="delete_comment">
+ <input type="button" class="deleteresponse" value="delete" style="display:none">
+ <input type="submit" class="deleteresp" value="delete">
+
+
+<br/>
+ Do you wanna rate it ? </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 Response">
+
+ </form>
+</div>
+ {% show_comment child idusr flag admin_id attribute%}
+
+
+ {% else %}
+ {% ifequal attribute "true" %}
+
+<div class="response_change" id="divchange">
+<script type="text/javascript">
+i = i+1;
+if (i%2 == 0)
+{
+document.getElementById("divchange").setAttribute("id","div1");
+}
+else
+{
+document.getElementById("divchange").setAttribute("id","div2");
+}
+</script>
+ {{each}}'s Response <br/>
+{% if child.rating.get_rating %}
+Current rating is {{ child.rating.get_rating }}<br/>
+{% endif %}
+ <font style = "color:red;" size = 3></font>{{child.content}}
+
+ <form method="post" action=".">{% csrf_token %}
+ <input type="text" class="commentreptext"id="{{child.id}}" name = "reply" style="visibility:hidden">
+ <input type="hidden" value="{{child.id}}" name = "parentid">
+ <input type="hidden" value="{{idusr}}" name="idusr">
+ <input type="hidden" value="{{child.id}}" name = "iden">
+ <!-- <input type="text" id="commentreptext" name = "reply" style="visibility:hidden"> -->
+<br/><br/><br/><br/>
+
+ <input type="button" class="commenteditor" id="{{ child.id }}" value="Reply">
+ <input type="button" class="commentsavecontent" id="{{child.id}}" value="Save">
+ <input type="submit" id="postreply" value="Post a Reply" style="display:none">
+ <input type="checkbox" id="chk" name="del_comment" value="delete_comment">
+ <input type="submit" value="delete this comment""> <br/>
+ Rate this response </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 Response">
+
+ </form>
+
+</div>
+
+ {% show_comment child idusr flag admin_id attribute%} {% endifequal %}
+ {% endifequal %}
+ {% endifequal %}
+ {% endfor %}
+ {% endfor %}
+</ul>
+{% endif %}