Make date shortcut names and titles translatable
This commit is contained in:
parent
2b5bf490a5
commit
e883f22790
@ -1117,15 +1117,22 @@ class IDF_Views_Issue
|
|||||||
public static function getDateShortcuts()
|
public static function getDateShortcuts()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'date_today' => date('Y-m-d'),
|
'date_shortcuts' => array(
|
||||||
'date_tomorrow' => date('Y-m-d', strtotime('tomorrow')),
|
__('Soon') => array(
|
||||||
'date_eow' => date('Y-m-d', strtotime('next friday')),
|
__('Today') => date('Y-m-d'),
|
||||||
'date_eom' => date('Y-m-d', strtotime('last day of this month')),
|
__('Tomorrow') => date('Y-m-d', strtotime('tomorrow')),
|
||||||
'date_2_hours' => date('Y-m-d H:i', strtotime('+2 hours')),
|
__('2 Days') => date('Y-m-d', strtotime('+2 days')),
|
||||||
'date_2_days' => date('Y-m-d', strtotime('+2 days')),
|
),
|
||||||
'date_1_week' => date('Y-m-d', strtotime('+1 week')),
|
__('Midterm') => array(
|
||||||
'date_two_weeks' => date('Y-m-d', strtotime('+2 week')),
|
__('Friday') => date('Y-m-d', strtotime('next friday')),
|
||||||
'date_one_month' => date('Y-m-d', strtotime('+1 month')),
|
__('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')),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,21 +68,16 @@
|
|||||||
{$form.f.due_dtime|unsafe}
|
{$form.f.due_dtime|unsafe}
|
||||||
<div id="due_dtime_wrapper">
|
<div id="due_dtime_wrapper">
|
||||||
<a href="#" id="due_dtime_shortcut_link">Date shortcuts… ▾</a>
|
<a href="#" id="due_dtime_shortcut_link">Date shortcuts… ▾</a>
|
||||||
|
{if $date_shortcuts}
|
||||||
<dl id="due_dtime_more_shortcuts" style="display: none">
|
<dl id="due_dtime_more_shortcuts" style="display: none">
|
||||||
<dt>Soon</dt>
|
{foreach $date_shortcuts as $time_span => $shortcuts}
|
||||||
<dd><a href="#" rel="{$date_today}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a></dd>
|
<dt>{$time_span}</dt>
|
||||||
<dd><a href="#" rel="{$date_tomorrow}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a></dd>
|
{foreach $shortcuts as $title => $date}
|
||||||
<dd><a href="#" rel="{$date_2_days}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a></dd>
|
<dd><a href="#" rel="{$date}" class="due_dtime_shortcut">{$title}</a></dd>
|
||||||
|
{/foreach}
|
||||||
<dt>Midterm</dt>
|
{/foreach}
|
||||||
<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>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -133,21 +133,16 @@
|
|||||||
{$form.f.due_dtime|unsafe}
|
{$form.f.due_dtime|unsafe}
|
||||||
<div id="due_dtime_wrapper">
|
<div id="due_dtime_wrapper">
|
||||||
<a href="#" id="due_dtime_shortcut_link">Date shortcuts… ▾</a>
|
<a href="#" id="due_dtime_shortcut_link">Date shortcuts… ▾</a>
|
||||||
|
{if $date_shortcuts}
|
||||||
<dl id="due_dtime_more_shortcuts" style="display: none">
|
<dl id="due_dtime_more_shortcuts" style="display: none">
|
||||||
<dt>Soon</dt>
|
{foreach $date_shortcuts as $time_span => $shortcuts}
|
||||||
<dd><a href="#" rel="{$date_today}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a></dd>
|
<dt>{$time_span}</dt>
|
||||||
<dd><a href="#" rel="{$date_tomorrow}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a></dd>
|
{foreach $shortcuts as $title => $date}
|
||||||
<dd><a href="#" rel="{$date_2_days}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a></dd>
|
<dd><a href="#" rel="{$date}" class="due_dtime_shortcut">{$title}</a></dd>
|
||||||
|
{/foreach}
|
||||||
<dt>Midterm</dt>
|
{/foreach}
|
||||||
<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>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user