2011-04-14 00:15:48 +02:00
|
|
|
<?php
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
final class PhabricatorApplicationMacro extends PhabricatorApplication {
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getBaseURI() {
|
|
|
|
return '/macro/';
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getShortDescription() {
|
2013-01-24 04:36:23 +01:00
|
|
|
return pht('Image Macros and Memes');
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
Use application icons for "Eye" menu and Crumbs
Summary:
Issues here:
- Need an application-sized "eye", or a "home" icon for "Phabricator Home".
- Some of the "apps_lb_2x" sliced images are the "_dark_" versions, not the light versions.
- If you slice an application-sized "logout" (power off) icon and application-sized "help" (questionmark in circle) icon I can replace the current menu icons and nearly get rid of "autosprite".
- To replace the icons on /applications/, the non-retina size is "4x", so we'd need "8x" for retina. Alternatively I can reduce the icon sizes by 50%.
- The "Help", "Settings" and "Logout" items currently have a "glowing" hover state, which needs a variant (or we can drop it).
- The /applications/ icons have a white hover state (or we can drop it).
- The 1x application (14x14) icons aren't used anywhere right now, should they be? Maybe in the feed in the future, etc?
- The "apps-2x" and "apps-large" sheets are the same image, but getting them to actually use the same file is a bit tricky, so I just left them separate for now.
Test Plan:
{F26698}
{F26699}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T1960
Differential Revision: https://secure.phabricator.com/D4108
2012-12-07 22:37:28 +01:00
|
|
|
public function getIconName() {
|
2012-10-01 23:04:03 +02:00
|
|
|
return 'macro';
|
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x9A\x98";
|
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-04 00:46:19 +02:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/macro/' => array(
|
Adding some filters and queries to Macro application
Summary:
Fixes T2778
Introduces `PhabricatorMacroQuery`, which should consolidate all queries regarding macros
Adds `PolicyInterface` to `PhabricatorImageMacro`, as else the query would fail (we should consider adding it to the ApplicationTransaction instead, if that was ever planned)
Adds `Active Macros` filter, making it the default
Adds `My Macros` filter. You may ask why it overwrites `$authors`. Well, I did not want the page jump to the conclusion that it is a search result. It //is// one more or less, but the filter would jump to `seach` instead of `my`. If you want `My Macros` removed, tell me. It is useful only to heavy-macro-uploaders-and-users though. Five or six people in `http://secure.phabricator.(org|com)`, and an estimated dozen and a half at bigger installs.
Test Plan: created multiple macros from multiple authors, disabled them at will. browsed around, verified that Macros only appeared in the right filters and that nothing else broke.
Reviewers: epriestley, chad, btrahan
CC: aran, Korvin
Maniphest Tasks: T2778
Differential Revision: https://secure.phabricator.com/D5409
2013-03-22 17:46:21 +01:00
|
|
|
'((?P<filter>all|active|my)/)?' => 'PhabricatorMacroListController',
|
Modernize Macro application
Summary: Adds feed, email, notifications, comments, partial editing, subscriptions, enable/disable, flags and crumbs to Macro.
Test Plan:
{F26839}
{F26840}
{F26841}
{F26842}
{F26843}
{F26844}
{F26845}
Reviewers: vrana, btrahan, chad
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2157, T175, T2104
Differential Revision: https://secure.phabricator.com/D4141
2012-12-11 23:01:03 +01:00
|
|
|
'create/' => 'PhabricatorMacroEditController',
|
|
|
|
'view/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroViewController',
|
|
|
|
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroCommentController',
|
|
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroEditController',
|
|
|
|
'disable/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroDisableController',
|
2013-01-20 03:43:35 +01:00
|
|
|
'meme/' => 'PhabricatorMacroMemeController',
|
2013-01-22 03:46:04 +01:00
|
|
|
'meme/create/' => 'PhabricatorMacroMemeDialogController',
|
2012-10-01 23:04:03 +02:00
|
|
|
),
|
|
|
|
);
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|