wished by n thing is now clickable and goes to supporter tab. also you can now specify the active tab on a work page with a get parameter.
parent
8e4171d3ee
commit
03b58d14ca
|
@ -122,7 +122,7 @@
|
|||
</div>
|
||||
<div class="listview panelfront side1 icons">
|
||||
{% if status == 'No campaign yet' or status == 'INITIALIZED' %}
|
||||
<span class="rounded"><span class="grey"><span class="panelnope">Wished by </span>{{ work.wished_by.count }}</span></span>
|
||||
<a href="{% url work work.id %}?tab=3" class="nobold"><span class="rounded"><span class="grey"><span class="panelnope">Wished by </span>{{ work.wished_by.count }}</span></span></a>
|
||||
{% else %}{% if work.first_pdf_url or work.first_epub_url %}
|
||||
<span class="listview boolist-ebook">
|
||||
{% if work.first_epub_url %}
|
||||
|
|
|
@ -76,7 +76,7 @@ jQuery(document).ready(function(){
|
|||
<div>
|
||||
<div class="pubinfo">
|
||||
<h3 class="book-author">{{ work.author }}</h3>
|
||||
<h3 class="book-year">{{ pubdate }}</h3>
|
||||
<h3 class="book-year">{{ pubdate }}</h3> {{activetab}}
|
||||
</div>
|
||||
{% if status == 'ACTIVE' %}
|
||||
{% if pledged %}
|
||||
|
@ -160,16 +160,16 @@ jQuery(document).ready(function(){
|
|||
{% get_comment_count for work as comment_count %}
|
||||
<div class="content-block-heading" id="tabs">
|
||||
<ul class="tabs">
|
||||
<li class="tabs1 active"><a href="#">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
|
||||
<li class="tabs2"><a href="#">Comments ({{comment_count}})</a></li>
|
||||
<li class="tabs3"><a href="#">Supporters</a></li>
|
||||
<li class="tabs4"><a href="#">Details</a></li>
|
||||
<li class="tabs1 {% if activetab == '1' %}active{% endif %}"><a href="#">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
|
||||
<li class="tabs2 {% if activetab == '2' %}active{% endif %}"><a href="#">Comments ({{comment_count}})</a></li>
|
||||
<li class="tabs3 {% if activetab == '3' %}active{% endif %}"><a href="#">Supporters</a></li>
|
||||
<li class="tabs4 {% if activetab == '4' %}active{% endif %}"><a href="#">Details</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="content-block-content">
|
||||
<div id="tabs-1" class="tabs">
|
||||
<div id="tabs-1" class="tabs {% if activetab == '1' %}active{% endif %}">
|
||||
<div class="tabs-content">
|
||||
<p><br>
|
||||
{% if status == 'ACTIVE' %}
|
||||
|
@ -189,13 +189,13 @@ jQuery(document).ready(function(){
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabs-2" class="tabs">
|
||||
<div id="tabs-2" class="tabs {% if activetab == '2' %}active{% endif %}">
|
||||
<div class="tabs-content">
|
||||
{% render_comment_list for work %}
|
||||
{% if user.is_authenticated %}{% render_comment_form for work %}{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabs-3" class="tabs">
|
||||
<div id="tabs-3" class="tabs {% if activetab == '3' %}active{% endif %}">
|
||||
<div class="tabs-content">
|
||||
{% for supporter in work.wished_by %}
|
||||
<div class="work_supporter_nocomment">
|
||||
|
@ -213,7 +213,7 @@ jQuery(document).ready(function(){
|
|||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabs-4" class="tabs">
|
||||
<div id="tabs-4" class="tabs {% if activetab == '4' %}active{% endif %}">
|
||||
<div class="tabs-content">
|
||||
{% if status == 'ACTIVE' %}
|
||||
<h4>Last campaign details</h4>
|
||||
|
|
|
@ -113,6 +113,11 @@ def work(request, work_id, action='display'):
|
|||
wishers = work.wished_by().count()
|
||||
base_url = request.build_absolute_uri("/")[:-1]
|
||||
|
||||
try:
|
||||
activetab = request.GET['tab']
|
||||
except:
|
||||
activetab = '1';
|
||||
|
||||
#may want to deprecate the following
|
||||
if action == 'setup_campaign':
|
||||
return render(request, 'setup_campaign.html', {'work': work})
|
||||
|
@ -127,6 +132,7 @@ def work(request, work_id, action='display'):
|
|||
'editions': editions,
|
||||
'pubdate': pubdate,
|
||||
'pledged':pledged,
|
||||
'activetab': activetab,
|
||||
})
|
||||
|
||||
def manage_campaign(request, id):
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -292,3 +292,6 @@ div.content-block-content {
|
|||
-khtml-opacity: 0.2;
|
||||
opacity: 0.2;
|
||||
}
|
||||
.nobold {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
|
|
@ -204,9 +204,18 @@
|
|||
#tabs ul.book-list-view {
|
||||
margin-bottom: 4px !important;
|
||||
}
|
||||
#tabs-2, #tabs-3, #tabs-4 {
|
||||
#tabs-1,
|
||||
#tabs-2,
|
||||
#tabs-3,
|
||||
#tabs-4 {
|
||||
display: none;
|
||||
}
|
||||
#tabs-1.active,
|
||||
#tabs-2.active,
|
||||
#tabs-3.active,
|
||||
#tabs-4.active {
|
||||
display: inherit;
|
||||
}
|
||||
ul.tabs {
|
||||
float: left;
|
||||
padding: 0;
|
||||
|
|
|
@ -274,3 +274,7 @@ div.content-block-content {
|
|||
#toggle-panel {
|
||||
.opacity(20);
|
||||
}
|
||||
|
||||
.nobold {
|
||||
font-weight: normal;
|
||||
}
|
|
@ -207,10 +207,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
#tabs-2, #tabs-3, #tabs-4 {
|
||||
#tabs-1, #tabs-2, #tabs-3, #tabs-4 {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#tabs-1.active, #tabs-2.active, #tabs-3.active, #tabs-4.active {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
ul.tabs {
|
||||
float:left;
|
||||
padding:0;
|
||||
|
|
Loading…
Reference in New Issue