173 |
174 | {% endblock %}
175 |
176 | {% block end_additional %}
177 |
179 |
180 |
188 | {% endblock %}
--------------------------------------------------------------------------------
/thor/modules/dashboard/tests.py:
--------------------------------------------------------------------------------
1 | #
2 | # This file is part of the THOR Dashboard Project.
3 | # Copyright (C) 2016 CERN.
4 | #
5 | # The THOR dashboard is free software; you can redistribute it
6 | # and/or modify it under the terms of the GNU General Public License as
7 | # published by the Free Software Foundation; either version 2 of the
8 | # License, or (at your option) any later version.
9 | #
10 | # HEPData is distributed in the hope that it will be
11 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | # General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with the THOR dashboard; if not, write to the
17 | # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 | # MA 02111-1307, USA.
19 | #
20 | # In applying this license, CERN does not
21 | # waive the privileges and immunities granted to it by virtue of its status
22 | # as an Intergovernmental Organization or submit itself to any jurisdiction.
23 |
24 | from django.test import TestCase
25 |
26 | # Create your tests here.
27 |
--------------------------------------------------------------------------------
/thor/modules/dashboard/urls.py:
--------------------------------------------------------------------------------
1 | #
2 | # This file is part of the THOR Dashboard Project.
3 | # Copyright (C) 2016 CERN.
4 | #
5 | # The THOR dashboard is free software; you can redistribute it
6 | # and/or modify it under the terms of the GNU General Public License as
7 | # published by the Free Software Foundation; either version 2 of the
8 | # License, or (at your option) any later version.
9 | #
10 | # HEPData is distributed in the hope that it will be
11 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | # General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with the THOR dashboard; if not, write to the
17 | # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 | # MA 02111-1307, USA.
19 | #
20 | # In applying this license, CERN does not
21 | # waive the privileges and immunities granted to it by virtue of its status
22 | # as an Intergovernmental Organization or submit itself to any jurisdiction.
23 |
24 |
25 | __author__ = 'eamonnmaguire'
26 | from django.conf.urls import patterns, url
27 |
28 | urlpatterns = patterns('',
29 | url(r'^$', 'thor.modules.dashboard.views.dashboard', name='overview'),
30 | url(r'^data/', 'thor.modules.dashboard.views.data_dashboard', name='data'),
31 | url(r'^researcher/', 'thor.modules.dashboard.views.researcher_dashboard', name='researcher'),
32 | url(r'^event/', 'thor.modules.dashboard.views.event_dashboard', name='event'),
33 | url(r'^crossrefs/', 'thor.modules.dashboard.views.crossrefs_dashboard', name='crossrefs'),
34 | )
35 |
--------------------------------------------------------------------------------
/thor/modules/dashboard/views.py:
--------------------------------------------------------------------------------
1 | #
2 | # This file is part of the THOR Dashboard Project.
3 | # Copyright (C) 2016 CERN.
4 | #
5 | # The THOR dashboard is free software; you can redistribute it
6 | # and/or modify it under the terms of the GNU General Public License as
7 | # published by the Free Software Foundation; either version 2 of the
8 | # License, or (at your option) any later version.
9 | #
10 | # HEPData is distributed in the hope that it will be
11 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | # General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with the THOR dashboard; if not, write to the
17 | # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 | # MA 02111-1307, USA.
19 | #
20 | # In applying this license, CERN does not
21 | # waive the privileges and immunities granted to it by virtue of its status
22 | # as an Intergovernmental Organization or submit itself to any jurisdiction.
23 |
24 | from django.shortcuts import render_to_response
25 |
26 | # Create your views here.
27 | from django.template import RequestContext
28 | from thor.modules.dashboard.models import Event
29 |
30 |
31 | def home(request):
32 | return render_to_response("home.html", context_instance=RequestContext(request))
33 |
34 |
35 | def dashboard(request):
36 | return render_to_response("dashboard.html", context_instance=RequestContext(request))
37 |
38 |
39 | def data_dashboard(request):
40 | return render_to_response("data-dashboard.html", context_instance=RequestContext(request))
41 |
42 |
43 | def researcher_dashboard(request):
44 | return render_to_response("research-identifier-dashboard.html", context_instance=RequestContext(request))
45 |
46 |
47 | def event_dashboard(request):
48 | events = Event.objects.all()
49 | return render_to_response("event-dashboard.html", {'events': events}, context_instance=RequestContext(request))
50 |
51 | def crossrefs_dashboard(request):
52 | return render_to_response("crossrefs-dashboard.html", context_instance=RequestContext(request))
--------------------------------------------------------------------------------