{% extends 'base/base.html' %}
{% block content %}
{{ breadcrumb(hrefs={_('My Collects'):url_for('collect.list')},active=collect.name)}}
<script type="text/javascript">
 DoCollect('{{ url_for("collect.collect",pk=collect.id) }}');
</script>
<div class="row">
  <div class="col-md-9">
    <div class="panel panel-default">
      <div class="panel-heading">
        <span class="pull-right">
          <a class="btn btn-default btn-sm" href="javascript:void(0)" data-toggle="modal" data-target="#editcollect">{{ _('edit') }}</a>
          <a class="btn btn-default btn-sm" href="javascript:void(0)" data-toggle="modal" data-target="#deletecollect">{{ _('delete')}}</a>
        </span>
        <h4> <strong>{{ collect.name }}</strong></h4>
      </div>
      {% for topic in topics.items %}
      <div class="panel-body" style="border-bottom:1px solid #eee">
        <a href="{{ url_for('topic.topic',topicId=topic.id)}}">{{ topic.title}}</a>
        <span id="delete-from-collect" class="pull-right btn btn-sm btn-danger" data-id="{{ topic.id }}">{{_('delete')}}</span>
      </div>
      {% else %}
      <div class="panel-body">
        <span class="text-center" style="display:block;width:100%;color:#999">
          {{_('No Collect')}}
        </span>
      </div>
      {% endfor %}
    </div>
  </div>
  <div class="col-md-3" style="padding-left:0">
    {{ panel_base.collect() }}
  </div>
</div>
{% include "collect/edit.html" %}
{% include "collect/delete.html" %}
{% endblock %}
