Summary: Add a couple of hidden-xs/visible-xs classes to the agenda

table to make it work on a smart phone, this seem to cover most of the
intended goal with m_agenda.html, so delete it instead of facelifting it
 - Legacy-Id: 8950
This commit is contained in:
Ole Laursen 2015-02-02 16:19:27 +00:00
parent 504fef98a4
commit 8de3bc1ac3
5 changed files with 18 additions and 183 deletions

View file

@ -366,8 +366,6 @@ def edit_agendas(request, num=None, order=None):
def agenda(request, num=None, name=None, base=None, ext=None):
base = base if base else 'agenda'
ext = ext if ext else '.html'
if 'iPhone' in get_user_agent(request) and ext == ".html":
base = 'm_agenda'
mimetype = {".html":"text/html", ".txt": "text/plain", ".ics":"text/calendar", ".csv":"text/csv"}
meeting = get_meeting(num)
schedule = get_schedule(meeting, name)

View file

@ -1,29 +0,0 @@
{% block doctype %}<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
{% endblock %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
{# Copyright The IETF Trust 2007, All Rights Reserved #}
<!-- Copyright The IETF Trust 2007, All Rights Reserved -->
<head>
<!-- Project Revision {{ revision_num }}, {{ revision_time }} -->
<title>{% block title %}IETF Data{% endblock %}</title>
<meta name="viewport" content="width=320; " />
{% if server_mode != "production" %}
<link rel="icon" href="/images/ietf-dev-icon.bmp" />
{% else %}
<link rel="icon" href="/images/ietf-icon.bmp" />
{% endif %}
<link rel="stylesheet" href="/css/mobile.css" type="text/css" />
{% block head %}{% endblock %}
<style type="text/css">
{% block css %}{% endblock %}
</style>
</head>
<body {% block body_attributes %}{% endblock %}>
{% block content %}{% endblock %}
{% include "debug.html" %}
</body>
</html>

View file

@ -190,15 +190,20 @@ tr:first-child th.gap {
{{item.timeslot.time|date:"G:i"}}-{{item.timeslot.end_time|date:"G:i"}}
{% endif %}
</td>
<td colspan="3">
<td class="hidden-xs" colspan="3">
{% if item.timeslot.show_location %}
<a href="//tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ item.timeslot.get_location|slugify }}">{{item.timeslot.get_location|split:"/"|join:"/<wbr>"}}</a>
{% endif %}
</td>
<td colspan="2">
<td class="visible-xs">
{% if item.timeslot.show_location %}
<a href="//tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ item.timeslot.get_location|slugify }}">{{item.timeslot.get_location|split:"/"|join:"/<wbr>"}}</a>
{% endif %}
</td>
<td colspan="2">
{{item.timeslot.name}}
</td>
</tr>
</tr>
{% endwith %}
{% endif %}
@ -209,20 +214,25 @@ tr:first-child th.gap {
{% if item.timeslot.type.slug == 'plenary' %}
<th class="text-nowrap text-right">
{% if "-utc" in request.path %}
{% if "-utc" in request.path %}
{{item.timeslot.utc_start_time|date:"G:i"}}-{{item.timeslot.utc_end_time|date:"G:i"}}
{% else %}
{{item.timeslot.time|date:"G:i"}}-{{item.timeslot.end_time|date:"G:i"}}
{% endif %}
</th>
<td colspan="3">
<td class="hidden-xs" colspan="3">
{% if item.timeslot.show_location %}
<a href="//tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ item.timeslot.get_location|slugify }}">{{item.timeslot.get_location|split:"/"|join:"/<wbr>"}}</a>
{% endif %}
</td>
<td class="visible-xs">
{% if item.timeslot.show_location %}
<a href="//tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ item.timeslot.get_location|slugify }}">{{item.timeslot.get_location|split:"/"|join:"/<wbr>"}}</a>
{% endif %}
</td>
{% else %}
<td>
<td class="hidden-xs">
</td>
<td>
@ -231,7 +241,7 @@ tr:first-child th.gap {
{% endif %}
</td>
<td>{{item.session.group.parent.acronym}}</td>
<td class="hidden-xs">{{item.session.group.parent.acronym}}</td>
<td>
{% if item.session.group.charter %}
@ -305,7 +315,7 @@ tr:first-child th.gap {
</div>
</div>
</td>
<td class="text-nowrap">
<td class="text-nowrap hidden-xs">
{% if item.session.agenda %}
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#modal-{{session_id}}"><span class="fa fa-arrows-alt" title="Show meeting materials"></span></button>
<a class="btn btn-default btn-xs" href="/meeting/{{schedule.meeting.number}}/agenda/{{item.session.group.acronym}}-drafts.tgz" title="Download meeting materials as .tar archive"><span class="fa fa-file-archive-o"></span></a>

View file

@ -1,127 +0,0 @@
{% extends "m_base.html" %}
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% load humanize %}
{% load ietf_filters %}
{% block title %} IETF {{ schedule.meeting.number }} Meeting Agenda{% endblock %}
{% block head %}
<link href="http://tools.ietf.org/css/palette.css" rel="stylesheet" type="text/css" />
<link rel="apple-touch-icon" href="/images/agenda-touch-icon.png" />
<script type="text/javascript" src='http://tools.ietf.org/js/prototype-1.6.0.2.js'></script>
<script type="text/javascript" src='/js/agenda.js'></script>
<script type="text/javascript" src="/js/dateformat.js"></script>
<script type="text/javascript">
//<![CDATA[
function on_load_actions() {
set_cookie_colors();
set_location();
}
function set_location() {
var now = new Date;
var utc = now;
utc.setMinutes(now.getMinutes() + now.getTimezoneOffset());
var loc = utc;
// Switch page location 1 hour after local time, to give stragglers some leeway.
loc.setHours(utc.getHours() + {{ schedule.meeting.time_zone|default_if_none:"0"}} - 1);
localtime = loc.format("%Y-%m-%d_%H%M");
var anchors = document.getElementsByTagName("a");
for (var i = 0; i<anchors.length;i++){
var anchor = anchors[i];
if (anchor.name) {
if ((anchor.name > localtime)) {
window.location.hash = anchor.name;
break;
}
}
}
}
//]]>
</script>
{% endblock %}
{% block body_attributes %}onload="on_load_actions()"{% endblock %}
{% block content %}
<span id='colorpallet'></span>
<div class="header">
<a name="{{ schedule.meeting.date|date:"Y-m-d_0000" }}" />
<h1>Agenda of the {{ schedule.meeting.number|ordinal }} IETF Meeting</h1>
<h2>{{ schedule.meeting.date|date:"F j" }}-{% if schedule.meeting.date.month != schedule.meeting.end_date.month %}{{ schedule.meeting.end_date|date:"F " }}{% endif %}{{ schedule.meeting.end_date|date:"j, Y" }}</h2>
</div>
<div class="legal">IETF agendas are subject to change, up to and during the meeting.</div>
<div>
<table id="agenda">
{% for item in schedule.assignments.all.distinct %}
{% ifchanged %}
<tr>
<td colspan="3">
<a name="{{item.timeslot.time|date:"Y-m-d"}}_0000" />
<h4>{{ item.timeslot.time|date:"l"|upper }}, {{ item.timeslot.time|date:"F j, Y" }}</h4>
</td>
</tr>
{% endifchanged %}
{% if item.timeslot.type.slug == "reg" %}
<tr>
<td colspan="3">
{{ item.timeslot.time_desc }} {{ item.timeslot.name }}
{% if schedule.meeting.reg_area %} - <a href="http://tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ schedule.meeting.reg_area|slugify }}">{{ schedule.meeting.reg_area }}</a>{% endif %}
</td>
</tr>
{% endif %}{# reg #}
{% if item.timeslot.type.slug == "break" %}
<tr>
<td colspan="3">
<br />
{{ item.timeslot.time_desc }} {{ item.timeslot.name }}
{% if schedule.meeting.break_area and item.timeslot.break_info.show_break_location %} - <a href="http://tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{ schedule.meeting.break_area|slugify }}">{{ schedule.meeting.break_area }}</a>{% endif %}
</td>
</tr>
{% endif %}{# break #}
{% if item.timeslot.type.slug == "session" %}
{% if item.session.group %}
{% ifchanged %}
<tr>
<td colspan="3">
<a name="{{item.timeslot.time|date:"Y-m-d"}}_{{item.timeslot.time_desc|slice:":4"}}" />
<h5>{{item.timeslot.time|date:"D"}} {{ item.timeslot.time_desc }} {{ item.timeslot.name }}
</td>
</tr>
{% endifchanged %}
<tr id="{{schedule.meeting.number}}-{{item.timeslot.time|date:"D"|lower}}-{{item.timeslot.time_desc|slice:":4"}}-{{item.session.group.acronym|lower}}">
<td>
<a href="http://tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{item.timeslot.location.name|slugify}}">{{ item.timeslot.location.name}}</a>
</td>
<td>
{% if item.session.type == "WG" %}<a href="http://www.ietf.org/dyn/wg/charter/{{ item.session.group.acronym|lower }}-charter.html">{%endif%}
{% if item.session.type == "BOF" %}<span style="background-color: #6FD">{% endif %}
{{ item.session.group.acronym|lower }}
{% if item.session.type == "BOF" %}</span>{% endif %}
{% if item.session.type == "WG" %}</a>{%endif%}
</td>
<td>
{% if item.session.agenda_file %}<a href="http://tools.ietf.org/wg/{{item.session.group.acronym}}/agenda/">{%endif%}
{{ item.session.group.name|truncate_ellipsis:"22"|safe }}
{% if item.session.agenda_file %}</a>{%endif%}
</td>
</tr>
{% endif %}
{% endif %}{# session #}
{% if item.timeslot.type.slug == "other" %}
<tr>
<td colspan="3">
<a name="{{item.timeslot.time|date:"Y-m-d"}}_{{item.timeslot.time_desc|slice:":4"}}" />
{{ item.timeslot.time_desc }} {{ item.timeslot.name|truncate_ellipsis:"19"|safe }} - <a href="http://tools.ietf.org/agenda/{{schedule.meeting.number}}/venue/?room={{item.timeslot.location.name|slugify}}">{{ item.timeslot.location.name}}</a>
</td>
</tr>
{% endif %}{# other #}
{% endfor %}
</table>
</div>
{% endblock %}

View file

@ -1,17 +0,0 @@
{% extends "m_base.html" %}
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% load humanize %}
{% load ietf_filters %}
{% block title %} IETF {{ meeting.number }} Meeting Agenda{% endblock %}
{% block head %}
<link href="http://tools.ietf.org/css/palette.css" rel="stylesheet" type="text/css" />
<link rel="apple-touch-icon" href="/images/agenda-touch-icon.png" />
{% endblock %}
{% block content %}
<div class="header">
<a name="{{ meeting.date|date:"Y-m-d_0000" }}" />
<h1>Agenda of the {{ meeting.number|ordinal }} IETF Meeting</h1>
<h2>{{ meeting.date|date:"F j" }}-{% if meeting.date.month != meeting.end_date.month %}{{ meeting.end_date|date:"F " }}{% endif %}{{ meeting.end_date|date:"j, Y" }}</h2>
</div>
<div class="legal">There is no Agenda available yet.</div>
{% endblock %}