<commit_before>{% load ndf_tags %}
{% load i18n %}
{% load cache %}
{% user_access_policy groupid request.user as user_access %}
{% get_group_object groupid as group_object %}
{% is_partner group_object as is_partner_val %}
{% with user.is_authenticated as is_user_authenticated %}
{% check_is_gstaff groupid request.user as is_gstaff %}
{% check_group node.pk as is_group %}
{% check_is_user_group node.pk as is_user_group %}
<style type="text/css">
	.right-btn, .left-btn{
		/*float: left;*/
		/*margin-left: 1rem;*/
		width: 40%;
		font-size: 0.70em !important;
		margin-top: 0.1rem !important;
		text-align: center;
	}
	.tag-rating-div{
		margin-left: 0.6rem !important;
		margin-top: 0.3rem !important;
	}
	/*	
	.right-btn{
		float: right;
		margin-right: 1rem;
		width: 8rem;
		font-size: 0.75rem !important
	}
	*/
	.rating-lbl{
		display: inline-block;
		font-size: 1rem !important;
		/*font-style: italic;*/
		/*margin-left: 3rem;*/

	}
	.rating_template{
		display: inline-table;
	}
	.mod-btn{
		width: 80% !important;
		font-size: 0.75rem !important;
	}
	.btn-row{
		/*margin-left: 1rem !important;*/
		text-align: center;
		margin-bottom: -1rem !important;
	}
	.lbl_tag{
		display: inline-block;
		font-size: 0.80rem !important;
	}
	.lbl_field{
		width: 20%;
		color: #194d6f;
		/*font-weight: bold;*/
		margin-top: 1rem;
		font-size: 1rem !important;
	}
	.label > a{
		color: white !important;
	}

	.graph_btn{
		margin-left: 3rem;
	}

	#group_drawer{
		height: 400px;
		overflow-y: auto;
		margin-left: 2em;
	}
</style>
  <div id="deleteModal" class="reveal-modal medium alert-box radius" data-reveal data-alert>
    <p id="deleteModalLabel"></p>
    <div class="row feeds_proceed">
      <div class="small-3 small-offset-3 columns">
        <input type="button" id="btnConfirmYes" class="button tiny expand" value={% trans "Yes" %}>
      </div>
      <div class="small-3 columns end">
        <input type="button" id="btnConfirmNo" class="button tiny expand " value={% trans "No" %}>
      </div>
    </div>
    <a class="close-reveal-modal">&#215;</a>
  </div>

<section class="medium-3 columns"> 
	<ul class="side-nav">

		<!-- PANEL 1
		 Resource related Actions such as 
			Edit, Publish, Delete, History,
			Translate, Cross Publish,
			Tags
		 -->
		<div class="panel">
			<!-- Edit and Publish -->
				<div class="row btn-row">
					<!-- Edit button -->
						{% edit_policy groupid node request.user as status %}
						{% if is_user_authenticated %}
							{% get_sg_member_of groupid as list_of_sg_member_of %}
							{% if "ProgramEventGroup" not in list_of_sg_member_of %}
							{% get_edit_url node.pk as edit_url %}
							{% if is_group %}
								{% if is_gstaff %}
									{% if "PartnerGroup" in node.member_of_names_list %}
									<a href="{% url 'edit_group' group_id %}?subgroup=True&partnergroup=True" class="tiny button radius left-btn" title="Edit this {{node.member_of_names_list.0}}">{% trans " Edit" %}</a>
									{% else %}
									<a href="{% url edit_url group_id %}" title="Edit this {{node.member_of_names_list.0}}" class="tiny button radius left-btn">{% trans " Edit" %}</a>
									{% endif %}
								{% endif %}
							{% else %}
								{% if is_gstaff or node.created_by == user.id %}
									<a href="{% url edit_url group_id node %}" class="tiny button radius left-btn" title="Edit this {{node.member_of_names_list.0}}">{% trans " Edit" %}</a>
								{% else %}
									<input type="button" class="tiny button radius secondary left-btn  disabled" value="Edit" title={% trans "You are not authorized for this action" %}>
								{% endif %}
							{% endif %}
							{% endif %}
						{% else %}
							<input type="button" class="tiny button radius secondary left-btn  disabled" value="Edit" title={% trans "You are not authorized for this action" %}>
						{% endif %}


					<!-- Publish button -->
					{% if node %}
						{% get_publish_policy request groupid node as group_policy %}
						{% if group_policy == "allow" %}
							{% if user.is_superuser or node.created_by == user.id %}
								{% if is_group %}
									<a href="{% url 'publish_group' group_id node %}" class="tiny button radius right-btn" title="Publish this {{node.member_of_names_list.0}}">{% trans "Publish" %}</a>
								{% else %}
									<a href="{% url 'publish_page' group_id node %}" class="tiny button radius right-btn" title="Publish this {{node.member_of_names_list.0}}">{% trans "Publish" %}</a>
								{% endif %}
							{% endif %}
						{% elif group_policy == "MODERATION" %}
							<input type="button" class="tiny button radius right-btn secondary disabled" title="Resource is under Moderation" value="{% trans 'Moderation' %}">
						{% else %}
							<input type="button" class="tiny button radius right-btn secondary disabled" title="This {{node.member_of_names_list.0}} is Published." value="{% trans 'Published' %}">
						{% endif %}
					{% endif %}
				</div>
			{% if not is_group %}
			{% if node.status != "MODERATION" %}
			<!-- Delete and History NA -->
			<!-- Cross publish and Delete -->
				{% if user.is_authenticated %} 
				<div class="row btn-row">
					{% comment %}
					<!-- History -->
					<a href = "{% url 'node_version' groupid node.pk  %}" class="tiny button radius right-btn" >{% trans "History" %}</a> 
					{% endcomment %}
						<!-- Cross Publish -->
						{% if 'CourseEventGroup' not in group_object.member_of_names_list %}
							{% if node.created_by == request.user.id or is_gstaff %}
							<!-- {% switch_group_conditions request.user group_id as switch_conditions %} -->
							<!-- If resource is already under moderation, don't show cross-publish button -->

								<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><a id="switch_group" class="tiny button radius right-btn" data-reveal-id="publish_resource"> {% trans "Cross Publish" %}</a></span>
								<div id="publish_resource" class="reveal-modal" data-reveal style="position:absolute;"> 
									<h4>{% trans "Select Groups" %}</h4>
									<div id="switchgrp" class="content">
									<ul id="group_drawer" class="large-block-grid-2">
									</ul><br/>
									<input type="button" id="save_switch_group" class="round button push-4" value="{% trans 'Save selected group' %}">
									</div>
									<a class="close-reveal-modal">&#215;</a>
								</div>
							{% else %}
								<input type="button" class="tiny button radius left-btn secondary disabled" title={% trans "You are not authorized for this action" %} value="{% trans 'Cross Publish' %}">
							{% endif %}
						{% endif %}
						<!-- Delete button				 -->
						{% if node.created_by == request.user.id or is_gstaff %}
							{% if "Page" in node.member_of_names_list or "File" in node.member_of_names_list or "Term" in node.member_of_names_list %}
								<a class="tiny button radius right-btn delete-btn" title="Delete  {{node.member_of_names_list.0}}">{% trans 'Delete' %} {{node.member_of_names_list.0}}</a>
							{% else %}
								<input type="button" class="tiny button radius right-btn disabled secondary" value="{% trans 'Delete'  %} {{node.member_of_names_list.0}}">
							{% endif %}
						{% else %}
							<input type="button" class="tiny button radius right-btn secondary disabled" value="{% trans 'Delete' %}{{node.member_of_names_list.0}}" title={% trans "You are not authorized for this action" %}>
						{% endif %}


				</div>
				{% endif %}
			{% comment %}
			<!-- Translate and Cross Publish if not is_group-->

				<div class="row btn-row">

					<!-- ste -->
					{% if user.is_authenticated %}
						{% if user_is_joined == "joined" or user_is_joined == "author" %}
							<a href="{% url 'node_translation' group_name_tag node %}" class="tiny button radius left-btn">{% trans "Translate" %}</a>
						{% endif %}
						<!-- Cross Publish -->
						{% if 'CourseEventGroup' not in group_object.member_of_names_list %}
							<!-- {% switch_group_conditions request.user group_id as switch_conditions %} -->
							<!-- If resource is already under moderation, don't show cross-publish button -->
								<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><a id="switch_group" class="tiny button radius right-btn" data-reveal-id="publish_resource"> {% trans "Cross Publish" %}</a></span>
								<div id="publish_resource" class="reveal-modal" data-reveal style="position:absolute;"> 
									<div id="switchgrp" class="content">
									<h4>{% trans "Select Groups" %}</h4>
									<div id="group_drawer">
									{% include "ndf/drawer_widget.html" with widget_for="collection_set" %}
									</div><br/>
									<input type="button" id="save_switch_group" class="round button push-4" value="{% trans 'Save selected group' %}">
									</div>
									<a class="close-reveal-modal">&#215;</a>
								</div>          

						{% endif %}

					{% else %}
						<input type="button" class="tiny disabled secondary button radius left-btn" value="{% trans "Translate" %}" >
						<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><input type="button"class="secondary disabled tiny button radius right-btn" value="{% trans 'Cross Publish' %}"></span>
					{% endif %}
				</div>
			{% endcomment %}
			<!-- Tags row -->
				<div class="row tag-rating-div">
					<span data-tooltip title='{% trans "keyword or label to categorize" %}'><label class="lbl_tag lbl_field">{% trans "Tags" %}</label></span>
						{% if node.tags %}
							{% for tag in node.tags %}
								{% if forloop.counter < 3 %}
									<small><label class="lbl_tag label">
								{% else %}
									<small><label class="lbl_tag label tag_ele hide">
								{% endif %}
								<a href="{% url 'tag_info' groupid tag %}">{{tag}} </a></label></small>
							{% endfor %}
							{% if node.tags|length > 2 %}
								<small><label class="view-more-tags" style="display:inline-block;">More</label></small>
							{% endif %}	
						{% else %}
						<i><small><label class="lbl_tag">{% trans "No tags defined yet!" %}</label></small></i>
						{% endif %}
				</div>

			<!-- Ratings -->
				{% if group_object.edit_policy != "EDITABLE_MODERATED" or "CourseEventGroup" in group_object.member_of_names_list %}
					{% if "File" in node.member_of_names_list or "Page" in node.member_of_names_list %}
					{% get_list_of_fields node.type_of "name" as type_of_list %}
					{% if "Info page" not in type_of_list %}
						<div class="row tag-rating-div">
							<span data-tooltip title='{% trans "Rating defines popularity" %}'>
								<label class="lbl_tag lbl_field">{% trans "Rating" %}</label>
							</span>
							<div class="rating_template"> {% include "ndf/rating.html" %} </div>
						</div>
					{% endif %}
					{% endif %}
				{% endif %}
			
			<!-- Location	-->
				
				{% if node.location %}
		        	<a data-reveal-id="view-map-widget" class="lbl_field tag-rating-div" title={% trans "Click to view the location" %}><i class="fi-marker"></i> {% trans "Location" %}</a>
	        	{% endif %}

		    <!-- Graphs For Topics or Concept -->
	      	{% comment %}
		      {% if "Topic" in node.member_of_names_list or "Concept" in node.member_of_names_list %}
		        <!-- Below code/widgets will only be shown for all resource instances/documents
		             which are Topic or Concept
		        -->

		        
		        <!-- commented for time being, for TB. -->
		        <a href="#" class="lbl_field tag-rating-div" data-dropdown="graph-list" data-options="is_hover:true;align:left"><i class="fi-share"></i> {% trans "Graphs" %}</a>
		        
		        <ul id="graph-list" class="f-dropdown" data-dropdown-content>
		          <li><a href="#view-concept-graph" data-reveal-id="view-concept-graph" id="clickConceptGraph">{% trans "Concept Graph" %}</a></li>

		          {% if node.collection_set %}
		          	<li><a href="#view-collection-graph" data-reveal-id="view-collection-graph">{% trans "Collection Graph" %}</a></li>
		          {% endif %}

		          {% if node.prior_node %}
		          	<li><a href="#view-dependency-graph" data-reveal-id="view-dependency-graph">{% trans "Dependency Graph" %}</a></li>
		          {% endif %}               
		        </ul>
		      {% endif %}
	        {% endcomment %}
	
		        
			{% endif %}

			{% endif %}
		</div>

		<!-- PANEL 2
		New {{node}} and Group related actions such as
		Group Analytics, New Subgroup, New ProgramEvent,
 		-->		
 		
 		{% if group_object.edit_policy != "EDITABLE_MODERATED" %}
		<div class="panel">

			{% if user.is_authenticated %}
			<div class="row btn-row">
				<!-- New (GS) -->
					{% get_create_url node.pk as create_url %}
						{% if is_group %}
							{% if is_gstaff %}
							<!-- Prevent creating New group from context of top mod group -->
							{% if group_object.edit_policy != "EDITABLE_MODERATED" and is_gstaff %}
								<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="{% trans 'Create New Group' %}">{% trans 'New Group' %}</a>
							{% endif %}								
							{% endif %}								
						{% else %}
							{% if user_is_joined == "joined" or  user_is_joined == "author" %}
								{% if node.status != 'MODERATION' %}
									{% if "File" in node.member_of_names_list %}
										<a href="{% url create_url group_name_tag %}?next={{request.path}}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
									{% else %}
										{% if "Theme" in node.member_of_names_list or "Topic" in node.member_of_names_list %}
											{% if is_gstaff %}
												<a href="{% url create_url group_name_tag app_id %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
											{% endif %}

										{% elif "Term" in node.member_of_names_list %}
											<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} Topic
											</a>
										{% elif "Group" not in node.member_of_names_list and "ProgramEventGroup" not in node.member_of_names_list and "CourseEventGroup" not in node.member_of_names_list and "ModeratingGroup" not in node.member_of_names_list %}
											<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
										{% endif %}
									{% endif %}
								{% endif %}
							{% endif %}
						{% endif %}

				{% comment %}
					<!-- Group Analytics -->
					<a href="/{{group_id}}/analytics/group/summary/" class="tiny button radius right-btn">{% trans 'Group Analytics' %}</a>
				{% endcomment %}
			</div>
			{% endif %}

			
			{% if is_gstaff %}
			<!-- New SubGroup and PE-->
			<div class="row btn-row">
						{% if is_partner_val %}
							<a class="button tiny radius left-btn" href="{% url 'create_group' group_object.pk %}?subgroup=True&partnergroup=True" title="Create New Sub Partner">{% trans "New Sub Partner" %} </a>
						{% else %}
							<a href="{% url 'create_group' group_id %}?subgroup=True" class="tiny button radius left-btn" title="Create New Sub Group">{% trans "New SubGroup" %}</a>
	  					{% endif %}
						<a href="{% url 'create_event_group' group_id 'ProgramEventGroup' %}" class="tiny button radius right-btn" title="Create New Program">{% trans "New Program" %}</a>
			</div>
			{% endif %}
		</div>
		{% endif %}

		<!-- PANEL 3
		Group subscription related actions such as
		List Members, Join/Unsubscribe,
		Subscribe Users, Subscribe Admins
 		-->
		{% if not is_user_group %}

		<div class="panel">
			{% if is_gstaff or 'ModeratingGroup' not in group_object.member_of_names_list and 'ProgramEventGroup' not in group_object.member_of_names_list and "PartnerGroup" not in group_object.member_of_names_list and is_partner_val %}
				<!-- List Members and Join buttons -->
				<div class="row btn-row">
					<!-- List Members -->
						<input type="button" id ="btn_list_member" class="tiny button radius left-btn" data-reveal-id="firstModal" value="{% trans 'List Members' %}" title="List Members of this group">
						<!-- Reveal Modals begin -->
						<div id="firstModal" class="reveal-modal" data-reveal></div>
					
					<!-- Join/ Unsubscribe -->
						{% if user.is_authenticated %}
							{% if not is_gstaff %}
								{% if user_is_joined == "joined" %}
									<input class="tiny button radius right-btn" title="Unsubscribe from this group" type="submit" id="notify" value="{% trans 'Unsubscribe' %}"
									{% if group_name_tag == "home" %}
										disabled="disabled" 
									{% endif %}
									>
									{% comment %}
										<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Stop following' %}">
									{% endcomment %}

								{% elif user_is_joined == "not" %}
									{% if allow_to_join %}
									<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Join' %}" title="Join this Group">
									{% else %}
									<input class="tiny button radius secondary disabled right-btn" type="button" id="notify" value="{% trans 'Closed' %}" title={% trans "You are not authorized for this action" %}>
									{% endif %}
									{% comment %}
										<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Follow' %}">
									{% endcomment %}<commit_msg>list Members button only visible for gstaff<commit_after>{% load ndf_tags %}
{% load i18n %}
{% load cache %}
{% user_access_policy groupid request.user as user_access %}
{% get_group_object groupid as group_object %}
{% is_partner group_object as is_partner_val %}
{% with user.is_authenticated as is_user_authenticated %}
{% check_is_gstaff groupid request.user as is_gstaff %}
{% check_group node.pk as is_group %}
{% check_is_user_group node.pk as is_user_group %}
<style type="text/css">
	.right-btn, .left-btn{
		/*float: left;*/
		/*margin-left: 1rem;*/
		width: 40%;
		font-size: 0.70em !important;
		margin-top: 0.1rem !important;
		text-align: center;
	}
	.tag-rating-div{
		margin-left: 0.6rem !important;
		margin-top: 0.3rem !important;
	}
	/*	
	.right-btn{
		float: right;
		margin-right: 1rem;
		width: 8rem;
		font-size: 0.75rem !important
	}
	*/
	.rating-lbl{
		display: inline-block;
		font-size: 1rem !important;
		/*font-style: italic;*/
		/*margin-left: 3rem;*/

	}
	.rating_template{
		display: inline-table;
	}
	.mod-btn{
		width: 80% !important;
		font-size: 0.75rem !important;
	}
	.btn-row{
		/*margin-left: 1rem !important;*/
		text-align: center;
		margin-bottom: -1rem !important;
	}
	.lbl_tag{
		display: inline-block;
		font-size: 0.80rem !important;
	}
	.lbl_field{
		width: 20%;
		color: #194d6f;
		/*font-weight: bold;*/
		margin-top: 1rem;
		font-size: 1rem !important;
	}
	.label > a{
		color: white !important;
	}

	.graph_btn{
		margin-left: 3rem;
	}

	#group_drawer{
		height: 400px;
		overflow-y: auto;
		margin-left: 2em;
	}
</style>
  <div id="deleteModal" class="reveal-modal medium alert-box radius" data-reveal data-alert>
    <p id="deleteModalLabel"></p>
    <div class="row feeds_proceed">
      <div class="small-3 small-offset-3 columns">
        <input type="button" id="btnConfirmYes" class="button tiny expand" value={% trans "Yes" %}>
      </div>
      <div class="small-3 columns end">
        <input type="button" id="btnConfirmNo" class="button tiny expand " value={% trans "No" %}>
      </div>
    </div>
    <a class="close-reveal-modal">&#215;</a>
  </div>

<section class="medium-3 columns"> 
	<ul class="side-nav">

		<!-- PANEL 1
		 Resource related Actions such as 
			Edit, Publish, Delete, History,
			Translate, Cross Publish,
			Tags
		 -->
		<div class="panel">
			<!-- Edit and Publish -->
				<div class="row btn-row">
					<!-- Edit button -->
						{% edit_policy groupid node request.user as status %}
						{% if is_user_authenticated %}
							{% get_sg_member_of groupid as list_of_sg_member_of %}
							{% if "ProgramEventGroup" not in list_of_sg_member_of %}
							{% get_edit_url node.pk as edit_url %}
							{% if is_group %}
								{% if is_gstaff %}
									{% if "PartnerGroup" in node.member_of_names_list %}
									<a href="{% url 'edit_group' group_id %}?subgroup=True&partnergroup=True" class="tiny button radius left-btn" title="Edit this {{node.member_of_names_list.0}}">{% trans " Edit" %}</a>
									{% else %}
									<a href="{% url edit_url group_id %}" title="Edit this {{node.member_of_names_list.0}}" class="tiny button radius left-btn">{% trans " Edit" %}</a>
									{% endif %}
								{% endif %}
							{% else %}
								{% if is_gstaff or node.created_by == user.id %}
									<a href="{% url edit_url group_id node %}" class="tiny button radius left-btn" title="Edit this {{node.member_of_names_list.0}}">{% trans " Edit" %}</a>
								{% else %}
									<input type="button" class="tiny button radius secondary left-btn  disabled" value="Edit" title={% trans "You are not authorized for this action" %}>
								{% endif %}
							{% endif %}
							{% endif %}
						{% else %}
							<input type="button" class="tiny button radius secondary left-btn  disabled" value="Edit" title={% trans "You are not authorized for this action" %}>
						{% endif %}


					<!-- Publish button -->
					{% if node %}
						{% get_publish_policy request groupid node as group_policy %}
						{% if group_policy == "allow" %}
							{% if user.is_superuser or node.created_by == user.id %}
								{% if is_group %}
									<a href="{% url 'publish_group' group_id node %}" class="tiny button radius right-btn" title="Publish this {{node.member_of_names_list.0}}">{% trans "Publish" %}</a>
								{% else %}
									<a href="{% url 'publish_page' group_id node %}" class="tiny button radius right-btn" title="Publish this {{node.member_of_names_list.0}}">{% trans "Publish" %}</a>
								{% endif %}
							{% endif %}
						{% elif group_policy == "MODERATION" %}
							<input type="button" class="tiny button radius right-btn secondary disabled" title="Resource is under Moderation" value="{% trans 'Moderation' %}">
						{% else %}
							<input type="button" class="tiny button radius right-btn secondary disabled" title="This {{node.member_of_names_list.0}} is Published." value="{% trans 'Published' %}">
						{% endif %}
					{% endif %}
				</div>
			{% if not is_group %}
			{% if node.status != "MODERATION" %}
			<!-- Delete and History NA -->
			<!-- Cross publish and Delete -->
				{% if user.is_authenticated %} 
				<div class="row btn-row">
					{% comment %}
					<!-- History -->
					<a href = "{% url 'node_version' groupid node.pk  %}" class="tiny button radius right-btn" >{% trans "History" %}</a> 
					{% endcomment %}
						<!-- Cross Publish -->
						{% if 'CourseEventGroup' not in group_object.member_of_names_list %}
							{% if node.created_by == request.user.id or is_gstaff %}
							<!-- {% switch_group_conditions request.user group_id as switch_conditions %} -->
							<!-- If resource is already under moderation, don't show cross-publish button -->

								<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><a id="switch_group" class="tiny button radius right-btn" data-reveal-id="publish_resource"> {% trans "Cross Publish" %}</a></span>
								<div id="publish_resource" class="reveal-modal" data-reveal style="position:absolute;"> 
									<h4>{% trans "Select Groups" %}</h4>
									<div id="switchgrp" class="content">
									<ul id="group_drawer" class="large-block-grid-2">
									</ul><br/>
									<input type="button" id="save_switch_group" class="round button push-4" value="{% trans 'Save selected group' %}">
									</div>
									<a class="close-reveal-modal">&#215;</a>
								</div>
							{% else %}
								<input type="button" class="tiny button radius left-btn secondary disabled" title={% trans "You are not authorized for this action" %} value="{% trans 'Cross Publish' %}">
							{% endif %}
						{% endif %}
						<!-- Delete button				 -->
						{% if node.created_by == request.user.id or is_gstaff %}
							{% if "Page" in node.member_of_names_list or "File" in node.member_of_names_list or "Term" in node.member_of_names_list %}
								<a class="tiny button radius right-btn delete-btn" title="Delete  {{node.member_of_names_list.0}}">{% trans 'Delete' %} {{node.member_of_names_list.0}}</a>
							{% else %}
								<input type="button" class="tiny button radius right-btn disabled secondary" value="{% trans 'Delete'  %} {{node.member_of_names_list.0}}">
							{% endif %}
						{% else %}
							<input type="button" class="tiny button radius right-btn secondary disabled" value="{% trans 'Delete' %}{{node.member_of_names_list.0}}" title={% trans "You are not authorized for this action" %}>
						{% endif %}


				</div>
				{% endif %}
			{% comment %}
			<!-- Translate and Cross Publish if not is_group-->

				<div class="row btn-row">

					<!-- ste -->
					{% if user.is_authenticated %}
						{% if user_is_joined == "joined" or user_is_joined == "author" %}
							<a href="{% url 'node_translation' group_name_tag node %}" class="tiny button radius left-btn">{% trans "Translate" %}</a>
						{% endif %}
						<!-- Cross Publish -->
						{% if 'CourseEventGroup' not in group_object.member_of_names_list %}
							<!-- {% switch_group_conditions request.user group_id as switch_conditions %} -->
							<!-- If resource is already under moderation, don't show cross-publish button -->
								<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><a id="switch_group" class="tiny button radius right-btn" data-reveal-id="publish_resource"> {% trans "Cross Publish" %}</a></span>
								<div id="publish_resource" class="reveal-modal" data-reveal style="position:absolute;"> 
									<div id="switchgrp" class="content">
									<h4>{% trans "Select Groups" %}</h4>
									<div id="group_drawer">
									{% include "ndf/drawer_widget.html" with widget_for="collection_set" %}
									</div><br/>
									<input type="button" id="save_switch_group" class="round button push-4" value="{% trans 'Save selected group' %}">
									</div>
									<a class="close-reveal-modal">&#215;</a>
								</div>          

						{% endif %}

					{% else %}
						<input type="button" class="tiny disabled secondary button radius left-btn" value="{% trans "Translate" %}" >
						<span data-tooltip title={% trans "Publish this resource in other group/s" %} class="has-tip tip-bottom"><input type="button"class="secondary disabled tiny button radius right-btn" value="{% trans 'Cross Publish' %}"></span>
					{% endif %}
				</div>
			{% endcomment %}
			<!-- Tags row -->
				<div class="row tag-rating-div">
					<span data-tooltip title='{% trans "keyword or label to categorize" %}'><label class="lbl_tag lbl_field">{% trans "Tags" %}</label></span>
						{% if node.tags %}
							{% for tag in node.tags %}
								{% if forloop.counter < 3 %}
									<small><label class="lbl_tag label">
								{% else %}
									<small><label class="lbl_tag label tag_ele hide">
								{% endif %}
								<a href="{% url 'tag_info' groupid tag %}">{{tag}} </a></label></small>
							{% endfor %}
							{% if node.tags|length > 2 %}
								<small><label class="view-more-tags" style="display:inline-block;">More</label></small>
							{% endif %}	
						{% else %}
						<i><small><label class="lbl_tag">{% trans "No tags defined yet!" %}</label></small></i>
						{% endif %}
				</div>

			<!-- Ratings -->
				{% if group_object.edit_policy != "EDITABLE_MODERATED" or "CourseEventGroup" in group_object.member_of_names_list %}
					{% if "File" in node.member_of_names_list or "Page" in node.member_of_names_list %}
					{% get_list_of_fields node.type_of "name" as type_of_list %}
					{% if "Info page" not in type_of_list %}
						<div class="row tag-rating-div">
							<span data-tooltip title='{% trans "Rating defines popularity" %}'>
								<label class="lbl_tag lbl_field">{% trans "Rating" %}</label>
							</span>
							<div class="rating_template"> {% include "ndf/rating.html" %} </div>
						</div>
					{% endif %}
					{% endif %}
				{% endif %}
			
			<!-- Location	-->
				
				{% if node.location %}
		        	<a data-reveal-id="view-map-widget" class="lbl_field tag-rating-div" title={% trans "Click to view the location" %}><i class="fi-marker"></i> {% trans "Location" %}</a>
	        	{% endif %}

		    <!-- Graphs For Topics or Concept -->
	      	{% comment %}
		      {% if "Topic" in node.member_of_names_list or "Concept" in node.member_of_names_list %}
		        <!-- Below code/widgets will only be shown for all resource instances/documents
		             which are Topic or Concept
		        -->

		        
		        <!-- commented for time being, for TB. -->
		        <a href="#" class="lbl_field tag-rating-div" data-dropdown="graph-list" data-options="is_hover:true;align:left"><i class="fi-share"></i> {% trans "Graphs" %}</a>
		        
		        <ul id="graph-list" class="f-dropdown" data-dropdown-content>
		          <li><a href="#view-concept-graph" data-reveal-id="view-concept-graph" id="clickConceptGraph">{% trans "Concept Graph" %}</a></li>

		          {% if node.collection_set %}
		          	<li><a href="#view-collection-graph" data-reveal-id="view-collection-graph">{% trans "Collection Graph" %}</a></li>
		          {% endif %}

		          {% if node.prior_node %}
		          	<li><a href="#view-dependency-graph" data-reveal-id="view-dependency-graph">{% trans "Dependency Graph" %}</a></li>
		          {% endif %}               
		        </ul>
		      {% endif %}
	        {% endcomment %}
	
		        
			{% endif %}

			{% endif %}
		</div>

		<!-- PANEL 2
		New {{node}} and Group related actions such as
		Group Analytics, New Subgroup, New ProgramEvent,
 		-->		
 		
 		{% if group_object.edit_policy != "EDITABLE_MODERATED" %}
		<div class="panel">

			{% if user.is_authenticated %}
			<div class="row btn-row">
				<!-- New (GS) -->
					{% get_create_url node.pk as create_url %}
						{% if is_group %}
							{% if is_gstaff %}
							<!-- Prevent creating New group from context of top mod group -->
							{% if group_object.edit_policy != "EDITABLE_MODERATED" and is_gstaff %}
								<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="{% trans 'Create New Group' %}">{% trans 'New Group' %}</a>
							{% endif %}								
							{% endif %}								
						{% else %}
							{% if user_is_joined == "joined" or  user_is_joined == "author" %}
								{% if node.status != 'MODERATION' %}
									{% if "File" in node.member_of_names_list %}
										<a href="{% url create_url group_name_tag %}?next={{request.path}}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
									{% else %}
										{% if "Theme" in node.member_of_names_list or "Topic" in node.member_of_names_list %}
											{% if is_gstaff %}
												<a href="{% url create_url group_name_tag app_id %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
											{% endif %}

										{% elif "Term" in node.member_of_names_list %}
											<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} Topic
											</a>
										{% elif "Group" not in node.member_of_names_list and "ProgramEventGroup" not in node.member_of_names_list and "CourseEventGroup" not in node.member_of_names_list and "ModeratingGroup" not in node.member_of_names_list %}
											<a href="{% url create_url group_name_tag %}" class="tiny button radius expand mod-btn" title="Create New {{node.member_of_names_list.0}}">{% trans "New" %} {{node.member_of_names_list.0}}</a>
										{% endif %}
									{% endif %}
								{% endif %}
							{% endif %}
						{% endif %}

				{% comment %}
					<!-- Group Analytics -->
					<a href="/{{group_id}}/analytics/group/summary/" class="tiny button radius right-btn">{% trans 'Group Analytics' %}</a>
				{% endcomment %}
			</div>
			{% endif %}

			
			{% if is_gstaff %}
			<!-- New SubGroup and PE-->
			<div class="row btn-row">
						{% if is_partner_val %}
							<a class="button tiny radius left-btn" href="{% url 'create_group' group_object.pk %}?subgroup=True&partnergroup=True" title="Create New Sub Partner">{% trans "New Sub Partner" %} </a>
						{% else %}
							<a href="{% url 'create_group' group_id %}?subgroup=True" class="tiny button radius left-btn" title="Create New Sub Group">{% trans "New SubGroup" %}</a>
	  					{% endif %}
						<a href="{% url 'create_event_group' group_id 'ProgramEventGroup' %}" class="tiny button radius right-btn" title="Create New Program">{% trans "New Program" %}</a>
			</div>
			{% endif %}
		</div>
		{% endif %}

		<!-- PANEL 3
		Group subscription related actions such as
		List Members, Join/Unsubscribe,
		Subscribe Users, Subscribe Admins
 		-->
		{% if not is_user_group %}

		<div class="panel">
			{% if is_gstaff or 'ModeratingGroup' not in group_object.member_of_names_list and 'ProgramEventGroup' not in group_object.member_of_names_list and "PartnerGroup" not in group_object.member_of_names_list and is_partner_val %}
				<!-- List Members and Join buttons -->
				<div class="row btn-row">
					<!-- List Members -->
					{% if  is_gstaff %}	
						<input type="button" id ="btn_list_member" class="tiny button radius  left-btn" data-reveal-id="firstModal" value="{% trans 'List Members' %}" title="List Members of this group">
					{% endif %}
						<!-- Reveal Modals begin -->
						<div id="firstModal" class="reveal-modal" data-reveal></div>
					
					<!-- Join/ Unsubscribe -->
						{% if user.is_authenticated %}
							{% if not is_gstaff %}
								{% if user_is_joined == "joined" %}
									<input class="tiny button radius right-btn" title="Unsubscribe from this group" type="submit" id="notify" value="{% trans 'Unsubscribe' %}"
									{% if group_name_tag == "home" %}
										disabled="disabled" 
									{% endif %}
									>
									{% comment %}
										<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Stop following' %}">
									{% endcomment %}

								{% elif user_is_joined == "not" %}
									{% if allow_to_join %}
									<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Join' %}" title="Join this Group">
									{% else %}
									<input class="tiny button radius secondary disabled right-btn" type="button" id="notify" value="{% trans 'Closed' %}" title={% trans "You are not authorized for this action" %}>
									{% endif %}
									{% comment %}
										<input class="tiny button radius right-btn" type="submit" id="notify" value="{% trans 'Follow' %}">
									{% endcomment %}
{'fraction_non_alphanumeric': 0.1674292492797831, 'fraction_numerical': 0.00485793368355646, 'mean_word_length': 2.893874408885956, 'pattern_counts': {'":': 0, '<': 415, '<?xml version=': 0, '>': 417, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2766570', 'n_tokens_mistral': 14942, 'n_tokens_neox': 10986, 'n_words': 2933}