Skip to content

Commit 4f4c3fd

Browse files
committed
Based on [17694] from mark@painless-security.com, this merges in a set of changes that provides agenda-like details on session meeting view, and fixes issue ietf-tools#2751. It also aligns the styling of materials and resources link lists on the upcoming meetings and ietf agenda pages, and adds calendar symbols with links and recordings symbols with links to interim meeting pages.
- Legacy-Id: 17782 Note: SVN reference [17694] has been migrated to Git commit 4df7e55
2 parents c34c5bd + ae7c770 commit 4f4c3fd

25 files changed

Lines changed: 582 additions & 258 deletions

ietf/meeting/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def slug(self):
793793
if not self.timeslot:
794794
components.append("unknown")
795795

796-
if not self.session or not (getattr(self.session, "historic_group") or self.session.group):
796+
if not self.session or not (getattr(self.session, "historic_group", None) or self.session.group):
797797
components.append("unknown")
798798
else:
799799
components.append(self.timeslot.time.strftime("%Y-%m-%d-%a-%H%M"))

ietf/meeting/tests_views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,12 @@ def test_session_details(self):
12431243
self.assertTrue(all([x in unicontent(r) for x in ('slides','agenda','minutes','draft')]))
12441244
self.assertNotContains(r, 'deleted')
12451245

1246+
q = PyQuery(r.content)
1247+
self.assertTrue(q('h2#session_%s div#session-buttons-%s' % (session.id, session.id)),
1248+
'Session detail page does not contain session tool buttons')
1249+
self.assertFalse(q('h2#session_%s div#session-buttons-%s span.fa-arrows-alt' % (session.id, session.id)),
1250+
'The session detail page is incorrectly showing the "Show meeting materials" button')
1251+
12461252
def test_session_details_past_interim(self):
12471253
group = GroupFactory.create(type_id='wg',state_id='active')
12481254
chair = RoleFactory(name_id='chair',group=group)
@@ -1492,8 +1498,7 @@ def test_upcoming(self):
14921498
self.assertContains(r, 'IETF 72')
14931499
# cancelled session
14941500
q = PyQuery(r.content)
1495-
# self.assertIn('CANCELLED', q('[id*="-ames"]').text())
1496-
self.assertIn('CANCELLED', q('tr>td>a>span').text())
1501+
self.assertIn('CANCELLED', q('tr>td.text-right>span').text())
14971502
self.check_interim_tabs(url)
14981503

14991504
def test_upcoming_ical(self):

ietf/meeting/views.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
from ietf.secr.proceedings.proc_utils import (get_progress_stats, post_process, import_audio_files,
8383
create_recording)
8484
from ietf.utils.decorators import require_api_key
85+
from ietf.utils.history import find_history_replacements_active_at
8586
from ietf.utils.log import assertion
8687
from ietf.utils.mail import send_mail_message, send_mail_text
8788
from ietf.utils.pipe import pipe
@@ -1532,9 +1533,22 @@ def session_details(request, num, acronym):
15321533
if not sessions:
15331534
raise Http404
15341535

1536+
# Find the time of the meeting, so that we can look back historically
1537+
# for what the group was called at the time.
1538+
meeting_time = datetime.datetime.combine(meeting.date, datetime.time())
1539+
1540+
groups = list(set([ s.group for s in sessions ]))
1541+
group_replacements = find_history_replacements_active_at(groups, meeting_time)
1542+
15351543
status_names = {n.slug: n.name for n in SessionStatusName.objects.all()}
15361544
for session in sessions:
15371545

1546+
session.historic_group = None
1547+
if session.group:
1548+
session.historic_group = group_replacements.get(session.group_id)
1549+
if session.historic_group:
1550+
session.historic_group.historic_parent = None
1551+
15381552
session.type_counter = Counter()
15391553
ss = session.timeslotassignments.filter(schedule=meeting.schedule).order_by('timeslot__time')
15401554
if ss:
@@ -1587,6 +1601,7 @@ def session_details(request, num, acronym):
15871601
'can_manage_materials' : can_manage,
15881602
'can_view_request': can_view_request,
15891603
'thisweek': datetime.date.today()-datetime.timedelta(days=7),
1604+
'now': datetime.datetime.now(),
15901605
})
15911606

15921607
class SessionDraftsForm(forms.Form):
@@ -2656,7 +2671,7 @@ def past(request):
26562671

26572672
def upcoming(request):
26582673
'''List of upcoming meetings'''
2659-
today = datetime.date.today()
2674+
today = datetime.date.today()-datetime.timedelta(days=7)
26602675

26612676
# Get ietf meetings starting 7 days ago, and interim meetings starting today
26622677
ietf_meetings = Meeting.objects.filter(type_id='ietf', date__gte=today-datetime.timedelta(days=7))
@@ -2695,6 +2710,7 @@ def upcoming(request):
26952710
'menu_actions': actions,
26962711
'menu_entries': menu_entries,
26972712
'selected_menu_entry': selected_menu_entry,
2713+
'now': datetime.datetime.now()
26982714
})
26992715

27002716

ietf/static/ietf/css/ietf.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,25 @@ ul.progress-section {
771771

772772
.btn .fa-stack { width: 1em; height: 1em; }
773773
.btn .fa-stack .fa-stack-1x { line-height: 80%; }
774+
.fa-stack-1 {
775+
position: relative;
776+
display: inline-block;
777+
width: 1.28571429em;
778+
height: 1em;
779+
vertical-align: inherit;
780+
}
781+
.fa-stack-sm {
782+
width: 100%;
783+
text-align: center;
784+
font-size: 0.7172em;
785+
line-height: inherit;
786+
}
787+
.fa-stack-xs {
788+
width: 100%;
789+
text-align: center;
790+
font-size: 0.5em;
791+
line-height: inherit;
792+
}
774793

775794
/* ========================================================================== */
776795

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
This webfont is generated by http://fontello.com open source project.
2+
3+
4+
================================================================================
5+
Please, note, that you should obey original font licenses, used to make this
6+
webfont pack. Details available in LICENSE.txt file.
7+
8+
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
9+
site in "About" section.
10+
11+
- If your project is open-source, usually, it will be ok to make LICENSE.txt
12+
file publicly available in your repository.
13+
14+
- Fonts, used in Fontello, don't require a clickable link on your site.
15+
But any kind of additional authors crediting is welcome.
16+
================================================================================
17+
18+
19+
Comments on archive content
20+
---------------------------
21+
22+
- /font/* - fonts in different formats
23+
24+
- /css/* - different kinds of css, for all situations. Should be ok with
25+
twitter bootstrap. Also, you can skip <i> style and assign icon classes
26+
directly to text elements, if you don't mind about IE7.
27+
28+
- demo.html - demo file, to show your webfont content
29+
30+
- LICENSE.txt - license info about source fonts, used to build your one.
31+
32+
- config.json - keeps your settings. You can import it back into fontello
33+
anytime, to continue your work
34+
35+
36+
Why so many CSS files ?
37+
-----------------------
38+
39+
Because we like to fit all your needs :)
40+
41+
- basic file, <your_font_name>.css - is usually enough, it contains @font-face
42+
and character code definitions
43+
44+
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
45+
directly into html
46+
47+
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
48+
rules, but still wish to benefit from css generation. That can be very
49+
convenient for automated asset build systems. When you need to update font -
50+
no need to manually edit files, just override old version with archive
51+
content. See fontello source code for examples.
52+
53+
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
54+
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
55+
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
56+
server headers. But if you ok with dirty hack - this file is for you. Note,
57+
that data url moved to separate @font-face to avoid problems with <IE9, when
58+
string is too long.
59+
60+
- animate.css - use it to get ideas about spinner rotation animation.
61+
62+
63+
Attention for server setup
64+
--------------------------
65+
66+
You MUST setup server to reply with proper `mime-types` for font files -
67+
otherwise some browsers will fail to show fonts.
68+
69+
Usually, `apache` already has necessary settings, but `nginx` and other
70+
webservers should be tuned. Here is list of mime types for our file extensions:
71+
72+
- `application/vnd.ms-fontobject` - eot
73+
- `application/x-font-woff` - woff
74+
- `application/x-font-ttf` - ttf
75+
- `image/svg+xml` - svg

ietf/static/ietf/font-datatracker/config.json

Lines changed: 24 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
@font-face {
2+
font-family: 'datatracker';
3+
src: url('../font/datatracker.eot?60587374');
4+
src: url('../font/datatracker.eot?60587374#iefix') format('embedded-opentype'),
5+
url('../font/datatracker.woff2?60587374') format('woff2'),
6+
url('../font/datatracker.woff?60587374') format('woff'),
7+
url('../font/datatracker.ttf?60587374') format('truetype'),
8+
url('../font/datatracker.svg?60587374#datatracker') format('svg');
9+
font-weight: normal;
10+
font-style: normal;
11+
}
12+
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
13+
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
14+
/*
15+
@media screen and (-webkit-min-device-pixel-ratio:0) {
16+
@font-face {
17+
font-family: 'datatracker';
18+
src: url('../font/datatracker.svg?60587374#datatracker') format('svg');
19+
}
20+
}
21+
*/
22+
23+
.dt {
24+
font-family: "datatracker";
25+
font-style: normal;
26+
font-weight: normal;
27+
speak: none;
28+
29+
display: inline-block;
30+
text-decoration: inherit;
31+
width: 1em;
32+
margin-right: .2em;
33+
text-align: center;
34+
/* opacity: .8; */
35+
36+
/* For safety - reset parent styles, that can break glyph codes*/
37+
font-variant: normal;
38+
text-transform: none;
39+
40+
/* fix buttons height, for twitter bootstrap */
41+
line-height: 1em;
42+
43+
/* Animation center compensation - margins should be symmetric */
44+
/* remove if not needed */
45+
margin-left: .2em;
46+
47+
/* you can be more comfortable with increased icons size */
48+
/* font-size: 120%; */
49+
50+
/* Font smoothing. That was taken from TWBS */
51+
-webkit-font-smoothing: antialiased;
52+
-moz-osx-font-smoothing: grayscale;
53+
54+
/* Uncomment for 3D effect */
55+
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
56+
}
57+
58+
.fd-meetecho:before { content: '\e800'; } /* '' */
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@font-face {
2+
font-family: 'font-datatracker';
3+
src: url('../font/font-datatracker.eot?60587374');
4+
src: url('../font/font-datatracker.eot?60587374#iefix') format('embedded-opentype'),
5+
url('../font/font-datatracker.woff2?60587374') format('woff2'),
6+
url('../font/font-datatracker.woff?60587374') format('woff'),
7+
url('../font/font-datatracker.ttf?60587374') format('truetype'),
8+
url('../font/font-datatracker.svg?60587374#font-datatracker') format('svg');
9+
font-weight: normal;
10+
font-style: normal;
11+
}
12+
13+
.fd {
14+
font-family: "font-datatracker";
15+
font-style: normal;
16+
font-weight: normal;
17+
speak: none;
18+
19+
display: inline-block;
20+
text-decoration: inherit;
21+
width: 1em;
22+
margin-right: .2em;
23+
text-align: center;
24+
/* opacity: .8; */
25+
26+
/* For safety - reset parent styles, that can break glyph codes*/
27+
font-variant: normal;
28+
text-transform: none;
29+
30+
/* fix buttons height, for twitter bootstrap */
31+
line-height: 1em;
32+
33+
/* Animation center compensation - margins should be symmetric */
34+
/* remove if not needed */
35+
margin-left: .2em;
36+
37+
/* you can be more comfortable with increased icons size */
38+
/* font-size: 120%; */
39+
40+
/* Font smoothing. That was taken from TWBS */
41+
-webkit-font-smoothing: antialiased;
42+
-moz-osx-font-smoothing: grayscale;
43+
44+
/* Uncomment for 3D effect */
45+
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
46+
}
47+
48+
.fd-meetecho:before { content: '\e800'; } /* '' */
3.98 KB
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)