mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Merge branch 'master' into redesign-2015
This commit is contained in:
commit
3d075b5b0e
5 changed files with 75 additions and 7 deletions
|
@ -341,10 +341,10 @@ final class PhabricatorCalendarEventEditController
|
|||
$recurrence_frequency_select = id(new AphrontFormSelectControl())
|
||||
->setName('frequency')
|
||||
->setOptions(array(
|
||||
'daily' => pht('Daily'),
|
||||
'weekly' => pht('Weekly'),
|
||||
'monthly' => pht('Monthly'),
|
||||
'yearly' => pht('Yearly'),
|
||||
PhabricatorCalendarEvent::FREQUENCY_DAILY => pht('Daily'),
|
||||
PhabricatorCalendarEvent::FREQUENCY_WEEKLY => pht('Weekly'),
|
||||
PhabricatorCalendarEvent::FREQUENCY_MONTHLY => pht('Monthly'),
|
||||
PhabricatorCalendarEvent::FREQUENCY_YEARLY => pht('Yearly'),
|
||||
))
|
||||
->setValue($frequency)
|
||||
->setLabel(pht('Recurring Event Frequency'))
|
||||
|
|
|
@ -37,6 +37,12 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
private $invitees = self::ATTACHABLE;
|
||||
private $appliedViewer;
|
||||
|
||||
// Frequency Constants
|
||||
const FREQUENCY_DAILY = 'daily';
|
||||
const FREQUENCY_WEEKLY = 'weekly';
|
||||
const FREQUENCY_MONTHLY = 'monthly';
|
||||
const FREQUENCY_YEARLY = 'yearly';
|
||||
|
||||
public static function initializeNewCalendarEvent(
|
||||
PhabricatorUser $actor,
|
||||
$mode) {
|
||||
|
|
|
@ -254,11 +254,37 @@ final class PhabricatorCalendarEventTransaction
|
|||
}
|
||||
return $text;
|
||||
case self::TYPE_RECURRING:
|
||||
$text = pht('%s made this event recurring.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
return $text;
|
||||
case self::TYPE_FREQUENCY:
|
||||
$text = '';
|
||||
switch ($new['rule']) {
|
||||
case PhabricatorCalendarEvent::FREQUENCY_DAILY:
|
||||
$text = pht('%s set this event to repeat daily.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_WEEKLY:
|
||||
$text = pht('%s set this event to repeat weekly.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_MONTHLY:
|
||||
$text = pht('%s set this event to repeat monthly.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_YEARLY:
|
||||
$text = pht('%s set this event to repeat yearly.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
break;
|
||||
}
|
||||
return $text;
|
||||
case self::TYPE_RECURRENCE_END_DATE:
|
||||
$text = pht('%s has changed the recurrence end date of this event.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
return $text;
|
||||
case self::TYPE_INSTANCE_OF_EVENT:
|
||||
case self::TYPE_SEQUENCE_INDEX:
|
||||
return pht('Recurring event has been updated');
|
||||
return pht('Recurring event has been updated.');
|
||||
}
|
||||
return parent::getTitle();
|
||||
}
|
||||
|
@ -438,11 +464,44 @@ final class PhabricatorCalendarEventTransaction
|
|||
}
|
||||
return $text;
|
||||
case self::TYPE_RECURRING:
|
||||
$text = pht('%s made %s a recurring event.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
return $text;
|
||||
case self::TYPE_FREQUENCY:
|
||||
$text = '';
|
||||
switch ($new['rule']) {
|
||||
case PhabricatorCalendarEvent::FREQUENCY_DAILY:
|
||||
$text = pht('%s set %s to repeat daily.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_WEEKLY:
|
||||
$text = pht('%s set %s to repeat weekly.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_MONTHLY:
|
||||
$text = pht('%s set %s to repeat monthly.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
break;
|
||||
case PhabricatorCalendarEvent::FREQUENCY_YEARLY:
|
||||
$text = pht('%s set %s to repeat yearly.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
break;
|
||||
}
|
||||
return $text;
|
||||
case self::TYPE_RECURRENCE_END_DATE:
|
||||
$text = pht('%s set the recurrence end date of %s to %s.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid),
|
||||
$new);
|
||||
return $text;
|
||||
case self::TYPE_INSTANCE_OF_EVENT:
|
||||
case self::TYPE_SEQUENCE_INDEX:
|
||||
return pht('Recurring event has been updated');
|
||||
return pht('Recurring event has been updated.');
|
||||
}
|
||||
|
||||
return parent::getTitleForFeed();
|
||||
|
|
|
@ -299,6 +299,10 @@ final class DivinerAtomController extends DivinerController {
|
|||
PHUIPropertyListView $view,
|
||||
DivinerLiveSymbol $symbol) {
|
||||
|
||||
if (!$symbol->getRepositoryPHID()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$view->addProperty(
|
||||
pht('Repository'),
|
||||
$this->getViewer()->renderHandle($symbol->getRepositoryPHID()));
|
||||
|
|
|
@ -180,4 +180,3 @@ them to get it working.
|
|||
- @{article:Arcanist User Guide: Customizing Existing Linters}
|
||||
- @{article:Arcanist User Guide: Customizing Lint, Unit Tests and Workflows}
|
||||
- @{article:Arcanist User Guide: Code Coverage}
|
||||
- @{article:Arcanist User Guide: Repository Hooks}
|
||||
|
|
Loading…
Reference in a new issue