File tree 3 files changed +69
-0
lines changed
3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% extends "base.html" %}
2
+
3
+ {% load humanize %}
4
+ {% load syntax %}
5
+ {% load person %}
6
+ {% load patch %}
7
+ {% load static %}
8
+ {% load utils %}
9
+
10
+ {% block title %}{{series.name}}{% endblock %}
11
+
12
+ {% block body %}
13
+
14
+ < div >
15
+ < h1 > {{ series.name }}</ h1 >
16
+ </ div >
17
+
18
+ < table class ="patch-meta ">
19
+ < tr >
20
+ < th > Cover Letter</ th >
21
+ < td > {{ series.cover_letter.content|default:"No cover letter available" }}</ td >
22
+ </ tr >
23
+ < tr >
24
+ < th > Date</ th >
25
+ < td > {{ series.date }}</ td >
26
+ </ tr >
27
+ < tr >
28
+ < th > Submitter</ th >
29
+ < td > {{ series.submitter }}</ td >
30
+ </ tr >
31
+ < tr >
32
+ < th > Total</ th >
33
+ < td > {{ series.patches }}</ td >
34
+ </ tr >
35
+ </ table >
36
+ < br >
37
+ < h2 > Patches:</ h2 >
38
+ < br >
39
+ {% include "patchwork/partials/patch-list.html" %}
40
+
41
+ {% endblock %}
Original file line number Diff line number Diff line change 115
115
name = 'comment-redirect' ,
116
116
),
117
117
# series views
118
+ path (
119
+ 'project/<project_id>/series/<int:series_id>/' ,
120
+ series_views .series_detail ,
121
+ name = 'series-detail' ,
122
+ ),
118
123
path (
119
124
'series/<int:series_id>/mbox/' ,
120
125
series_views .series_mbox ,
Original file line number Diff line number Diff line change 9
9
from django .shortcuts import render
10
10
11
11
from patchwork .models import Series
12
+ from patchwork .models import Patch
12
13
from patchwork .models import Project
14
+ from patchwork .views import generic_list
13
15
from patchwork .views .utils import series_to_mbox
14
16
from patchwork .paginator import Paginator
15
17
@@ -26,6 +28,27 @@ def series_mbox(request, series_id):
26
28
return response
27
29
28
30
31
+ def series_detail (request , project_id , series_id ):
32
+ series = get_object_or_404 (Series , id = series_id )
33
+
34
+ patches = Patch .objects .filter (series = series )
35
+
36
+ context = generic_list (
37
+ request ,
38
+ series .project ,
39
+ 'series-detail' ,
40
+ view_args = {
41
+ 'project_id' : project_id ,
42
+ 'series_id' : series_id ,
43
+ },
44
+ patches = patches ,
45
+ )
46
+
47
+ context .update ({'series' : series })
48
+
49
+ return render (request , 'patchwork/series-detail.html' , context )
50
+
51
+
29
52
def series_list (request , project_id ):
30
53
project = get_object_or_404 (Project , linkname = project_id )
31
54
context = {}
You can’t perform that action at this time.
0 commit comments