1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-28 12:08:14 +01:00

Phriction - kill tabs

Summary:
...except that pesky help tab which remains.

Pertinent bits here...
- move "History" into button "View History" that is grey and next to "Edit Page"
- for history page, add breadcrumb similar to the one on "diff" page.  This
unifies the experiencing on history <=> diffs as well as gives the user a link
back to the document, which was a tab on the History page before this diff.

Thoughts for next time...
- I'd like to further unify the breadcrumbs between "View" and "History / Diff".
- The "Document Index" is pretty sweet and feels a bit buried.  I wonder if
unifying breadcrumbs is the key here?

Test Plan: clicked around phriction.   viewed a document, viewed its history.
verified links in breadcrumbs were correct

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T631

Differential Revision: 1221
This commit is contained in:
Bob Trahan 2011-12-15 12:00:17 -08:00
parent 128b7584da
commit ecb0ab4847
7 changed files with 40 additions and 31 deletions

View file

@ -1605,7 +1605,7 @@ celerity_register_resource_map(array(
),
'phriction-document-css' =>
array(
'uri' => '/res/a0eb9ea1/rsrc/css/application/phriction/phriction-document-css.css',
'uri' => '/res/8d09bd7f/rsrc/css/application/phriction/phriction-document-css.css',
'type' => 'css',
'requires' =>
array(

View file

@ -30,25 +30,13 @@ abstract class PhrictionController extends PhabricatorController {
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x9A\xA1");
$tabs = array();
if (!empty($data['document'])) {
$tabs['document'] = array(
'name' => 'Document',
'href' => $data['document'],
);
}
if (!empty($data['history'])) {
$tabs['history'] = array(
'name' => 'History',
'href' => $data['history'],
);
}
$tabs['help'] = array(
'name' => 'Help',
'href' => PhabricatorEnv::getDoclink('article/Phriction_User_Guide.html'),
$tabs = array(
'help' => array(
'name' => 'Help',
'href' =>
PhabricatorEnv::getDoclink('article/Phriction_User_Guide.html'),
),
);
$page->setTabs($tabs, idx($data, 'tab'));
$page->appendChild($view);

View file

@ -195,10 +195,7 @@ class PhrictionDiffController
),
array(
'title' => 'Document History',
'history' => PhrictionDocument::getSlugURI($slug, 'history'),
'document' => PhrictionDocument::getSlugURI($slug),
));
}
private function renderRevertButton(

View file

@ -72,6 +72,7 @@ class PhrictionDocumentController
'class' => 'green button',
),
'Create Page');
$buttons = $button;
} else {
$version = $request->getInt('v');
if ($version) {
@ -127,13 +128,22 @@ class PhrictionDocumentController
'</div>'.
'</div>';
$button = phutil_render_tag(
$edit_button = phutil_render_tag(
'a',
array(
'href' => '/phriction/edit/'.$document->getID().'/',
'class' => 'button',
),
'Edit Page');
$history_button = phutil_render_tag(
'a',
array(
'href' => PhrictionDocument::getSlugURI($slug, 'history'),
'class' => 'button grey',
),
'View History');
// these float right so button2 which is right most goes first
$buttons = $history_button.$edit_button;
}
if ($version_note) {
@ -144,7 +154,7 @@ class PhrictionDocumentController
$page =
'<div class="phriction-header">'.
$button.
$buttons.
'<h1>'.phutil_escape_html($page_title).'</h1>'.
$breadcrumbs.
'</div>'.
@ -156,7 +166,6 @@ class PhrictionDocumentController
$page,
array(
'title' => 'Phriction - '.$page_title,
'history' => PhrictionDocument::getSlugURI($slug, 'history'),
));
}

View file

@ -109,6 +109,21 @@ class PhrictionHistoryController
);
}
$crumbs = new AphrontCrumbsView();
$crumbs->setCrumbs(
array(
'Phriction',
phutil_render_tag(
'a',
array(
'href' => PhrictionDocument::getSlugURI($document->getSlug()),
),
phutil_escape_html($current->getTitle())
),
'History',
));
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
@ -136,15 +151,13 @@ class PhrictionHistoryController
$panel->appendChild($table);
$panel->appendChild($pager);
$slug = $document->getSlug();
return $this->buildStandardPageResponse(
$panel,
array(
$crumbs,
$panel,
),
array(
'title' => 'Document History',
'history' => PhrictionDocument::getSlugURI($slug, 'history'),
'document' => PhrictionDocument::getSlugURI($slug),
'tab' => 'history',
));
}

View file

@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'applications/phriction/storage/content');
phutil_require_module('phabricator', 'applications/phriction/storage/document');
phutil_require_module('phabricator', 'view/control/pager');
phutil_require_module('phabricator', 'view/control/table');
phutil_require_module('phabricator', 'view/layout/crumbs');
phutil_require_module('phabricator', 'view/layout/panel');
phutil_require_module('phabricator', 'view/utils');

View file

@ -10,6 +10,7 @@
.phriction-header a.button {
float: right;
margin: 0em 0em 0em 1%;
}
.phriction-header h1 {