<commit_before>{% extends "site_base.html" %}
{% load i18n %}
{% load links %}
{% load laws_extra %}
{% load common_visual_elements %}
{% load activity_tags %}
{% load pagination_tags %}
{% load cache %}
{% block extratitle %}{{ object.name }}{% endblock %}
{% block keywords %}{{ object.name }}{% endblock %}
{% block extrahead %}
    <style>
        .action-actor { display: none; }
    </style>
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url member-activity-feed object.id %}">
    <script>
    function set_percentile(id,value) {
        $("#"+id+"_percentile").css('background-position',(value-8)+"px 4px");
        $("#"+id+"_percentile").css('background-color',"rgb("+(155+(100-value))+","+(155+value)+",155)");
    }
    </script>
{% endblock %}
{% block description %}{{ object.name }} - {% endblock %}
{% block nav-members %}class="selected"{% endblock %}
{% block messages %}
<span id="message_login">
    {% trans "You have to be logged in to enable the watch feature." %}<br>
    <a href="{% url login %}?next={{ request.get_full_path }}">{% trans "login" %}</a>
    {% trans "or" %}
    <a href="{% url register %}?next={{ request.get_full_path }}">{% trans "register" %}</a>
</span>
{% endblock %}

{% block divcontent %}
{% cache 600 mks object.id request.page %}
    <ul class="actions">
        <li>
        <a href="#" onclick="$('#embed_code_box').toggle();return false;">{% trans "Embed in external site" %}</a></li>
        <li><span id="watch" class="awesome-button medium"></span></li>
        <li><a href="{% url member-activity-feed object.id %}"><img src="{{MEDIA_URL}}icons/rss.png" style="height:2em;"></a></li>
    </ul>
        <div id="embed_code_box" style="display:none;float:left;">
            <form><textarea id="embed_code_value" cols="120" rows="5" style="direction:ltr;text-align:left;">
    <span class="mk">{{ object.name}}</span>
    <div id="mk_info"></div>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://oknesset.org/static/js/oknesset_widget.js"></script>
    <script type="text/javascript">
        generateMkFrameSet({classHook: 'mk', targetId: 'mk_data'});
    </script>
            </textarea></form>
            <p>{% trans "Add the code above to your site, to get a dynamically generated info" %}</p>
        </div>
    <h1> {{ object.name }} - <a class="bold-link" id="detail-{{ object.current_party.id }}" href="{% url party-detail object.current_party.id %}">{{ object.current_party.name }}</a></h1>
    <div class="clear"></div>
    <h2> {{ object.get_role }} </h2>
    <div class="details">
    
		<table style="width:100%;border:none;border-spacing:30px 0;">
			<tbody>
				<tr style="vertical-align:top;">
					<td width="60%">
				        <div>
				            <table>
				            	<tr>
									<td width="100px">
								    	<div style="display:block-inline;">
									        <div class="member-photo"><img src="{{ object.img_url }}"/></div>
										</div> 
									</td>
									
									<td>
							            <h3> {% trans "Personal Information" %}</h3>
							            <table id="member-info">
							                <tr>
							                    <td style="width:200px;">{% trans "age" %}</td>
							                    <td>{{ object.date_of_birth|timesince }}</td>
							                </tr>
							                {% if object.year_of_aliyah %}
								                <tr>
								                    <td>{% trans "year of aliyah" %}</td>
								                    <td>{{ object.year_of_aliyah }}</td>
								                </tr>
							                {% endif %}
							                <tr>
							                    <td>{% trans "family status" %}</td>
							                    <td>{{ object.family_status }}</td>
							                </tr>
							                <tr>
							                    <td>{% trans "place of birth" %}</td>
							                    <td>{{ object.place_of_birth }}</td>
							                </tr>
							                <tr>
							                    <td>{% trans "place of residence" %}</td>
							                    <td>{{ object.place_of_residence }}</td>
							                </tr>
							                <tr> 
							                    <td>{% trans "residence centrality" %}</td>
							                    <td>{{ object.residence_centrality }}</td>
							                </tr>
							                <tr> 
							                    <td>{% trans "residence economy" %}</td>
							                    <td>{{ object.residence_economy }}</td>
							                </tr>
							
							            </table>
									</td>
				            	</tr>
				            </table>
				        </div>
						<br/>
				        
				        <div>
				            <h3> {% trans "Contact Information" %}</h3>
				            <table>
				                <tr>
				                    <td>{% trans "phone" %}</td>
				                    <td>{{ object.phone }}</td>
				                </tr>
				                {% if object.fax %}
				                    <tr>
				                        <td>{% trans "fax" %}</td>
				                        <td>{{ object.fax }}</td>
				                    </tr>
				                {% endif %}
				                <tr>
				                    <td>{% trans "e-mail address" %}</td>
				                    <td><a class="bold-link" href="mailto:{{object.email}}">{{ object.email }}</a></td>
				                </tr>
				            </table>
				        </div> <br/>

				        <div>
				            <h3>{% trans "Votes" %}</h3>
				            <table>
				                <tr>
				                    <td style="width:140px;">{% trans "Number of votes" %}</td>
				                    <td style="width:102px;">{{ object.voting_statistics.votes_count }}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_votes_count }})</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Factional discipline" %}</td>
				                    <td>{% if object.voting_statistics.discipline %}{{ object.voting_statistics.discipline }}%{% else %}{% trans 'Not enough data' %}{% endif %}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_discipline }})</td>
				                </tr>
				                <tr>
				                    <td>{% if object.current_party.is_coalition %}{% trans "Coalition discipline" %}{% else %}{% trans 'Opposition discipline' %}{% endif %}</td>
				                    <td>{% if object.voting_statistics.coalition_discipline %}{{ object.voting_statistics.coalition_discipline }}%{% else %}{% trans 'Not enough data' %}{% endif %}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_coalition_discipline }})</td>
				                </tr>
				            </table>
				            <br/>
				            <h3>{% trans "Attendance" %}</h3>
				            <table>   
				                <tr>
				                    <td style="width:140px;">{% trans "Knesset presence" %}</td>
				                    <td>{% if presence.average_weekly_presence_hours %}
						                    <div id="weekly_percentile" class="percentile">
												{% trans 'Percentile' %} {{ presence.average_weekly_presence_hours_percentile }}
												<script>set_percentile('weekly',{{ presence.average_weekly_presence_hours_percentile }});</script>
						                    </div>
				                    	{% else %}
				                    		{% trans 'Not enough data' %}
				                    	{% endif %}
				                    </td>
				                    <td>
										({{ presence.average_weekly_presence_hours }} {% trans 'Average weekly hours' %})
				                    </td>
				                </tr>
				                <tr>
				                    <td>{% trans "Committee presence" %}</td>
				                    <td>
					                    <div id="monthly_percentile" class="percentile">
											{% trans 'Percentile' %} {{ presence.average_monthly_committee_presence_percentile }}
											<script>set_percentile('monthly',{{ presence.average_monthly_committee_presence_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>({{ object.committee_meetings_per_month }} {% trans "Average number of committee meetings per month" %})</td>
				                </tr>
							</table>
							<br/>
				            <h3>{% trans "Bills" %}</h3>
				            <table>
				            	<tr>
				                    <td style="width:140px;">{% trans "Number of bills proposed" %}</td>
				                    <td>
					                    <div id="proposed_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.proposed_percentile }}
											<script>set_percentile('proposed',{{ bills_statistics.proposed_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=proposed">{{ bills_statistics.proposed }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills passed pre-vote" %}</td>
				                    <td>
					                    <div id="pre_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.pre_percentile }}
											<script>set_percentile('pre',{{ bills_statistics.pre_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=pre">{{ bills_statistics.pre }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills passed first vote" %}</td>
				                    <td>
					                    <div id="first_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.first_percentile }}
											<script>set_percentile('first',{{ bills_statistics.first_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=first">{{ bills_statistics.first }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills approved" %}</td>
				                    <td>
					                    <div id="approved_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.approved_percentile }}
											<script>set_percentile('approved',{{ bills_statistics.approved_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=approved">{{ bills_statistics.approved }} {% trans 'Bills' %}</a>)</td>
				                </tr>       
				
				            </table>
				        </div>
						<br/>
			
				        
					</td>

					<td style="width:35%;vertical-align:top;">

				        <div>
				            <h3>{% trans "Links" %}</h3>
				                {% object_links object %}
				        </div> <br/>

				        <div>
				            <h3>{% trans "Proposed bills topics" %}</h3>
			                <div class="tags cloud" style="max-width:25em">{% for tag in bills_tags %}<a href="{% url bill-tag tag=tag %}?member={{object.id}}" class="level{{ tag.font_size }}">{{ tag }}</a> {% endfor %}</div>
				        </div>  <br/>									

						<div>
							<h3>{% trans "Agendas" %}</h3>
							<div class="list-wrap">
								<table>
								{% for agenda in agendas %}
									<tr>
										<td>{% if agenda.watched %}<div class="watched"></div>{% endif %}</td>
										<td><a class="hashnav item dontwrap" id="detail-{{ agenda.id }}" href="{% url agenda-detail agenda.id %}">{{ agenda }}</a></td>
										<td>%{{agenda.score|floatformat:"0"}}</td>
										<td class="column-bar">{% if agenda.score < 0 %}{% bar agenda.score 'against' 1 %}{% else %}{% bar agenda.score 'for' 1 %}{% endif %}</td>
									</tr>
								{% endfor %}
								</table>
							</div>
						</div>					
					
					</td>
				</tr>
			</tbody>
		</table>
    	   	
    	<br/>
    	
		<div class="activities">  
		    <form class="select" method="get" action=".">
		        <input class="awesome-button medium" type="submit" style="float:left;" value="{% trans "Refresh" %}">
		        {{verbs_form}}
		    </form>
	        <div style="clear:both;"></div>
		    {% autopaginate actions %}
			    {% for action in actions %}
			        {% with action.timestamp|timesince as since %}
				        {% ifchanged %}<h3>{% trans "before" %}&nbsp;{{ since }}</h3>{% endifchanged %}
			        {% endwith %}
			        <p>
			            {% display_action action %}
			        </p>
			    {% empty %}
			        <p>
			        {% trans "Sorry, no data is available, try selecting more actions and refresh" %}
			        </p>
			    {% endfor %}
		    {% paginate %}
	    </div>
    	
        
    </div>

	<br/>
	
    <div style="clear:both;"></div>
    {% endcache %}
    <script>
        $(document).ready(function() {
            var member_id = {{object.id}};
            {% if watched_member %}
                document.is_watched = true;
                $('#watch').html("{% trans 'Unwatch' %}");
            {%else%}
                document.is_watched = false;
                $('#watch').html("{% trans 'Watch' %}");
            {% endif %};
            $('#watch').click( function () {
                if (document.is_watched) {
                    jQuery.ajax({
                        type: 'POST',
                        url: '{% url follow-members %}',
                        data: {unwatch: member_id},
                        context: $('#watch'),
                        success: function () {
                            document.is_watched = false;
                            this.html("{% trans 'Watch' %}");
                        },
                        error:  function(request, textStatus, error) {
                            var msg = $("#message_unknown").html()
                            $.jGrowl(msg, {life: 5000});
                            $('#message_login').show();
                        }
                    });
                }
                else {
                    jQuery.ajax({
                        type: 'POST',
                        url: '{% url follow-members %}',
                        data: {watch: member_id},
                        context: $('#watch'),
                        success: function () {
                            document.is_watched = true;
                            this.html("{% trans 'Unwatch' %}");
                        },
                        error:  function(request, textStatus, error) {
                            var msg = $("#message_login").html()
                            $.jGrowl(msg, {sticky: true});
                        }
                    });
                }
                return (false);
            })
        })
    </script>



{% endblock %}

<commit_msg>removing the embed code from mks page - we're not ready for this<commit_after>{% extends "site_base.html" %}
{% load i18n %}
{% load links %}
{% load laws_extra %}
{% load common_visual_elements %}
{% load activity_tags %}
{% load pagination_tags %}
{% load cache %}
{% block extratitle %}{{ object.name }}{% endblock %}
{% block keywords %}{{ object.name }}{% endblock %}
{% block extrahead %}
    <style>
        .action-actor { display: none; }
    </style>
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url member-activity-feed object.id %}">
    <script>
    function set_percentile(id,value) {
        $("#"+id+"_percentile").css('background-position',(value-8)+"px 4px");
        $("#"+id+"_percentile").css('background-color',"rgb("+(155+(100-value))+","+(155+value)+",155)");
    }
    </script>
{% endblock %}
{% block description %}{{ object.name }} - {% endblock %}
{% block nav-members %}class="selected"{% endblock %}
{% block messages %}
<span id="message_login">
    {% trans "You have to be logged in to enable the watch feature." %}<br>
    <a href="{% url login %}?next={{ request.get_full_path }}">{% trans "login" %}</a>
    {% trans "or" %}
    <a href="{% url register %}?next={{ request.get_full_path }}">{% trans "register" %}</a>
</span>
{% endblock %}

{% block divcontent %}
{% cache 600 mks object.id request.page %}
    <ul class="actions">
        <li>
        <li><span id="watch" class="awesome-button medium"></span></li>
        <li><a href="{% url member-activity-feed object.id %}"><img src="{{MEDIA_URL}}icons/rss.png" style="height:2em;"></a></li>
    </ul>
    <h1> {{ object.name }} - <a class="bold-link" id="detail-{{ object.current_party.id }}" href="{% url party-detail object.current_party.id %}">{{ object.current_party.name }}</a></h1>
    <div class="clear"></div>
    <h2> {{ object.get_role }} </h2>
    <div class="details">
    
		<table style="width:100%;border:none;border-spacing:30px 0;">
			<tbody>
				<tr style="vertical-align:top;">
					<td width="60%">
				        <div>
				            <table>
				            	<tr>
									<td width="100px">
								    	<div style="display:block-inline;">
									        <div class="member-photo"><img src="{{ object.img_url }}"/></div>
										</div> 
									</td>
									
									<td>
							            <h3> {% trans "Personal Information" %}</h3>
							            <table id="member-info">
							                <tr>
							                    <td style="width:200px;">{% trans "age" %}</td>
							                    <td>{{ object.date_of_birth|timesince }}</td>
							                </tr>
							                {% if object.year_of_aliyah %}
								                <tr>
								                    <td>{% trans "year of aliyah" %}</td>
								                    <td>{{ object.year_of_aliyah }}</td>
								                </tr>
							                {% endif %}
							                <tr>
							                    <td>{% trans "family status" %}</td>
							                    <td>{{ object.family_status }}</td>
							                </tr>
							                <tr>
							                    <td>{% trans "place of birth" %}</td>
							                    <td>{{ object.place_of_birth }}</td>
							                </tr>
							                <tr>
							                    <td>{% trans "place of residence" %}</td>
							                    <td>{{ object.place_of_residence }}</td>
							                </tr>
							                <tr> 
							                    <td>{% trans "residence centrality" %}</td>
							                    <td>{{ object.residence_centrality }}</td>
							                </tr>
							                <tr> 
							                    <td>{% trans "residence economy" %}</td>
							                    <td>{{ object.residence_economy }}</td>
							                </tr>
							
							            </table>
									</td>
				            	</tr>
				            </table>
				        </div>
						<br/>
				        
				        <div>
				            <h3> {% trans "Contact Information" %}</h3>
				            <table>
				                <tr>
				                    <td>{% trans "phone" %}</td>
				                    <td>{{ object.phone }}</td>
				                </tr>
				                {% if object.fax %}
				                    <tr>
				                        <td>{% trans "fax" %}</td>
				                        <td>{{ object.fax }}</td>
				                    </tr>
				                {% endif %}
				                <tr>
				                    <td>{% trans "e-mail address" %}</td>
				                    <td><a class="bold-link" href="mailto:{{object.email}}">{{ object.email }}</a></td>
				                </tr>
				            </table>
				        </div> <br/>

				        <div>
				            <h3>{% trans "Votes" %}</h3>
				            <table>
				                <tr>
				                    <td style="width:140px;">{% trans "Number of votes" %}</td>
				                    <td style="width:102px;">{{ object.voting_statistics.votes_count }}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_votes_count }})</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Factional discipline" %}</td>
				                    <td>{% if object.voting_statistics.discipline %}{{ object.voting_statistics.discipline }}%{% else %}{% trans 'Not enough data' %}{% endif %}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_discipline }})</td>
				                </tr>
				                <tr>
				                    <td>{% if object.current_party.is_coalition %}{% trans "Coalition discipline" %}{% else %}{% trans 'Opposition discipline' %}{% endif %}</td>
				                    <td>{% if object.voting_statistics.coalition_discipline %}{{ object.voting_statistics.coalition_discipline }}%{% else %}{% trans 'Not enough data' %}{% endif %}</td>
				                    <td>({% trans 'Last 30 days' %}: {{ object|recent_coalition_discipline }})</td>
				                </tr>
				            </table>
				            <br/>
				            <h3>{% trans "Attendance" %}</h3>
				            <table>   
				                <tr>
				                    <td style="width:140px;">{% trans "Knesset presence" %}</td>
				                    <td>{% if presence.average_weekly_presence_hours %}
						                    <div id="weekly_percentile" class="percentile">
												{% trans 'Percentile' %} {{ presence.average_weekly_presence_hours_percentile }}
												<script>set_percentile('weekly',{{ presence.average_weekly_presence_hours_percentile }});</script>
						                    </div>
				                    	{% else %}
				                    		{% trans 'Not enough data' %}
				                    	{% endif %}
				                    </td>
				                    <td>
										({{ presence.average_weekly_presence_hours }} {% trans 'Average weekly hours' %})
				                    </td>
				                </tr>
				                <tr>
				                    <td>{% trans "Committee presence" %}</td>
				                    <td>
					                    <div id="monthly_percentile" class="percentile">
											{% trans 'Percentile' %} {{ presence.average_monthly_committee_presence_percentile }}
											<script>set_percentile('monthly',{{ presence.average_monthly_committee_presence_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>({{ object.committee_meetings_per_month }} {% trans "Average number of committee meetings per month" %})</td>
				                </tr>
							</table>
							<br/>
				            <h3>{% trans "Bills" %}</h3>
				            <table>
				            	<tr>
				                    <td style="width:140px;">{% trans "Number of bills proposed" %}</td>
				                    <td>
					                    <div id="proposed_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.proposed_percentile }}
											<script>set_percentile('proposed',{{ bills_statistics.proposed_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=proposed">{{ bills_statistics.proposed }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills passed pre-vote" %}</td>
				                    <td>
					                    <div id="pre_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.pre_percentile }}
											<script>set_percentile('pre',{{ bills_statistics.pre_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=pre">{{ bills_statistics.pre }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills passed first vote" %}</td>
				                    <td>
					                    <div id="first_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.first_percentile }}
											<script>set_percentile('first',{{ bills_statistics.first_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=first">{{ bills_statistics.first }} {% trans 'Bills' %}</a>)</td>
				                </tr>
				                <tr>
				                    <td>{% trans "Bills approved" %}</td>
				                    <td>
					                    <div id="approved_percentile" class="percentile">
											{% trans 'Percentile' %} {{ bills_statistics.approved_percentile }}
											<script>set_percentile('approved',{{ bills_statistics.approved_percentile }});</script>
					                    </div>
				                    </td>
				                    <td>(<a href="{% url bill-list %}?member={{object.id}}&stage=approved">{{ bills_statistics.approved }} {% trans 'Bills' %}</a>)</td>
				                </tr>       
				
				            </table>
				        </div>
						<br/>
			
				        
					</td>

					<td style="width:35%;vertical-align:top;">

				        <div>
				            <h3>{% trans "Links" %}</h3>
				                {% object_links object %}
				        </div> <br/>

				        <div>
				            <h3>{% trans "Proposed bills topics" %}</h3>
			                <div class="tags cloud" style="max-width:25em">{% for tag in bills_tags %}<a href="{% url bill-tag tag=tag %}?member={{object.id}}" class="level{{ tag.font_size }}">{{ tag }}</a> {% endfor %}</div>
				        </div>  <br/>									

						<div>
							<h3>{% trans "Agendas" %}</h3>
							<div class="list-wrap">
								<table>
								{% for agenda in agendas %}
									<tr>
										<td>{% if agenda.watched %}<div class="watched"></div>{% endif %}</td>
										<td><a class="hashnav item dontwrap" id="detail-{{ agenda.id }}" href="{% url agenda-detail agenda.id %}">{{ agenda }}</a></td>
										<td>%{{agenda.score|floatformat:"0"}}</td>
										<td class="column-bar">{% if agenda.score < 0 %}{% bar agenda.score 'against' 1 %}{% else %}{% bar agenda.score 'for' 1 %}{% endif %}</td>
									</tr>
								{% endfor %}
								</table>
							</div>
						</div>					
					
					</td>
				</tr>
			</tbody>
		</table>
    	   	
    	<br/>
    	
		<div class="activities">  
		    <form class="select" method="get" action=".">
		        <input class="awesome-button medium" type="submit" style="float:left;" value="{% trans "Refresh" %}">
		        {{verbs_form}}
		    </form>
	        <div style="clear:both;"></div>
		    {% autopaginate actions %}
			    {% for action in actions %}
			        {% with action.timestamp|timesince as since %}
				        {% ifchanged %}<h3>{% trans "before" %}&nbsp;{{ since }}</h3>{% endifchanged %}
			        {% endwith %}
			        <p>
			            {% display_action action %}
			        </p>
			    {% empty %}
			        <p>
			        {% trans "Sorry, no data is available, try selecting more actions and refresh" %}
			        </p>
			    {% endfor %}
		    {% paginate %}
	    </div>
    	
        
    </div>

	<br/>
	
    <div style="clear:both;"></div>
    {% endcache %}
    <script>
        $(document).ready(function() {
            var member_id = {{object.id}};
            {% if watched_member %}
                document.is_watched = true;
                $('#watch').html("{% trans 'Unwatch' %}");
            {%else%}
                document.is_watched = false;
                $('#watch').html("{% trans 'Watch' %}");
            {% endif %};
            $('#watch').click( function () {
                if (document.is_watched) {
                    jQuery.ajax({
                        type: 'POST',
                        url: '{% url follow-members %}',
                        data: {unwatch: member_id},
                        context: $('#watch'),
                        success: function () {
                            document.is_watched = false;
                            this.html("{% trans 'Watch' %}");
                        },
                        error:  function(request, textStatus, error) {
                            var msg = $("#message_unknown").html()
                            $.jGrowl(msg, {life: 5000});
                            $('#message_login').show();
                        }
                    });
                }
                else {
                    jQuery.ajax({
                        type: 'POST',
                        url: '{% url follow-members %}',
                        data: {watch: member_id},
                        context: $('#watch'),
                        success: function () {
                            document.is_watched = true;
                            this.html("{% trans 'Unwatch' %}");
                        },
                        error:  function(request, textStatus, error) {
                            var msg = $("#message_login").html()
                            $.jGrowl(msg, {sticky: true});
                        }
                    });
                }
                return (false);
            })
        })
    </script>



{% endblock %}


{'fraction_non_alphanumeric': 0.1691846966587032, 'fraction_numerical': 0.0060230828762744375, 'mean_word_length': 1.3278765567478656, 'pattern_counts': {'":': 0, '<': 644, '<?xml version=': 0, '>': 642, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5553874', 'n_tokens_mistral': 11101, 'n_tokens_neox': 8003, 'n_words': 1713}