<commit_before>{% extends 'frames/base.html' %} 
{% load i18n markdown decodes %}

{% block title %} cindy - profile - mysoup {% endblock %} 

{% block child_navi %}
{% include 'frames/profile_child_navi.html' %}
{% endblock %}

{% block script %}
$(".remove_star_button").on("click", function () {
  var csrftoken = $("[name=csrfmiddlewaretoken]").val();
  if (confirm("{% trans 'You cannot revert change if you delete the star!' %}\n{% trans 'Continue?' %}")) {
    jQuery.post(
      "{% url 'sui_hei:mondai_star_remove' %}",
      {
        csrfmiddlewaretoken: csrftoken,
        star_id: this.value,
      },
      function(data) {
        if (data) {
          location.reload();
        }
      }
    );
  }
});
{% endblock %}

{% block content %}
<h2>{% trans 'MyStar' %}</h2>

{% include 'frames/pagination.html' with id_prefix='star' ln_prefix='page?' %}

{% for star in star_list %}
<ul>
<li>
    <span class="status_label unsolved"><font color="#cb4b16">{{ star.value|normalize_star }}</font></span>

    {% if star.user_id == user %}
    <button class="remove_star_button" style="padding:inherit;background:inherit;color:red;" value={{ star.id }}>⛔</button>
    {% endif %}

    {% with starred_mondai=star.mondai_id %}
    <span class="title_label">
        <a href="{% url 'sui_hei:mondai_show' starred_mondai.id %}">
            [{{ starred_mondai.genre|genre }}{% if starred_mondai.yami %} × {% trans 'yami' %}{% endif %}]
            {{ starred_mondai.title }}
        </a><commit_msg>Fix remove star not working issue<commit_after>{% extends 'frames/base.html' %} 
{% load i18n markdown decodes %}

{% block title %} cindy - profile - mysoup {% endblock %} 

{% block child_navi %}
{% include 'frames/profile_child_navi.html' %}
{% endblock %}

{% block script %}
$(document).ready(function() {
  $(".remove_star_button").on("click", function () {
    var csrftoken = $("[name=csrfmiddlewaretoken]").val();
    if (confirm("{% trans 'You cannot revert change if you delete the star!' %}\n{% trans 'Continue?' %}")) {
      jQuery.post(
        "{% url 'sui_hei:mondai_star_remove' %}",
        {
          csrfmiddlewaretoken: csrftoken,
          star_id: this.value,
        },
        function(data) {
          if (data) {
            location.reload();
          }
        }
      );
    }
  });
});
{% endblock %}

{% block content %}
<h2>{% trans 'MyStar' %}</h2>

{% include 'frames/pagination.html' with id_prefix='star' ln_prefix='page?' %}

{% for star in star_list %}
<ul>
<li>
    <span class="status_label unsolved"><font color="#cb4b16">{{ star.value|normalize_star }}</font></span>

    {% if star.user_id == user %}
    <button class="remove_star_button" style="padding:inherit;background:inherit;color:red;" value={{ star.id }}>⛔</button>
    {% endif %}

    {% with starred_mondai=star.mondai_id %}
    <span class="title_label">
        <a href="{% url 'sui_hei:mondai_show' starred_mondai.id %}">
            [{{ starred_mondai.genre|genre }}{% if starred_mondai.yami %} × {% trans 'yami' %}{% endif %}]
            {{ starred_mondai.title }}
        </a>
{'fraction_non_alphanumeric': 0.1895382628350016, 'fraction_numerical': 0.004520503713270907, 'mean_word_length': 3.1978319783197833, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '3511915', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1041, 'n_words': 213}