<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">

<head>
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.journal.min.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'css/dataTables.bootstrap.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'css/custom.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'css/city_custom.css' %}" />
</head>
<body>
    <div class="row-fluid">
        <div class="col-sm-12">
            <br class="non-mobile-only"/>
            <h1>Notifications</h1>
            <p>This page shows all of the recent notifications for the various people, committees, searches, bills, and events you are subscribed to.</p>
            <hr />
        </div>
    </div>

	
     <div class="row-fluid">
        <div class="col-sm-8 table-col">
		<h3>Person Notifications</h3>
		<div class="table-responsive">
			<table class='table' id='subscriptions'>
			<thead>
			<tr><th>Person</th><th>Bill Introduced</th><th>RSS</th></tr>
                    </thead>
                    <tbody>
                            {% for person, bill in person_updates %}
			    <tr>
				    <td align="left">
					    <div>
						    <a href="{{SITE_URL}}{% url 'person' person.slug %}">{{person.name}}
					    </div>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail' bill.slug %}">{{bill.slug}}</a>: {{bill.description}}
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail_action_feed' bill.slug %}" title="RSS feed for Actions for {{bill.name}}"><i class="fa fa-rss-square" aria-hidden="true"></i></a>
				    </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>

     <div class="row-fluid">
        <div class="col-sm-8 table-col">
		<h3>Committee Action Notifications</h3>
		<div class="table-responsive">
			<table class='table' id='subscriptions'>
			<thead>
			<tr><th>Committee</th><th>Bill/Action</th><th>RSS</th></tr>
                    </thead>
                    <tbody>
                            {% for committee, bill, action in committee_action_updates %}
			    <tr>
				    <td align="left">
					    <div>
						    {{commitee.name}}
					    </div>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail' bill.slug %}">{{action.date|date:"SHORT_DATE_FORMAT"}}: {{action.description}}</a>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail_action_feed' bill.slug %}" title="RSS feed for Actions for {{bill.name}}"><i class="fa fa-rss-square" aria-hidden="true"></i></a>
				    </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>

        </div>


     <div class="row-fluid">
        <div class="col-sm-8 table-col">
		<h3>Committee Event Notifications</h3>
		<div class="table-responsive">
			<table class='table' id='subscriptions'>
			<thead>
			<tr>
				<th>Committee</th>
				<th>Event</th>
                        </tr>
                    </thead>
                    <tbody>
                            {% for committee, event in committee_event_updates %}
			    <tr>
				    <td align="left">
					    <div>
						    {{commitee.name}}
					    </div>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'event_detail' event.slug %}">{{event.start_time|date:"SHORT_DATE_FORMAT"}}: {{event.name}} {{event.description }}</a></td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>

        </div>



    {% if bill_search_updates.first %}    
     <div class="row-fluid">
        <div class="col-sm-8 table-col">
		<h3>Bill Search Notifications</h3>
		<div class="table-responsive">
			<table class='table' id='subscriptions'>
			<thead>
			<tr>
				<th>Search</th>
				<th>Bill</th>
				<th>RSS</th>
                        </tr>
                    </thead>
                    <tbody>
                            {% for search, bill in bill_search_updates %}
			    <tr>
				    <td align="left">
					    <div>
						    {{search}}
					    </div>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail' bill.slug %}">{{bill.name}}</a>
				    </td>
				    <td>
					    <!-- XXX Search RSS here -->
				    </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>

        </div>
     {% endif %}



	{% if bill_action_updates.first %}    
     <div class="row-fluid">
        <div class="col-sm-8 table-col">
		<h3>Bill Action Notifications</h3>
		<div class="table-responsive">
			<table class='table' id='subscriptions'>
			<thead>
			<tr>
				<th>Bill</th>
				<th>Action</th>
				<th>RSS</th>
                        </tr>
                    </thead>
                    <tbody>
                            {% for bill, action in bill_action_updates %}
			    <tr>
				    <td align="left">
					    <div>
						    {{bill.slug}}
					    </div>
				    </td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail' bill.slug %}">{{action.date|date:"SHORT_DATE_FORMAT"}}: {{action.description}}</a></td>
				    <td>
					    <a href="{{SITE_URL}}{% url 'bill_detail_action_feed' bill.slug %}" title="RSS feed for Actions for {{bill.name}}"><i class="fa fa-rss-square" aria-hidden="true"></i></a>
				    </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>

        </div>
     {% endif %}

    </div>
</body>

