1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Add a 'description' field to Phriction

Summary:
Add a new column to PhrictionContent called 'comment' or 'description' or
something
        Add an optional field to the Phriction document editing interface that
allows you to add a comment

Test Plan:
Run the sql patch to modify phriction_content table
           Create a new wiki page in Phriction
           Type in words in description field and save the page
           Visit this page and click "Edit Page" button
           The content in the desciption field is saved

Reviewed By: epriestley
Reviewers: epriestley, hsb, codeblock
Commenters: codeblock
CC: aran, codeblock, hwang, epriestley
Differential Revision: 709
This commit is contained in:
Hua Wang 2011-07-21 15:32:54 -07:00
parent 8df62d5352
commit 2a894438ae
5 changed files with 12 additions and 3 deletions

View file

@ -0,0 +1,2 @@
alter table phabricator_phriction.phriction_content
add description varchar(512);

View file

@ -239,7 +239,7 @@ class PhrictionDiffController
phabricator_time($c->getDateCreated(), $user),
phutil_escape_html('Version '.$c->getVersion()),
$handles[$c->getAuthorPHID()]->renderLink(),
'',
phutil_escape_html($c->getDescription()),
);
}

View file

@ -96,10 +96,10 @@ class PhrictionEditController
$is_new = true;
$document->save();
}
$new_content = new PhrictionContent();
$new_content->setSlug($document->getSlug());
$new_content->setTitle($title);
$new_content->setDescription($request->getStr('description'));
$new_content->setContent($request->getStr('content'));
$new_content->setDocumentID($document->getID());
@ -176,6 +176,12 @@ class PhrictionEditController
->setValue($content->getTitle())
->setError($e_title)
->setName('title'))
->appendChild(
id(new AphrontFormTextControl())
->setLabel('Description')
->setValue($content->getDescription())
->setError(null)
->setName('description'))
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('URI')

View file

@ -100,7 +100,7 @@ class PhrictionHistoryController
),
'Version '.$version),
$handles[$content->getAuthorPHID()]->renderLink(),
'',
phutil_escape_html($content->getDescription()),
$vs_previous,
$vs_head,
);

View file

@ -26,5 +26,6 @@ class PhrictionContent extends PhrictionDAO {
protected $title;
protected $slug;
protected $content;
protected $description;
}