mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Changeset anchor links.
This commit is contained in:
parent
12df78ed6a
commit
8b7755b834
3 changed files with 11 additions and 2 deletions
|
@ -140,4 +140,8 @@ class DifferentialChangeset extends DifferentialDAO {
|
|||
return implode("\n", $file);
|
||||
}
|
||||
|
||||
public function getAnchorName() {
|
||||
return substr(md5($this->getFilename()), 0, 8);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,12 @@ class DifferentialChangesetDetailView extends AphrontView {
|
|||
),
|
||||
'class' => $class,
|
||||
),
|
||||
'<a name="#'."TODO".'"></a>'.
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'name' => $changeset->getAnchorName(),
|
||||
),
|
||||
'').
|
||||
implode('', $this->buttons).
|
||||
'<h1>'.phutil_escape_html($display_filename).'</h1>'.
|
||||
'<div style="clear: both;"></div>'.
|
||||
|
|
|
@ -65,7 +65,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
$link = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '#', // TODO: filename normalizer
|
||||
'href' => '#'.$changeset->getAnchorName(),
|
||||
),
|
||||
phutil_escape_html($display_file));
|
||||
if ($type == DifferentialChangeType::TYPE_MOVE_HERE) {
|
||||
|
|
Loading…
Reference in a new issue