<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load thumbnail %}
{% load threadedcomments_tags %}
{% load background_color %}
{% load avatar_tags %}
{% block extrahead %}
    <meta property="og:title" content="{{serie.name}} | Liberateca" />
    <meta property="og:description" content="{{ serie.description }}" />
    <meta property="og:image" content="http://liberateca.net{{ serie.poster.src.url }}" />
{% endblock %}
{% block title %}{{ serie.name.title }} | Liberateca{% endblock %}
{% block contents %}

<!-- COLUMN LEFT -->
<div class="grid_6">
	<!-- TITLE -->
	<h1 id="title">{{serie.name|title}}</h1>
	<div class="hr dotted clearfix">&nbsp;</div>
	<!-- SEASONS -->
    <div class="grid_2 left" id="episode_list">
        <ul>
            <li>
                <a id="season_add" href="{% url add_season serie_slug=serie.slug_name %}">
                    <img title="Agregar temporada nueva" alt="Agregar temporada nueva" src="/static/images/list-add.png" class="left nobottom">
                    Agregar temporada
                </a>
                <div id="inside_season_add"></div>
            </li>
        {% for season in season_list %}
            <li>
                <a class="season"  id="serie_{{serie.id}}_season_{{season.season}}" href="#season_list">
                   {% if season.season == 0 %}Capitulos sueltos{% else %}{% trans "Temporada" %}  {{ season.season }}{% endif %}
                </a>
                <div id="inside_serie_{{serie.id}}_season_{{season.season}}"></div>
            </li>
        {% endfor %} </ul>
    </div>
    <div id="season_list" class="right grid_7"></div>
	<div class="hr dotted clearfix">&nbsp;</div>
	<!-- ACTORS -->
        <h2><a id="get_actors" href="#get_actors">{% trans "Actores" %}</a></h2>
        <div id="actors_list"></div>

	 <div class="hr clearfix">&nbsp;</div>
        <!-- RESEÑAS -->
        {% get_comment_list for serie as comment_list %}
        <h2>{{ comment_list|length }} {% trans "Reseñas" %}</h2>
        {% include "comments/list.html" %}

        <!-- AGREGAR RESEÑA -->
        <div class="hr clearfix">&nbsp;</div>
        <h2>{% trans "Añade tu reseña" %}</h2>
        {% with serie as object %}
            {% include "comments/form.html" %}
        {% endwith %}



</div>


<!-- COLUMN RIGHT -->
<div class="grid_4" id="box">
	<!-- IMAGE -->
    <div class="left">
        {% if serie.poster.src %}
            {% thumbnail serie.poster.src "400x300" as img_serie %}
                <img alt="{{ serie.name }}" title="{{ serie.name }}" id="poster" src="{{ img_serie.url }}" />
            {% endthumbnail %}
        {% else %}
            <div class="image_not_found center">  <img alt="{{ serie.name }}" title="{{ serie.name }}" src="/static/images/image_not_available.png" alt="{{ serie.name }}" width="200" /> </div>
        {% endif %}
    </div>
    <div class="right">
        {% if request.user.is_authenticated %}
        <ul class="horizontal_list">
            <!-- FAVORITE -->
            <li>
            {% if favorite == "no" %}
                <a href="#" onclick="favorite();" id="favorite"><img title="Agregar a favoritas" alt="Agregar a favoritas" class="heart_fav nobottom" src="/static/images/heart_black.png"></a>
            {% else %} 
            {% if favorite == "yes" %}
                <a href="#" onclick="favorite();" id="favorite"><img title="Quitar de favoritas" alt="Quitar de favoritas" class="heart_fav nobottom" src="/static/images/heart_red.png"></a>
                {% endif %}
                {% endif %}
            </li>
            <!-- EDIT -->
            <li id="edit-serie">
                <a href="{% url edit_serie serie_slug=serie.slug_name %}"><img title="Editar serie" class="nobottom" alt="Editar serie" src="/static/images/accessories-text-editor.png"></a>
            </li>
        </ul>
        {% endif %}
        <!-- GENERAL RATING -->
      {% with serie.rating.get_rating as rating %}
          <div class="right rating_num {{ rating|background_color }}"> {{ rating|floatformat }}
            <div class="mt_3">de 5</div>
            <div class="mt_3">({{ serie.rating.votes }} votos)</div>
          </div>
      {% endwith %}
		<div class="hr dotted clearfix">&nbsp;</div>
	<!-- RUNTIME -->
    <ul>
        <li>
            <span class="meta_box">{% trans "Duración" %}</span>
        </li>
        <li>
            {{ serie.runtime }} {% trans "minutos" %}
        </li>
	<!-- NETWORK -->
	{% if serie.network.name %}
        <li>
            <span class="meta_box">{% trans "Cadena" %}</span>
        </li>
        <li>
            <a href="/series/#/network/{{ serie.network.slug_name }}/">{{ serie.network.name }}</a>
        </li>
	{% endif %}
	<!-- GENRE -->
        <li>
            <span class="meta_box">{% trans "Género" %}</span>
            <ul>
                {% for genre in serie.genres.all %}
                <li><a href="/series/#/genre/{{ genre.slug_name }}/">{{ genre.name }}</a></li>
                {% endfor %}
            </ul>
        </li>
	<!-- BUTTONS -->
        <li>
            <a href="/series" class="button">&lt;&lt; {% trans "Series" %}</a>
        </li>
     </ul>
    </div>
	<div class="hr dotted clearfix">&nbsp;</div>
        <!-- USER RATING -->
        <div id="rating">
            <form action="." method="POST">
            <input type="radio" name="rating" value="1" class="ratingstar" {% if score == 1 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="2" class="ratingstar" {% if score == 2 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="3" class="ratingstar" {% if score == 3 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="4" class="ratingstar" {% if score == 4 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="5" class="ratingstar" {% if score == 5 %}checked="checked"{% endif %}/>
            </form>
        </div>
	<div class="hr dotted clearfix">&nbsp;</div>
    <p>{{ serie.description }}</p>
	<div class="hr dotted clearfix">&nbsp;</div>
	<div class="hr dotted clearfix">&nbsp;</div>
    <div class="grid_2 left">
        <!-- SHARE -->
        <h2>Compártela</h2>
            <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
                <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
                <a href="http://twitter.com/share" class="twitter-share-button"
                    data-url="{{ request.build_absolute_uri }}"
                    data-via="Liberateca"
                    data-text="Disfrutando {{ serie.name }}"
                    data-count="vertical">Tweet
                </a>
                <fb:like href="{{ request.build_absolute_uri }}" send="true" layout="box_count" width="450" show_faces="true" font=""></fb:like>
                <g:plusone size="tall"></g:plusone>
    </div>
    <div class="grid_6 right">
        <h2>Seguidores ({{ serie.favorite_of.count }})</h2>
        {% for user in serie.favorite_of.all %}
            <a class="followers" title="{{ user.user.username }}" href="{% url user_profile user_name=user.user.username %}">
                {% avatar user.user 30 %}
            </a>
        {% endfor %}
    </div>
</div>

	<div class="hr clearfix">&nbsp;</div>


{% endblock %}
{% block extrascript %}
    <script type="text/javascript">

    // respuesta de parents en threaded comments
    $('.comment_reply_link').click( function(){
       // cuando se hace click en reply...

       // copiamos el form de comentarios 
       var comment_form = $('.wrap_write_comment').html();

       // obtenemos el id del parent
       var parent_id = $(this).attr('href').split('comment_')[1];

        // para el threadedcomments, hace falta pasarle el parametro del parent, ej:
        // <input type="hidden" id="id_parent" value="10" name="parent">
        // sin parent se ve asi
        // <input name="parent" id="id_parent" type="hidden">
        var reply_form = comment_form.replace('name="parent"', 'name="parent" value="' + parent_id + '"')

       // y lo mostramos
       $(this).parent().parent().parent().append(reply_form);
    })


    </script><commit_msg>comments: quitando el hightlight al darle a resopnder<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load thumbnail %}
{% load threadedcomments_tags %}
{% load background_color %}
{% load avatar_tags %}
{% block extrahead %}
    <meta property="og:title" content="{{serie.name}} | Liberateca" />
    <meta property="og:description" content="{{ serie.description }}" />
    <meta property="og:image" content="http://liberateca.net{{ serie.poster.src.url }}" />
{% endblock %}
{% block title %}{{ serie.name.title }} | Liberateca{% endblock %}
{% block contents %}

<!-- COLUMN LEFT -->
<div class="grid_6">
	<!-- TITLE -->
	<h1 id="title">{{serie.name|title}}</h1>
	<div class="hr dotted clearfix">&nbsp;</div>
	<!-- SEASONS -->
    <div class="grid_2 left" id="episode_list">
        <ul>
            <li>
                <a id="season_add" href="{% url add_season serie_slug=serie.slug_name %}">
                    <img title="Agregar temporada nueva" alt="Agregar temporada nueva" src="/static/images/list-add.png" class="left nobottom">
                    Agregar temporada
                </a>
                <div id="inside_season_add"></div>
            </li>
        {% for season in season_list %}
            <li>
                <a class="season"  id="serie_{{serie.id}}_season_{{season.season}}" href="#season_list">
                   {% if season.season == 0 %}Capitulos sueltos{% else %}{% trans "Temporada" %}  {{ season.season }}{% endif %}
                </a>
                <div id="inside_serie_{{serie.id}}_season_{{season.season}}"></div>
            </li>
        {% endfor %} </ul>
    </div>
    <div id="season_list" class="right grid_7"></div>
	<div class="hr dotted clearfix">&nbsp;</div>
	<!-- ACTORS -->
        <h2><a id="get_actors" href="#get_actors">{% trans "Actores" %}</a></h2>
        <div id="actors_list"></div>

	 <div class="hr clearfix">&nbsp;</div>
        <!-- RESEÑAS -->
        {% get_comment_list for serie as comment_list %}
        <h2>{{ comment_list|length }} {% trans "Reseñas" %}</h2>
        {% include "comments/list.html" %}

        <!-- AGREGAR RESEÑA -->
        <div class="hr clearfix">&nbsp;</div>
        <h2>{% trans "Añade tu reseña" %}</h2>
        {% with serie as object %}
            {% include "comments/form.html" %}
        {% endwith %}
</div>


<!-- COLUMN RIGHT -->
<div class="grid_4" id="box">
	<!-- IMAGE -->
    <div class="left">
        {% if serie.poster.src %}
            {% thumbnail serie.poster.src "400x300" as img_serie %}
                <img alt="{{ serie.name }}" title="{{ serie.name }}" id="poster" src="{{ img_serie.url }}" />
            {% endthumbnail %}
        {% else %}
            <div class="image_not_found center">  <img alt="{{ serie.name }}" title="{{ serie.name }}" src="/static/images/image_not_available.png" alt="{{ serie.name }}" width="200" /> </div>
        {% endif %}
    </div>
    <div class="right">
        {% if request.user.is_authenticated %}
        <ul class="horizontal_list">
            <!-- FAVORITE -->
            <li>
            {% if favorite == "no" %}
                <a href="#" onclick="favorite();" id="favorite"><img title="Agregar a favoritas" alt="Agregar a favoritas" class="heart_fav nobottom" src="/static/images/heart_black.png"></a>
            {% else %} 
            {% if favorite == "yes" %}
                <a href="#" onclick="favorite();" id="favorite"><img title="Quitar de favoritas" alt="Quitar de favoritas" class="heart_fav nobottom" src="/static/images/heart_red.png"></a>
                {% endif %}
                {% endif %}
            </li>
            <!-- EDIT -->
            <li id="edit-serie">
                <a href="{% url edit_serie serie_slug=serie.slug_name %}"><img title="Editar serie" class="nobottom" alt="Editar serie" src="/static/images/accessories-text-editor.png"></a>
            </li>
        </ul>
        {% endif %}
        <!-- GENERAL RATING -->
      {% with serie.rating.get_rating as rating %}
          <div class="right rating_num {{ rating|background_color }}"> {{ rating|floatformat }}
            <div class="mt_3">de 5</div>
            <div class="mt_3">({{ serie.rating.votes }} votos)</div>
          </div>
      {% endwith %}
		<div class="hr dotted clearfix">&nbsp;</div>
	<!-- RUNTIME -->
    <ul>
        <li>
            <span class="meta_box">{% trans "Duración" %}</span>
        </li>
        <li>
            {{ serie.runtime }} {% trans "minutos" %}
        </li>
	<!-- NETWORK -->
	{% if serie.network.name %}
        <li>
            <span class="meta_box">{% trans "Cadena" %}</span>
        </li>
        <li>
            <a href="/series/#/network/{{ serie.network.slug_name }}/">{{ serie.network.name }}</a>
        </li>
	{% endif %}
	<!-- GENRE -->
        <li>
            <span class="meta_box">{% trans "Género" %}</span>
            <ul>
                {% for genre in serie.genres.all %}
                <li><a href="/series/#/genre/{{ genre.slug_name }}/">{{ genre.name }}</a></li>
                {% endfor %}
            </ul>
        </li>
	<!-- BUTTONS -->
        <li>
            <a href="/series" class="button">&lt;&lt; {% trans "Series" %}</a>
        </li>
     </ul>
    </div>
	<div class="hr dotted clearfix">&nbsp;</div>
        <!-- USER RATING -->
        <div id="rating">
            <form action="." method="POST">
            <input type="radio" name="rating" value="1" class="ratingstar" {% if score == 1 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="2" class="ratingstar" {% if score == 2 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="3" class="ratingstar" {% if score == 3 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="4" class="ratingstar" {% if score == 4 %}checked="checked"{% endif %}/>
            <input type="radio" name="rating" value="5" class="ratingstar" {% if score == 5 %}checked="checked"{% endif %}/>
            </form>
        </div>
	<div class="hr dotted clearfix">&nbsp;</div>
    <p>{{ serie.description }}</p>
	<div class="hr dotted clearfix">&nbsp;</div>
	<div class="hr dotted clearfix">&nbsp;</div>
    <div class="grid_2 left">
        <!-- SHARE -->
        <h2>Compártela</h2>
            <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
                <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
                <a href="http://twitter.com/share" class="twitter-share-button"
                    data-url="{{ request.build_absolute_uri }}"
                    data-via="Liberateca"
                    data-text="Disfrutando {{ serie.name }}"
                    data-count="vertical">Tweet
                </a>
                <fb:like href="{{ request.build_absolute_uri }}" send="true" layout="box_count" width="450" show_faces="true" font=""></fb:like>
                <g:plusone size="tall"></g:plusone>
    </div>
    <div class="grid_6 right">
        <h2>Seguidores ({{ serie.favorite_of.count }})</h2>
        {% for user in serie.favorite_of.all %}
            <a class="followers" title="{{ user.user.username }}" href="{% url user_profile user_name=user.user.username %}">
                {% avatar user.user 30 %}
            </a>
        {% endfor %}
    </div>
</div>

	<div class="hr clearfix">&nbsp;</div>


{% endblock %}
{% block extrascript %}
    <script type="text/javascript">

    // respuesta de parents en threaded comments
    $('.comment_reply_link').click( function(){
       // cuando se hace click en reply...

       // copiamos el form de comentarios 
       var comment_form = $('.wrap_write_comment').html();

       // obtenemos el id del parent
       var parent_id = $(this).attr('href').split('comment_')[1];

        // para el threadedcomments, hace falta pasarle el parametro del parent, ej:
        // <input type="hidden" id="id_parent" value="10" name="parent">
        // sin parent se ve asi
        // <input name="parent" id="id_parent" type="hidden">
       // tambien quitamos el posible hightlight de cuando el form esta vacio
       var reply_form = comment_form
            .replace('name="parent"', 'name="parent" value="' + parent_id + '"')
            .replace('class="hightlight"', '');
        console.log(reply_form);

       // y lo mostramos
       $(this).parent().parent().parent().append(reply_form);
    })


    </script>
{'fraction_non_alphanumeric': 0.1973202691535828, 'fraction_numerical': 0.006138590485184748, 'mean_word_length': 2.2464073577313663, 'pattern_counts': {'":': 0, '<': 345, '<?xml version=': 0, '>': 345, 'https://': 2, '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': '397672', 'n_tokens_mistral': 5599, 'n_tokens_neox': 5221, 'n_words': 1126}