File tree Expand file tree Collapse file tree 3 files changed +57
-46
lines changed Expand file tree Collapse file tree 3 files changed +57
-46
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,15 @@ def submit(ticket_code):
215
215
return redirect (url_for ("submit" , ticket_code = project .ticket_code ))
216
216
217
217
218
+ @app .route ("/summary" )
219
+ def summary ():
220
+ return render_template (
221
+ "summary.html" ,
222
+ projects = db .session .query (Project ).all (),
223
+ submissions = db .session .query (Submission ).all (),
224
+ )
225
+
226
+
218
227
@app .route ("/" , methods = ["GET" , "POST" ])
219
228
def index ():
220
229
if request .method == "POST" :
Original file line number Diff line number Diff line change @@ -19,50 +19,4 @@ <h5 class="m-3">Please submit your project id below to get to the metadata submi
19
19
< button type ="submit " class ="btn btn-success m-3 "> GO</ button >
20
20
</ form >
21
21
</ div >
22
-
23
- < br /> < br />
24
- < table class ="display " id ="projects ">
25
- < thead >
26
- < tr >
27
- < th > Ticket Code</ th >
28
- < th > Name</ th >
29
- < th > Contact Name</ th >
30
- < th > Contact Email</ th >
31
- </ tr >
32
- </ thead >
33
- < tbody >
34
- {% for project in projects %}
35
- < tr >
36
- < td > < a href ="{{ url_for('show_project', ticket_code=project.ticket_code) }} "> {{ project.ticket_code }}</ a > </ td >
37
- < td > {{ project.project_name }}</ td >
38
- < td > {{ project.contact_name }}</ td >
39
- < td > {{ project.contact_email }}</ td >
40
- </ tr >
41
- {% endfor %}
42
- </ tbody >
43
- </ table >
44
-
45
- < script type ="text/javascript ">
46
- $ ( document ) . ready ( function ( ) {
47
- /* Initialize the DataTable */
48
- oTable = $ ( '#projects' ) . dataTable ( {
49
- "bSort" : false ,
50
- "iDisplayLength" : 20 ,
51
- "bLengthChange" : false ,
52
- "sPaginationType" : "full_numbers" ,
53
- "bStateSave" : true ,
54
- } ) ;
55
-
56
- /* Move search box to bottom of summary area */
57
- $ ( "#projects_filter" ) . appendTo ( '#projects_summary' ) ;
58
-
59
- /* Snap pagination info to grid */
60
- $ ( "#projects_info" ) . addClass ( "span-12" ) ;
61
- $ ( "#projects_paginate" ) . addClass ( "span-12 last" )
62
-
63
- /* Moving the search box breaks the state saving routine */
64
- /* Redraw manually */
65
- oTable . fnDraw ( ) ;
66
- } ) ;
67
- </ script >
68
22
{% endblock %}
Original file line number Diff line number Diff line change
1
+ {% extends 'base.html' %}
2
+
3
+ {% block body %}
4
+ < table class ="display " id ="projects ">
5
+ < thead >
6
+ < tr >
7
+ < th > Ticket Code</ th >
8
+ < th > Name</ th >
9
+ < th > Contact Name</ th >
10
+ < th > Contact Email</ th >
11
+ </ tr >
12
+ </ thead >
13
+ < tbody >
14
+ {% for project in projects %}
15
+ < tr >
16
+ < td > < a href ="{{ url_for('show_project', ticket_code=project.ticket_code) }} "> {{ project.ticket_code }}</ a > </ td >
17
+ < td > {{ project.project_name }}</ td >
18
+ < td > {{ project.contact_name }}</ td >
19
+ < td > {{ project.contact_email }}</ td >
20
+ </ tr >
21
+ {% endfor %}
22
+ </ tbody >
23
+ </ table >
24
+
25
+ < script type ="text/javascript ">
26
+ $ ( document ) . ready ( function ( ) {
27
+ /* Initialize the DataTable */
28
+ oTable = $ ( '#projects' ) . dataTable ( {
29
+ "bSort" : false ,
30
+ "iDisplayLength" : 20 ,
31
+ "bLengthChange" : false ,
32
+ "sPaginationType" : "full_numbers" ,
33
+ "bStateSave" : true ,
34
+ } ) ;
35
+
36
+ /* Move search box to bottom of summary area */
37
+ $ ( "#projects_filter" ) . appendTo ( '#projects_summary' ) ;
38
+
39
+ /* Snap pagination info to grid */
40
+ $ ( "#projects_info" ) . addClass ( "span-12" ) ;
41
+ $ ( "#projects_paginate" ) . addClass ( "span-12 last" )
42
+
43
+ /* Moving the search box breaks the state saving routine */
44
+ /* Redraw manually */
45
+ oTable . fnDraw ( ) ;
46
+ } ) ;
47
+ </ script >
48
+ {% endblock %}
You can’t perform that action at this time.
0 commit comments