Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2984) * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 1 - Adding an event * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 2 - Editing an event * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 3 - Moving event * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 4 - Viewing an event * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 5 - Day view * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 6 - Week view * Working on #2972 Template Conversion to Twig Format (calendar.php) Part 7 - Calendar * Moved gobutton to inline * Code updates -Added selected and checked HTML to templates -Move day select options to array * More code updates - Moved month select options to array - Split bottom calendar jump/month jump into seperate Twig file - Converted user stars to Twig
- Loading branch information
1 parent
e0d9afc
commit d398853
Showing
10 changed files
with
2,375 additions
and
1,662 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{% extends 'layouts/master.twig' %} | ||
|
||
{% block head %} | ||
<title>{{ mybb.settings.bbname }} - {{ lang.calendar }}</title> | ||
{% endblock head %} | ||
|
||
{% block body %} | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<thead> | ||
<tr> | ||
<td class="thead" colspan="8"> | ||
<div class="float_right"> | ||
{% if calendar.prev_link %} | ||
<a href="{{ calendar.prev_link|raw }}">« {{ calendar.prev_month_name }} {{ calendar.prev_month_year }}</a> | ||
{% endif %} | ||
{% if calendar.sep %} | ||
| | ||
{% endif %} | ||
{% if calendar.next_link %} | ||
<a href="{{ calendar.next_link|raw }}">{{ calendar.next_month_name }} {{ calendar.next_month_year }} »</a> | ||
{% endif %} | ||
</div> | ||
<div><strong>{{ calendar.currentmonth }} {{ calendar.year }}</strong></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="tcat"> </td> | ||
{% for weekday in weekday_headers %} | ||
<td class="tcat" align="center" width="14%"><strong>{{ weekday }}</strong></td> | ||
{% endfor %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for week in weeks %} | ||
<tr> | ||
<td class="tcat" align="center" width="1"><a href="{{ week.week_link|raw }}">»</a></td> | ||
{% for day in week.days %} | ||
<td class="{{ day.day_class }}" style="vertical-align: top; height: 100px;"> | ||
<div class="float_right smalltext"><a href="{{ day.day_link|raw }}">{{ day.day }}</a></div> | ||
<div class="clear"> | ||
{% if day.bday_count > 0 %} | ||
<div style="margin-bottom: 4px;"><a href="{{ day.calendar_link|raw }}" class="smalltext">{{ day.bday_count }} {{ day.birthday_lang }}</a></div> | ||
{% endif %} | ||
{% if day.eventlimit == true %} | ||
<div style="margin-bottom: 4px;"><a href="{{ calendar.link }}" class="smalltext">{{ day_bit.total_events }} {{ day_bit.event_lang }}</a></div> | ||
{% else %} | ||
{% for event in day.events %} | ||
<div style="margin-bottom: 4px;" class="smalltext {{ event.event_class }}"><a href="{{ event.eventlink|raw }}" title="{{ event.fullname }}">{{ event.name }}</a></div> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
</td> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<br /> | ||
<form action="calendar.php" method="post"> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="trow1"> | ||
<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||
<tr> | ||
<td valign="top"> | ||
{% if calendar_permissions.canaddevents %} | ||
<a href="calendar.php?action=addevent&calendar={{ calendar.cid }}">{{ lang.add_public_event }}</a> | <a href="calendar.php?action=addevent&calendar={{ calendar.cid }}&private=1">{{ lang.add_private_event }}</a> | ||
{% endif %} | ||
</td> | ||
{% include 'calendar/calendar_select.twig' %} | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<td align="right"> | ||
<span class="smalltext"><strong>{{ lang.jump_month }}</strong></span> | ||
<select name="month"> | ||
<option value="{{ calendar.month }}">{{ calendar.currentmonth }}</option> | ||
<option value="{{ calendar.month }}">----------</option> | ||
<option value="1">{{ lang.alt_month_1 }}</option> | ||
<option value="2">{{ lang.alt_month_2 }}</option> | ||
<option value="3">{{ lang.alt_month_3 }}</option> | ||
<option value="4">{{ lang.alt_month_4 }}</option> | ||
<option value="5">{{ lang.alt_month_5 }}</option> | ||
<option value="6">{{ lang.alt_month_6 }}</option> | ||
<option value="7">{{ lang.alt_month_7 }}</option> | ||
<option value="8">{{ lang.alt_month_8 }}</option> | ||
<option value="9">{{ lang.alt_month_9 }}</option> | ||
<option value="10">{{ lang.alt_month_10 }}</option> | ||
<option value="11">{{ lang.alt_month_11 }}</option> | ||
<option value="12">{{ lang.alt_month_12 }}</option> | ||
</select> | ||
<select name="year"> | ||
<option value="{{ calendar.year }}">{{ calendar.year }}</option> | ||
<option value="{{ calendar.year }}">----------</option> | ||
{% for year in years %} | ||
<option value="{{ year }}">{{ year }}</option> | ||
{% endfor %} | ||
</select> | ||
<input type="submit" class="button" value="{{ lang.go }}" /> | ||
<br /> | ||
{{ calendar_jump|raw }} | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{% extends 'layouts/master.twig' %} | ||
|
||
{% block head %} | ||
<title>{{ mybb.settings.bbname }} - {{ lang.calendar }}</title> | ||
{% endblock head %} | ||
|
||
{% block body %} | ||
{% if birthdaycount > 0 %} | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="thead"><strong>{{ trans('birthdays_on_day', calendar.bdaydate) }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1"> | ||
<span class="smalltext"> | ||
{% for birthday in birthdays %} | ||
{{ birthday.comma }}{{ birthday.profilelink|raw }}{{ birthday.age }} | ||
{% endfor %} | ||
{% if bdayhidden > 0 %} | ||
{{ calendar.hiddendash }}{{ bdayhidden }} {{ lang.birthdayhidden }} | ||
{% endif %} | ||
</span> | ||
</td> | ||
</tr> | ||
</table> | ||
<br /> | ||
{% endif %} | ||
{% for event in events %} | ||
{% include 'calendar/event_row.twig' %} | ||
{% else %} | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="trow1">{{ lang.no_events|raw }}</td> | ||
</tr> | ||
</table> | ||
{% endfor %} | ||
<br /> | ||
<form action="calendar.php" method="post"> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="trow1"> | ||
<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||
<tr> | ||
<td valign="top"> | ||
{% if calendar_permissions.canaddevents %} | ||
<a href="calendar.php?action=addevent&calendar={{ calendar.cid }}">{{ lang.add_public_event }}</a> | <a href="calendar.php?action=addevent&calendar={{ calendar.cid }}&private=1">{{ lang.add_private_event }}</a> | ||
{% endif %} | ||
</td> | ||
{% include 'calendar/calendar_select.twig' %} | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
{% endblock body %} |
Oops, something went wrong.