mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Fix some easy phutil_render_tag()
Summary: - Grepped for phutil_render_tag(). - Fixed some easy ones. Test Plan: - Browsed around; site didn't seem more broken than it was before. Reviewers: vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D4638
This commit is contained in:
parent
9670f0c636
commit
3e147dd61c
15 changed files with 82 additions and 75 deletions
|
@ -166,14 +166,12 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
}
|
||||
|
||||
private function getNoConpherencesBlock() {
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'no-conpherences-menu-item'
|
||||
),
|
||||
pht('No more conpherences.')
|
||||
);
|
||||
pht('No more conpherences.'));
|
||||
}
|
||||
|
||||
public function buildApplicationMenu() {
|
||||
|
|
|
@ -69,50 +69,48 @@ final class ConpherenceListController extends
|
|||
|
||||
private function renderEmptyMainPane() {
|
||||
$this->initJavelinBehaviors();
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => 'conpherence-main-pane'
|
||||
),
|
||||
phutil_render_tag(
|
||||
array(
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'conpherence-header-pane',
|
||||
'id' => 'conpherence-header-pane',
|
||||
),
|
||||
''
|
||||
).
|
||||
phutil_render_tag(
|
||||
''),
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'conpherence-widget-pane',
|
||||
'id' => 'conpherence-widget-pane'
|
||||
),
|
||||
''
|
||||
).
|
||||
javelin_render_tag(
|
||||
''),
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'conpherence-message-pane',
|
||||
'id' => 'conpherence-message-pane'
|
||||
),
|
||||
phutil_render_tag(
|
||||
array(
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'conpherence-messages',
|
||||
'id' => 'conpherence-messages'
|
||||
),
|
||||
''
|
||||
).
|
||||
phutil_render_tag(
|
||||
''),
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => 'conpherence-form'
|
||||
),
|
||||
''
|
||||
)
|
||||
)
|
||||
);
|
||||
''),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,10 +92,10 @@ final class ConpherenceNewController extends ConpherenceController {
|
|||
->setTitle('Success')
|
||||
->addCancelButton('#', 'Okay')
|
||||
->appendChild(
|
||||
phutil_render_tag('p',
|
||||
phutil_tag(
|
||||
'p',
|
||||
array(),
|
||||
pht('Message sent successfully.')
|
||||
)
|
||||
pht('Message sent successfully.'))
|
||||
);
|
||||
$response = id(new AphrontDialogResponse())
|
||||
->setDialog($dialog);
|
||||
|
|
|
@ -182,7 +182,7 @@ final class ConpherenceUpdateController extends
|
|||
->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel(pht('Image'))
|
||||
->setValue(phutil_render_tag(
|
||||
->setValue(phutil_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => $conpherence->loadImageURI(),
|
||||
|
|
|
@ -85,7 +85,7 @@ final class ConpherenceMenuItemView extends AphrontTagView {
|
|||
protected function getTagContent() {
|
||||
$image = null;
|
||||
if ($this->imageURI) {
|
||||
$image = phutil_render_tag(
|
||||
$image = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-image',
|
||||
|
@ -95,34 +95,34 @@ final class ConpherenceMenuItemView extends AphrontTagView {
|
|||
}
|
||||
$title = null;
|
||||
if ($this->title) {
|
||||
$title = phutil_render_tag(
|
||||
$title = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-title',
|
||||
),
|
||||
phutil_escape_html($this->title));
|
||||
$this->title);
|
||||
}
|
||||
$subtitle = null;
|
||||
if ($this->subtitle) {
|
||||
$subtitle = phutil_render_tag(
|
||||
$subtitle = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-subtitle',
|
||||
),
|
||||
phutil_escape_html($this->subtitle));
|
||||
$this->subtitle);
|
||||
}
|
||||
$message = null;
|
||||
if ($this->messageText) {
|
||||
$message = phutil_render_tag(
|
||||
$message = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-message-text'
|
||||
),
|
||||
phutil_escape_html($this->messageText));
|
||||
$this->messageText);
|
||||
}
|
||||
$epoch = null;
|
||||
if ($this->epoch) {
|
||||
$epoch = phutil_render_tag(
|
||||
$epoch = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-date',
|
||||
|
@ -131,12 +131,12 @@ final class ConpherenceMenuItemView extends AphrontTagView {
|
|||
}
|
||||
$unread_count = null;
|
||||
if ($this->unreadCount) {
|
||||
$unread_count = phutil_render_tag(
|
||||
$unread_count = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'conpherence-menu-item-unread-count'
|
||||
),
|
||||
$this->unreadCount);
|
||||
(int)$this->unreadCount);
|
||||
}
|
||||
|
||||
return $image.$title.$subtitle.$message.$epoch.$unread_count;
|
||||
|
|
|
@ -47,12 +47,11 @@ final class ConpherenceTransactionView extends AphrontView {
|
|||
case ConpherenceTransactionType::TYPE_PICTURE:
|
||||
$img = $transaction->getHandle($transaction->getNewValue());
|
||||
$content = $transaction->getTitle() .
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => $img->getImageURI()
|
||||
)
|
||||
);
|
||||
));
|
||||
$transaction_view->addClass('conpherence-edited');
|
||||
break;
|
||||
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
|
||||
|
|
|
@ -23,13 +23,13 @@ final class PhabricatorCountdownViewController
|
|||
|
||||
$chrome_visible = $request->getBool('chrome', true);
|
||||
$chrome_new = $chrome_visible ? false : null;
|
||||
$chrome_link = phutil_render_tag(
|
||||
$chrome_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request->getRequestURI()->alter('chrome', $chrome_new),
|
||||
'class' => 'phabricator-timer-chrome-link',
|
||||
),
|
||||
$chrome_visible ? 'Disable Chrome' : 'Enable Chrome');
|
||||
$chrome_visible ? pht('Disable Chrome') : pht('Enable Chrome'));
|
||||
|
||||
$container = celerity_generate_unique_node_id();
|
||||
$content =
|
||||
|
|
|
@ -39,7 +39,7 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
$application->getName());
|
||||
|
||||
if ($application->isBeta()) {
|
||||
$content[] = phutil_render_tag(
|
||||
$content[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-beta',
|
||||
|
@ -97,13 +97,13 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
$classes[] = 'phabricator-application-create-icon';
|
||||
$classes[] = 'sprite-icon';
|
||||
$classes[] = 'action-new-grey';
|
||||
$plus_icon = phutil_render_tag(
|
||||
$plus_icon = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => implode(' ', $classes),
|
||||
));
|
||||
|
||||
$create_button = phutil_render_tag(
|
||||
$create_button = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $application->getQuickCreateURI(),
|
||||
|
|
|
@ -21,7 +21,7 @@ final class PholioMockImagesView extends AphrontView {
|
|||
"phid=%s",
|
||||
$image->getFilePHID());
|
||||
|
||||
$image_tag = phutil_render_tag(
|
||||
$image_tag = phutil_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => $file->getBestURI(),
|
||||
|
@ -29,7 +29,7 @@ final class PholioMockImagesView extends AphrontView {
|
|||
),
|
||||
'');
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'pholio-mock-image-container',
|
||||
|
|
|
@ -28,12 +28,18 @@ final class PhabricatorRepositoryDeleteController
|
|||
phutil_escape_html($repository->getCallsign());
|
||||
$text_2 = pht('Repositories touch many objects and as such deletes are '.
|
||||
'prohibitively expensive to run from the web UI.');
|
||||
$body = phutil_render_tag(
|
||||
$body = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-remarkup',
|
||||
),
|
||||
'<p>'.$text_1.'</p><p><tt>'.$command.'</tt></p><p>'.$text_2.'</p>');
|
||||
array(
|
||||
phutil_tag('p', array(), $text_1),
|
||||
phutil_tag('p', array(),
|
||||
phutil_tag('tt', array(), $command)),
|
||||
phutil_tag('p', array(), $text_2),
|
||||
));
|
||||
|
||||
$dialog
|
||||
->setUser($request->getUser())
|
||||
->setTitle(pht('Really want to delete the repository?'))
|
||||
|
|
|
@ -68,16 +68,18 @@ final class PhabricatorInlineSummaryView extends AphrontView {
|
|||
$tail = null;
|
||||
}
|
||||
|
||||
$lines = phutil_escape_html($lines);
|
||||
if ($href) {
|
||||
$lines = phutil_render_tag(
|
||||
$lines = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'target' => $target,
|
||||
'class' => 'num',
|
||||
),
|
||||
$lines.$tail);
|
||||
array(
|
||||
$lines,
|
||||
$tail,
|
||||
));
|
||||
}
|
||||
|
||||
$where = idx($item, 'where');
|
||||
|
|
|
@ -30,7 +30,7 @@ final class PhabricatorRemarkupRuleMeme
|
|||
->alter('uppertext', $options['above'])
|
||||
->alter('lowertext', $options['below']);
|
||||
|
||||
$img = phutil_render_tag(
|
||||
$img = phutil_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => (string)$uri,
|
||||
|
|
|
@ -188,13 +188,17 @@ final class AphrontTableView extends AphrontView {
|
|||
),
|
||||
'');
|
||||
|
||||
$header = phutil_render_tag(
|
||||
$header = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->sortURI->alter($this->sortParam, $sort_value),
|
||||
'class' => 'aphront-table-view-sort-link',
|
||||
),
|
||||
$header.' '.$sort_glyph);
|
||||
array(
|
||||
$header,
|
||||
' ',
|
||||
$sort_glyph,
|
||||
));
|
||||
}
|
||||
|
||||
if ($classes) {
|
||||
|
@ -204,7 +208,7 @@ final class AphrontTableView extends AphrontView {
|
|||
}
|
||||
|
||||
if ($short_headers[$col_num] !== null) {
|
||||
$header_nodevice = phutil_render_tag(
|
||||
$header_nodevice = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'aphront-table-view-nodevice',
|
||||
|
|
|
@ -91,7 +91,7 @@ final class PhabricatorObjectSelectorDialog {
|
|||
|
||||
$options = array();
|
||||
foreach ($this->filters as $key => $label) {
|
||||
$options[] = phutil_render_tag(
|
||||
$options[] = phutil_tag(
|
||||
'option',
|
||||
array(
|
||||
'value' => $key,
|
||||
|
|
|
@ -249,12 +249,12 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
if ($user && $user->getIsAdmin()) {
|
||||
$open = PhabricatorSetupCheck::getOpenSetupIssueCount();
|
||||
if ($open) {
|
||||
$setup_warning = phutil_render_tag(
|
||||
$setup_warning = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'setup-warning-callout',
|
||||
),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/config/issue/',
|
||||
|
|
Loading…
Reference in a new issue