Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
panikweb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
panikweb
Commits
aa60c70c
Commit
aa60c70c
authored
Aug 31, 2013
by
Simon Daron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give archived a separate view
parent
5c332103
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
7 deletions
+33
-7
panikweb/urls.py
panikweb/urls.py
+1
-0
panikweb/views.py
panikweb/views.py
+11
-1
panikweb_templates/static/js/specifics.js
panikweb_templates/static/js/specifics.js
+12
-0
panikweb_templates/templates/emissions/nav.html
panikweb_templates/templates/emissions/nav.html
+9
-6
No files found.
panikweb/urls.py
View file @
aa60c70c
...
...
@@ -17,6 +17,7 @@ urlpatterns = patterns('',
url
(
r
'^emissions/(?P<slug>[\w,-]+)/$'
,
'panikweb.views.emission'
,
name
=
'emission-view'
),
url
(
r
'^emissions/(?P<emission_slug>[\w,-]+)/(?P<slug>[\w,-]+)/$'
,
'panikweb.views.episode'
,
name
=
'episode-view'
),
url
(
r
'^ckeditor/'
,
include
(
'ckeditor.urls'
)),
url
(
r
'^archives$'
,
'panikweb.views.archives'
,
name
=
'archives'
),
url
(
r
'^get$'
,
'panikweb.views.get'
,
name
=
'get'
),
url
(
r
'^listen$'
,
'panikweb.views.listen'
,
name
=
'listen'
),
url
(
r
'^news/$'
,
'panikweb.views.news'
,
name
=
'news'
),
...
...
panikweb/views.py
View file @
aa60c70c
...
...
@@ -396,12 +396,22 @@ class Emissions(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Emissions
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"emissions"
context
[
'emissions'
]
=
Emission
.
objects
.
all
().
order_by
(
'title'
)
context
[
'emissions'
]
=
Emission
.
objects
.
all
().
filter
(
archived
=
False
).
order_by
(
'title'
)
context
[
'categories'
]
=
Category
.
objects
.
all
()
return
context
emissions
=
Emissions
.
as_view
()
class
Archives
(
TemplateView
):
template_name
=
'archives.html'
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Archives
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"emissions"
context
[
'emissions'
]
=
Emission
.
objects
.
all
().
filter
(
archived
=
True
).
order_by
(
'title'
)
return
context
archives
=
Archives
.
as_view
()
class
Get
(
TemplateView
):
template_name
=
'get.html'
def
get_context_data
(
self
,
**
kwargs
):
...
...
panikweb_templates/static/js/specifics.js
View file @
aa60c70c
...
...
@@ -170,6 +170,18 @@ $(function() {
$
(
'
[data-highlight].icon-check-empty
'
).
each
(
function
(){
$
(
this
).
trigger
(
'
uncheck
'
);
});
$
(
'
[data-toggle]
'
).
on
(
'
check
'
,
function
(){
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
show
();
}).
on
(
'
uncheck
'
,
function
(){
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
hide
();
}).
on
(
'
click
'
,
function
(){
$
(
this
).
toggleClass
(
'
icon-check icon-check-empty
'
);
if
(
$
(
this
).
hasClass
(
'
icon-check
'
)){
$
(
this
).
trigger
(
'
check
'
);
}
else
{
$
(
this
).
trigger
(
'
uncheck
'
);}
});
$
(
'
[data-toggle].icon-check-empty
'
).
each
(
function
(){
$
(
this
).
trigger
(
'
uncheck
'
);
});
/*
$('[data-highlight].icon-check').each(function(){
$(this).trigger('check');
...
...
panikweb_templates/templates/emissions/nav.html
View file @
aa60c70c
<nav>
<ul
class=
"inline"
>
<li><a
href=
"{% url 'emissions' %}"
class=
"{% if class != "
program
"
and
class
!=
"
grid
"
%}
active
{%
endif
%}"
>
<li><a
href=
"{% url 'emissions' %}"
class=
"{% if class != "
program
"
and
class
!=
"
grid
"
and
class
!=
"
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-microphone"
></span>
<span
class=
"iconLabel"
>
Emissions
</span>
</a></li>
...
...
@@ -12,6 +12,10 @@
<span
class=
"icon-th-large"
></span>
<span
class=
"iconLabel"
>
La grille
</span>
</a></li>
<li><a
href=
"{% url 'archives' %}"
class=
"{% if class = "
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-archive"
></span>
<span
class=
"iconLabel"
>
Archives
</span>
</a></li>
</ul>
</nav>
{% if categories %}
...
...
@@ -20,14 +24,13 @@
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".nonstop"
>
Non-stop
</button></li>
{% elif class = "emissions" %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-highlight=
".nocat"
>
?
</button></li>
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".archived"
>
Archives
</button></li>
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% endif %}
{% for category in categories %}
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% else %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-
highlight
=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-
toggle
=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endif %}
{% endfor %}
</ul>
...
...
@@ -47,12 +50,12 @@
<ul
class=
"distributed"
>
<li>
<button
data-tab=
"#Emission-tabs-default"
class=
"active"
>
<span
class=
"iconLabel"
>
A propos
</span>
<span
class=
"iconLabel"
>
En bref
</span>
</button>
</li>
<li>
<button
data-tab=
"#Emission-tabs-episodes"
>
<span
class=
"iconLabel"
>
Archiv
es
</span>
<span
class=
"iconLabel"
>
Episod
es
</span>
</button
>
</li>
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment