Brandon Cornejo
11 years ago
8 changed files with 346 additions and 0 deletions
-
BINstatic/img/ts3-identities-copy.png
-
BINstatic/img/ts3-identities-menu.png
-
77templates/edit_event.html
-
65templates/enable_stats.html
-
18templates/events_widget.html
-
99templates/list_events.html
-
34templates/private_profile.html
-
53templates/show_event.html
After Width: 433 | Height: 428 | Size: 32 KiB |
After Width: 557 | Height: 261 | Size: 46 KiB |
@ -0,0 +1,77 @@ |
|||
{% extends "layout.html" %} |
|||
|
|||
{% block title %}Edit Event - DotaNoobs {% endblock %} |
|||
|
|||
{% block content %} |
|||
<div class="uk-grid" data-uk-grid-margin> |
|||
<div class="uk-width-1-1"> |
|||
{% if event.name == None %} |
|||
<h2 class="uk-float-left"><i class="uk-icon-calendar uk-icon-large"></i> New Event</h2> |
|||
{% else %} |
|||
<h2 class="uk-float-left"><i class="uk-icon-calendar uk-icon-large"></i> {{ event.name }}</h2> |
|||
{% endif %} |
|||
</div> |
|||
<!--Main content area --> |
|||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel"> |
|||
<form class="uk-form uk-form-width-large" action="" method="post" name="settings"> |
|||
{{ form.hidden_tag() }} |
|||
<fieldset data-uk-margin> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Event Name: </label><br/> |
|||
{{ form.name(placeholder="e.g. Tuesday Tango", class="uk-form-width-medium") }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Type: </label> |
|||
{{ form.type }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Points: </labeb> |
|||
{{ form.points(placeholder="e.g. 20") }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Time To Earn: </label> |
|||
{{ form.reward_threshold(placeholder="e.g. 30 (minutes)") }} |
|||
</div> |
|||
<br/> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Starts</label><br/> |
|||
<input id="start_d" placeholder="01.01.2015" data-uk-datepicker /> |
|||
<input id="start_t" placeholder="14:30" data-uk-timepicker /> |
|||
{{ form.start_time(class="datepicker uk-hidden") }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Ends</label><br/> |
|||
<input id="end_d" placeholder="01.01.2015" data-uk-datepicker /> |
|||
<input id="end_t" placeholder="09:30" data-uk-timepicker /> |
|||
{{ form.end_time(class="datepicker uk-hidden") }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Description</label><br/> |
|||
{{ form.desc(rows="10", class="uk-width-1-1", placeholder="A brief description of the event your planning; convince people to come!") }} |
|||
</div> |
|||
<div class="uk-form-controls uk-margin-top"> |
|||
<button class="uk-button uk-button-success" type="submit">Save</button> |
|||
<a class="uk-button" href="{{ url_for('user_profile', userid=g.user.id) }}">Cancel</a> |
|||
</div> |
|||
</fieldset> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
|||
|
|||
{% block pagescripts %} |
|||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/datepicker/datepicker.min.js"></script> |
|||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/timepicker/timepicker.min.js"></script> |
|||
<link rel=stylesheet href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/datepicker/datepicker.gradient.css"></link> |
|||
<script> |
|||
$(".uk-form").submit(function(event) { |
|||
var s = moment($("#start_d").val() + ' ' + $("#start_t").val(), "DD.MM.YYYY HH:mm"); |
|||
var e = moment($("#end_d").val() + ' ' + $("#end_t").val(), "DD.MM.YYYY HH:mm"); |
|||
|
|||
$("#start_time").val(s.utc().format("DD.MM.YYYY HH:mm")); |
|||
$("#end_time").val(e.utc().format("DD.MM.YYYY HH:mm")); |
|||
|
|||
return true; |
|||
}); |
|||
</script> |
|||
{% endblock %} |
@ -0,0 +1,65 @@ |
|||
{% extends "layout.html" %} |
|||
|
|||
{% block title %}Account linking for {{ g.user.nickname }} - DotaNoobs {% endblock %} |
|||
|
|||
{% block content %} |
|||
<div class="uk-grid" data-uk-grid-margin> |
|||
<div class="uk-width-2-3"> |
|||
<h2 class="uk-float-left"><img class="" src="{{ g.user.avatar }}" /> {{ g.user.nickname }}'s Linked Accounts</h2> |
|||
</div> |
|||
<div class="uk-width-1-3 uk-text-center"> |
|||
<a href="{{ url_for('user_settings') }}" class="uk-button">Back to Settings <i class="uk-icon-star-o"></i></a> |
|||
</div> |
|||
<!--Main content area --> |
|||
<div class="uk-width-1-1 uk-panel"> |
|||
<form class="uk-form uk-form-width-large" action="" method="post" name="enable_stats"> |
|||
{{ form.hidden_tag() }} |
|||
<fieldset data-uk-margin> |
|||
<div class="uk-form-row"> |
|||
<h3 class="">Link Teamspeak Account</h3> |
|||
{% if g.user.teamspeak_id %} <span class="uk-text-success"><i class="uk-icon-check"></i> Already verified</span> {% endif %} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Teamspeak ID: <a href="#tsid_modal" data-uk-modal> <i class="uk-icon-question-circle" data-uk-tooltip title="Click for help"></i> </a></label> <br/> |
|||
{{ form.teamspeak_id }} |
|||
<div id="tsid_modal" class="uk-modal"> |
|||
<div class="uk-modal-dialog"> |
|||
<a class="uk-modal-close uk-close"></a> |
|||
Enter your Teamspeak Unique Client ID into this field (note: this is NOT your Teamspeak name). You can access |
|||
your TSID as follows: |
|||
<br/> |
|||
<ol class=""> |
|||
<li>Click on the "Settings" menu at the top of your Teamspeak client</li> |
|||
<li>Select "Identities" from the drop-down menu.</li> |
|||
<li>Copy your "Unique ID"</li> |
|||
<li>Close this modal-window with the little X (upper right)</li> |
|||
<li>Paste your "Unique ID" into the <em>Teamspeak ID</em> field</li> |
|||
<br /><br /> |
|||
<img src="{{ url_for('static', filename='img/ts3-identities-menu.png') }}" /> |
|||
<br /> |
|||
<img src="{{ url_for('static', filename='img/ts3-identities-copy.png') }}" /> |
|||
</ol> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<h3 class="">Link Forum Board Account</h3> |
|||
{% if g.user.forum_id %} <span class="uk-text-success"><i class="uk-icon-check"></i> Already verified</span> {% endif %} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Forum Username:</label><br/> |
|||
{{ form.forum_username }} |
|||
</div> |
|||
<div class="uk-form-row"> |
|||
<label class="uk-form-label">Forum Password:</label><br/> |
|||
{{ form.forum_password }} |
|||
</div> |
|||
<div class="uk-form-controls uk-margin-top"> |
|||
<button class="uk-button uk-button-success" type="submit">Save</button> |
|||
<a class="uk-button" href="{{ url_for('user_profile', userid=g.user.id) }}">Cancel</a> |
|||
</div> |
|||
</fieldset> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
@ -0,0 +1,18 @@ |
|||
{% if active_events %} |
|||
<h1 class="uk-panel-title">Active Events</h1> |
|||
<dl class="uk-description-list uk-description-list-line"> |
|||
{% for event in active_events %} |
|||
<dt><a href="{{ url_for('show_event', eventid=event.id) }}">{{ event.name }}</a> {{ event.type | event_badge | safe }}</dt> |
|||
<dd> Ends at <span class="date">{{ event.start_time | js_datetime }}</span> </dd> |
|||
{% endfor %} |
|||
</dl> |
|||
{% endif %} |
|||
{% if upcoming_events %} |
|||
<h1 class="uk-panel-title">Upcoming Events</h1> |
|||
<dl class="uk-description-list uk-description-list-line"> |
|||
{% for event in upcoming_events %} |
|||
<dt><a href="{{ url_for('show_event', eventid=event.id) }}">{{ event.name }}</a> {{ event.type | event_badge | safe }}</dt> |
|||
<dd> Starts at <span class="date">{{ event.start_time | js_datetime }}</span> </dd> |
|||
{% endfor %} |
|||
</dl> |
|||
{% endif %} |
@ -0,0 +1,99 @@ |
|||
{% extends "layout.html" %} |
|||
|
|||
{% block title %}Events - DotaNoobs {% endblock %} |
|||
|
|||
{% block content %} |
|||
<div class="uk-grid" data-uk-grid-margin> |
|||
<div class="uk-width-1-1"> |
|||
<h2 class="">Events</h2> |
|||
</div> |
|||
<!--Main content area --> |
|||
<div class="uk-width-1-1 uk-panel"> |
|||
<ul class="uk-tab" data-uk-tab="{connect:'#events_table'}"> |
|||
<li class="uk-active"><a href="">Active</a></li> |
|||
<li><a href="">Upcoming</a></li> |
|||
<li><a href="">Expired</a></li> |
|||
</ul> |
|||
<ul id="events_table" class="uk-switcher uk-margin"> |
|||
<li> |
|||
<table class='uk-table uk-table-hover'> |
|||
<thead> |
|||
<th>Event</th> |
|||
<th>Type</th> |
|||
<th>Points</th> |
|||
<th>Starts</th> |
|||
<th>Ends</th> |
|||
</thead> |
|||
<tbody> |
|||
{% for event in active %} |
|||
<tr url="{{ url_for('show_event', eventid=event.id) }}"> |
|||
<td>{{ event.name }}</td> |
|||
<td>{{ event.type | event_badge | safe }}</td> |
|||
<td>{{ event.points }}</td> |
|||
<td class='date'>{{ event.start_time | js_datetime }}</td> |
|||
<td class='date'>{{ event.end_time | js_datetime }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
</table> |
|||
</li> |
|||
<li> |
|||
<table class='uk-table uk-table-hover'> |
|||
<thead> |
|||
<th>Event</th> |
|||
<th>Type</th> |
|||
<th>Points</th> |
|||
<th>Starts</th> |
|||
<th>Ends</th> |
|||
</thead> |
|||
<tbody> |
|||
{% for event in upcoming %} |
|||
<tr url="{{ url_for('show_event', eventid=event.id) }}"> |
|||
<td>{{ event.name }}</td> |
|||
<td>{{ event.type | event_badge | safe }}</td> |
|||
<td>{{ event.points }}</td> |
|||
<td class='date'>{{ event.start_time | js_datetime }}</td> |
|||
<td class='date'>{{ event.end_time | js_datetime }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
</table> |
|||
</li> |
|||
<li> |
|||
<table class='uk-table uk-table-hover'> |
|||
<thead> |
|||
<th>Event</th> |
|||
<th>Type</th> |
|||
<th>Points</th> |
|||
<th>Starts</th> |
|||
<th>Ends</th> |
|||
</thead> |
|||
<tbody> |
|||
{% for event in expired %} |
|||
<tr url="{{ url_for('show_event', eventid=event.id) }}"> |
|||
<td>{{ event.name }}</td> |
|||
<td>{{ event.type | event_badge | safe }}</td> |
|||
<td>{{ event.points }}</td> |
|||
<td class='date'>{{ event.start_time | js_datetime }}</td> |
|||
<td class='date'>{{ event.end_time | js_datetime }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
</table> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
|||
{% block pagescripts %} |
|||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.13.3/jquery.tablesorter.min.js"></script> |
|||
<script> |
|||
$(document).ready(function() { |
|||
$('#events_table table thead th').prepend("<i class='uk-icon-sort uk-display-inline'> </i>"); |
|||
$('#events_table table').tablesorter(); |
|||
$('#events_table table tbody tr').click(function() { |
|||
window.location = $(this).attr('url'); |
|||
}); |
|||
}); |
|||
</script> |
|||
{% endblock %} |
@ -0,0 +1,34 @@ |
|||
{% extends "layout.html" %} |
|||
|
|||
{% block title %}Profile - {{ user.nickname }}{% endblock %} |
|||
|
|||
{% block content %} |
|||
<div class="uk-grid" data-uk-grid-margin> |
|||
<div class="uk-width-2-3"> |
|||
<h2 class="uk-float-left"><img class="" src="{{ user.avatar }}" /> {{ user.nickname }}</h2> |
|||
</div> |
|||
<div class="uk-width-1-3 uk-text-center"> |
|||
</div> |
|||
<!--Main content area --> |
|||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel"> |
|||
<em>This user profile is set to private.</em> |
|||
</div> |
|||
<!-- Side bar --> |
|||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel uk-panel-box uk-panel-box-secondary"> |
|||
<div class="uk-container-center uk-text-center"> |
|||
<span class="uk-text-bold">Current Hero</span><br/> |
|||
<span>{{ user.random_hero['localized_name'] }}</span><br/> |
|||
<a href={{ url_for('user_random_hero', userid=user.id) }}> |
|||
<img src="{{ url_for('static', filename=hero_image_large(user.random_hero)) }}" class="dn-hero-icon" /><br/> |
|||
<span>View A-Z Progress</span> |
|||
</a> |
|||
</div> |
|||
<ul class="uk-list uk-list-space uk-list-striped uk-text-center"> |
|||
<li>Completed <span id='rands'>{{ user.random_heroes.completed | length }}</span> heroes in A-Z</li> |
|||
<li>Has <span id='points_total'>0</span> doobs points</li> |
|||
<li>Last seen at <span class='date'> {{ user.last_seen | js_datetime }}</span></li> |
|||
<li>Doob since <span class='date'> {{ user.created | js_datetime }}</span></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
@ -0,0 +1,53 @@ |
|||
{% extends "layout.html" %} |
|||
|
|||
{% block title %}Event - {{ event.name }}{% endblock %} |
|||
|
|||
{% block content %} |
|||
<div class="uk-grid" data-uk-grid-margin> |
|||
<div class="uk-width-2-3"> |
|||
<div class="uk-panel"> |
|||
<h2 class="uk-float-left uk-width-1-1">{{ event.name }}</h2> |
|||
Event Type: {{ event.type | event_badge | safe }} |
|||
</div> |
|||
</div> |
|||
<div class="uk-width-1-3 uk-text-center"> |
|||
{% if g.user.admin %} |
|||
<a class="uk-button" href="{{ url_for('event_edit', eventid=event.id) }}">Edit</a> |
|||
<a class="uk-button" href="{{ url_for('event_delete', eventid=event.id) }}">Delete</a> |
|||
{% endif %} |
|||
</div> |
|||
<!--Main content area --> |
|||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel"> |
|||
{% if event.desc == None %} |
|||
<em class="uk-text-danger">This event has no description.</em> |
|||
{% else %} |
|||
<em class="uk-text-bold">{{ event.desc }}</em> |
|||
{% endif %} |
|||
{% if g.user.admin %} <a href="{{ url_for('user_settings')}}"><i class="uk-icon-edit"></i></a>{% endif %} |
|||
</div> |
|||
<!-- Side bar --> |
|||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel"> |
|||
<table class="uk-table uk-table-striped uk-table-hover uk-text-right"> |
|||
<h2 class="uk-text-center">Information</h2> |
|||
<tbody> |
|||
<tr> |
|||
<td>This event is worth <span id='points'>{{ event.points }}</span> points a tick. </td> |
|||
<td><i class="uk-icon-money"></i></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Payout every <span id='reward'>{{ event.reward_threshold }}</span> minutes (1 tick). </td> |
|||
<td><i class="uk-icon-clock-o"></i></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Starting at <span class='date'>{{ event.start_time | js_datetime }}</span></td> |
|||
<td><i class="uk-icon-calendar"></i></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Ending at <span class='date'>{{ event.end_time | js_datetime }}</span></td> |
|||
<td><i class="uk-icon-warning"></i></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue