Skip to content

Commit 834caec

Browse files
author
Michael Zhang
committed
Added events table.
1 parent ccec004 commit 834caec

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

templates/users/profile.html

+29-5
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,41 @@ <h2 style="margin:0px;font-weight:bold;font-size:2em;">{{ user.name }}</h2>
3131
</div>
3232
<div class="col-sm-9 col-xs-12">
3333
<ul class="nav nav-tabs" role="tablist">
34-
<li role="presentation" class="active"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
35-
<li role="presentation"><a href="#activity" aria-controls="activity" role="tab" data-toggle="tab">Activity</a></li>
36-
<a href="/settings" class="btn btn-primary" style="float:right;" ng-show="user['me']==true"><i class="fa fa-fw fa-pencil"></i> Edit Profile</a>
34+
<li role="presentation" class="active">
35+
<a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
36+
<li role="presentation">
37+
<a href="#activity" aria-controls="activity" role="tab" data-toggle="tab">Activity</a>
38+
</li>
39+
<a href="/settings" class="btn btn-primary" style="float:right;" ng-show="user['me']==true"><i class="fa fa-fw fa-pencil"></i>
40+
Edit Profile</a>
3741
</ul>
3842
<div class="tab-content">
3943
<div role="tabpanel" class="tab-pane active" id="profile">
4044
<div class="page-header">
4145
<h1>{{ user.username }}</h1>
4246
</div>
43-
<div class="panel panel-default">
44-
<table class="table">
47+
<div class="page-header">
48+
<h3>{{ user.username }}'s Events</h3>
49+
50+
<table class="table table-hover table-striped">
51+
<thead>
52+
<th>Name</th>
53+
<th>Description</th>
54+
<th>Date</th>
55+
<th>Duration</th>
56+
<th>Website</th>
57+
</thead>
58+
<tbody>
59+
{% for event in user.events %}
60+
<tr id="event_{{ event.id }}">
61+
<td><a href="{{ url_for('events.events_detail', event_id=event.id) }}">{{ event.title }}</a></td>
62+
<td>{{ event.description }}</td>
63+
<td><span data-livestamp="{{ event.start_time }}"></span></td>
64+
<td>{{ event.duration|duration('hour') }}</td>
65+
<td><a href="{{ event.link }}" target="_blank">Website</a></td>
66+
</tr>
67+
{% endfor %}
68+
</tbody>
4569
</table>
4670
</div>
4771
</div>

0 commit comments

Comments
 (0)