Indefero

Indefero Commit Details


Date:2012-04-27 08:54:08 (12 years 7 months ago)
Author:Simon Holywell
Branch:develop
Commit:e883f22790a2c1b95beb88c21e8db64861bce9c3
Parents: 2b5bf490a5def2acc1048f25c926629c78feb365
Message:Make date shortcut names and titles translatable

Changes:

File differences

src/IDF/Views/Issue.php
11171117
11181118
11191119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
11291136
11301137
11311138
public static function getDateShortcuts()
{
return array(
'date_today' => date('Y-m-d'),
'date_tomorrow' => date('Y-m-d', strtotime('tomorrow')),
'date_eow' => date('Y-m-d', strtotime('next friday')),
'date_eom' => date('Y-m-d', strtotime('last day of this month')),
'date_2_hours' => date('Y-m-d H:i', strtotime('+2 hours')),
'date_2_days' => date('Y-m-d', strtotime('+2 days')),
'date_1_week' => date('Y-m-d', strtotime('+1 week')),
'date_two_weeks' => date('Y-m-d', strtotime('+2 week')),
'date_one_month' => date('Y-m-d', strtotime('+1 month')),
'date_shortcuts' => array(
__('Soon') => array(
__('Today') => date('Y-m-d'),
__('Tomorrow') => date('Y-m-d', strtotime('tomorrow')),
__('2 Days') => date('Y-m-d', strtotime('+2 days')),
),
__('Midterm') => array(
__('Friday') => date('Y-m-d', strtotime('next friday')),
__('1 Week') => date('Y-m-d', strtotime('+1 week')),
__('A Fortnight') => date('Y-m-d', strtotime('+2 week')),
),
__('Longterm') => array(
__('End of the Month') => date('Y-m-d', strtotime('last day of this month')),
__('1 Month') => date('Y-m-d', strtotime('+1 month')),
),
),
);
}
}
src/IDF/templates/idf/issues/create.html
6767
6868
6969
70
70
71
7172
72
73
74
75
76
77
78
79
80
81
82
83
84
73
74
75
76
77
78
8579
80
8681
8782
8883
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
<div id="due_dtime_wrapper">
<a href="#" id="due_dtime_shortcut_link">Date shortcuts&hellip; ▾</a>
<a href="#" id="due_dtime_shortcut_link">Date shortcuts&hellip; ▾</a>
{if $date_shortcuts}
<dl id="due_dtime_more_shortcuts" style="display: none">
<dt>Soon</dt>
<dd><a href="#" rel="{$date_today}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a></dd>
<dd><a href="#" rel="{$date_tomorrow}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a></dd>
<dd><a href="#" rel="{$date_2_days}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a></dd>
<dt>Midterm</dt>
<dd><a href="#" rel="{$date_eow}" class="due_dtime_shortcut" id="due_dtime_eow">End of the Week</a></dd>
<dd><a href="#" rel="{$date_1_week}" class="due_dtime_shortcut" id="due_dtime_1_week">1 Week</a></dd>
<dd><a href="#" rel="{$date_two_weeks}" class="due_dtime_shortcut" id="due_dtime_two_weeks">A Fortnight</a></dd>
<dt>Longterm</dt>
<dd><a href="#" rel="{$date_eom}" class="due_dtime_shortcut" id="due_dtime_eom">End of the Month</a></dd>
<dd><a href="#" rel="{$date_one_month}" class="due_dtime_shortcut" id="due_dtime_one_month">1 Month</a></dd>
{foreach $date_shortcuts as $time_span => $shortcuts}
<dt>{$time_span}</dt>
{foreach $shortcuts as $title => $date}
<dd><a href="#" rel="{$date}" class="due_dtime_shortcut">{$title}</a></dd>
{/foreach}
{/foreach}
</dl>
{/if}
</div>
</td>
<tr>
src/IDF/templates/idf/issues/view.html
132132
133133
134134
135
135
136
136137
137
138
139
140
141
142
143
144
145
146
147
148
149
138
139
140
141
142
143
150144
145
151146
152147
153148
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
<div id="due_dtime_wrapper">
<a href="#" id="due_dtime_shortcut_link">Date shortcuts&hellip; ▾</a>
<a href="#" id="due_dtime_shortcut_link">Date shortcuts&hellip; ▾</a>
{if $date_shortcuts}
<dl id="due_dtime_more_shortcuts" style="display: none">
<dt>Soon</dt>
<dd><a href="#" rel="{$date_today}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a></dd>
<dd><a href="#" rel="{$date_tomorrow}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a></dd>
<dd><a href="#" rel="{$date_2_days}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a></dd>
<dt>Midterm</dt>
<dd><a href="#" rel="{$date_eow}" class="due_dtime_shortcut" id="due_dtime_eow">End of the Week</a></dd>
<dd><a href="#" rel="{$date_1_week}" class="due_dtime_shortcut" id="due_dtime_1_week">1 Week</a></dd>
<dd><a href="#" rel="{$date_two_weeks}" class="due_dtime_shortcut" id="due_dtime_two_weeks">A Fortnight</a></dd>
<dt>Longterm</dt>
<dd><a href="#" rel="{$date_eom}" class="due_dtime_shortcut" id="due_dtime_eom">End of the Month</a></dd>
<dd><a href="#" rel="{$date_one_month}" class="due_dtime_shortcut" id="due_dtime_one_month">1 Month</a></dd>
{foreach $date_shortcuts as $time_span => $shortcuts}
<dt>{$time_span}</dt>
{foreach $shortcuts as $title => $date}
<dd><a href="#" rel="{$date}" class="due_dtime_shortcut">{$title}</a></dd>
{/foreach}
{/foreach}
</dl>
{/if}
</div>
</td>
<tr>

Archive Download the corresponding diff file

Page rendered in 0.09394s using 13 queries.