Differential D20276 Diff 48413 src/applications/project/order/PhabricatorProjectColumnPointsOrder.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/order/PhabricatorProjectColumnPointsOrder.php
- This file was added.
<?php | |||||
final class PhabricatorProjectColumnPointsOrder | |||||
extends PhabricatorProjectColumnOrder { | |||||
const ORDERKEY = 'points'; | |||||
public function getDisplayName() { | |||||
return pht('Sort by Points'); | |||||
} | |||||
protected function newMenuIconIcon() { | |||||
return 'fa-map-pin'; | |||||
} | |||||
amckinley: `fa-ellipsis-h`? `fa-cubes`? `fa-exclamation-circle`? `fa-map-pin`? I think I like `fa-map… | |||||
public function isEnabled() { | |||||
return ManiphestTaskPoints::getIsEnabled(); | |||||
} | |||||
public function getHasHeaders() { | |||||
return false; | |||||
} | |||||
public function getCanReorder() { | |||||
return false; | |||||
} | |||||
public function getMenuOrder() { | |||||
return 4000; | |||||
} | |||||
protected function newSortVectorForObject($object) { | |||||
$points = $object->getPoints(); | |||||
// Put cards with no points on top. | |||||
$has_points = ($points !== null); | |||||
if (!$has_points) { | |||||
Not Done Inline ActionsIs this to call out, uh, "pointless" tasks to encourage someone to assign some points to them? amckinley: Is this to call out, uh, "pointless" tasks to encourage someone to assign some points to them? | |||||
Done Inline ActionsYeah, similar to how "Unowned" tasks are on top and "Needs Triage" is the highest priority. epriestley: Yeah, similar to how "Unowned" tasks are on top and "Needs Triage" is the highest priority. | |||||
$overall_order = 0; | |||||
} else { | |||||
$overall_order = 1; | |||||
} | |||||
return array( | |||||
$overall_order, | |||||
-(double)$points, | |||||
-(int)$object->getID(), | |||||
); | |||||
} | |||||
} |
fa-ellipsis-h? fa-cubes? fa-exclamation-circle? fa-map-pin? I think I like fa-map-pin the best. This concludes today's bike shedding.