mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-02 07:28:17 +02:00
Merge pull request #42 from hwang36/master
T341 Add a 'description' field to Phriction for annotating edits
This commit is contained in:
commit
2de071ce3a
5 changed files with 12 additions and 3 deletions
2
resources/sql/patches/066.phrictioncontent.sql
Normal file
2
resources/sql/patches/066.phrictioncontent.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
alter table phabricator_phriction.phriction_content
|
||||||
|
add description varchar(512);
|
|
@ -239,7 +239,7 @@ class PhrictionDiffController
|
||||||
phabricator_time($c->getDateCreated(), $user),
|
phabricator_time($c->getDateCreated(), $user),
|
||||||
phutil_escape_html('Version '.$c->getVersion()),
|
phutil_escape_html('Version '.$c->getVersion()),
|
||||||
$handles[$c->getAuthorPHID()]->renderLink(),
|
$handles[$c->getAuthorPHID()]->renderLink(),
|
||||||
'',
|
phutil_escape_html($c->getDescription()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,10 +96,10 @@ class PhrictionEditController
|
||||||
$is_new = true;
|
$is_new = true;
|
||||||
$document->save();
|
$document->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_content = new PhrictionContent();
|
$new_content = new PhrictionContent();
|
||||||
$new_content->setSlug($document->getSlug());
|
$new_content->setSlug($document->getSlug());
|
||||||
$new_content->setTitle($title);
|
$new_content->setTitle($title);
|
||||||
|
$new_content->setDescription($request->getStr('description'));
|
||||||
$new_content->setContent($request->getStr('content'));
|
$new_content->setContent($request->getStr('content'));
|
||||||
|
|
||||||
$new_content->setDocumentID($document->getID());
|
$new_content->setDocumentID($document->getID());
|
||||||
|
@ -176,6 +176,12 @@ class PhrictionEditController
|
||||||
->setValue($content->getTitle())
|
->setValue($content->getTitle())
|
||||||
->setError($e_title)
|
->setError($e_title)
|
||||||
->setName('title'))
|
->setName('title'))
|
||||||
|
->appendChild(
|
||||||
|
id(new AphrontFormTextControl())
|
||||||
|
->setLabel('Description')
|
||||||
|
->setValue($content->getDescription())
|
||||||
|
->setError(null)
|
||||||
|
->setName('description'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('URI')
|
->setLabel('URI')
|
||||||
|
|
|
@ -100,7 +100,7 @@ class PhrictionHistoryController
|
||||||
),
|
),
|
||||||
'Version '.$version),
|
'Version '.$version),
|
||||||
$handles[$content->getAuthorPHID()]->renderLink(),
|
$handles[$content->getAuthorPHID()]->renderLink(),
|
||||||
'',
|
phutil_escape_html($content->getDescription()),
|
||||||
$vs_previous,
|
$vs_previous,
|
||||||
$vs_head,
|
$vs_head,
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,5 +26,6 @@ class PhrictionContent extends PhrictionDAO {
|
||||||
protected $title;
|
protected $title;
|
||||||
protected $slug;
|
protected $slug;
|
||||||
protected $content;
|
protected $content;
|
||||||
|
protected $description;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue