Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new feature] Article notes field #19134

Merged
merged 13 commits into from Jun 2, 2018
Merged

Conversation

@brianteeman
Copy link
Member

@brianteeman brianteeman commented Dec 22, 2017

We have a note field for com_categories, com_menus and com_modules
This PR adds the functionality to com_content as it has been requested several times and can be very useful

To test

Apply the pr AND the database fix (we added a new field)
Create an article and on the right, above version note you will see a new field called note
Enter a note and save the article
You can now see the note with the article in the list
You can also search by the note
Check the featured article list
Check the article modal list (article xtd-editor button or from creating a new single article menu)

On the frontend you can also add/edit a note. You will see it on the publishing tab above the version note field

Bonus

When adding this field to the frontend beez template I spotted that the version note field wasnt shown there either so I added that at the same time

brianteeman added 3 commits Dec 22, 2017
We have a note field for com_categories, com_menus and com_modules
This PR adds the functionality to com_content as it has been requested several times and can be very useful

## To test
Apply the pr AND the database fix (we added a new field)
Create an article and on the right above version note you will see a new field called note
Enter a note and save the article
You can now see the note with the article
You can also search by the note
Check the featured article list
Check the article modal list (article xtd-editor button or from creating a new single article menu)

On the frontend you can also add/edit a note. You will see it on the publishing tab above the version note field
sql
@@ -0,0 +1,4 @@
ALTER TABLE `#__content` ADD COLUMN `note` VARCHAR(255) NOT NULL DEFAULT '';

This comment has been minimized.

@csthomas

csthomas Dec 22, 2017
Contributor

Use '"' (double quote) instead '`' to escape names in postgresql.

This comment has been minimized.

@brianteeman

brianteeman Dec 22, 2017
Author Member

thanks - should be ok now

@brianteeman brianteeman added this to the Joomla 3.9.0 milestone Dec 22, 2017
@@ -138,6 +138,13 @@
<a class="select-link" href="javascript:void(0)" <?php echo $attribs; ?>>
<?php echo $this->escape($item->title); ?>
</a>
<span class="small" title="<?php echo $this->escape($item->path); ?>">

This comment has been minimized.

@Quy

Quy Dec 22, 2017
Contributor

Same fix here with the underlined space.

This comment has been minimized.

@Quy

Quy Dec 22, 2017
Contributor

PHP Notice: Undefined property: stdClass::$path in\administrator\components\com_content\views\articles\tmpl\modal.php on line 141

type="text"
label="COM_CONTENT_FIELD_NOTE_LABEL"
description="COM_CONTENT_FIELD_NOTE_DESC"
class="span12"

This comment has been minimized.

@Quy

Quy Dec 22, 2017
Contributor

change to inputbox

This comment has been minimized.

@brianteeman

brianteeman Dec 22, 2017
Author Member

Please check the other notes fields in modules and menu. I am sure this si the same

brianteeman added 3 commits Dec 22, 2017
</div>
<div class="controls">
<?php echo $this->form->getInput('version_note'); ?>
</div

This comment has been minimized.

@Quy

Quy Dec 22, 2017
Contributor

Add closing >

@Quy
Copy link
Contributor

@Quy Quy commented Dec 22, 2017

On the frontend, the note field is wider due to the span12 class.

note-frontend

<?php echo $this->escape($item->title); ?>
</a>
<?php echo $this->escape($item->title); ?></a>
<span class="small">

This comment has been minimized.

@Quy

Quy Dec 22, 2017
Contributor

Add break-word?

This comment has been minimized.

@brianteeman

brianteeman Dec 22, 2017
Author Member

might as well - wont do any harm

@Quy
Copy link
Contributor

@Quy Quy commented Dec 23, 2017

I have tested this item successfully on c78fdf4

Tested with MySQL


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19134.

Copy link
Contributor

@alikon alikon left a comment

the update is wrong you need a single quote before the
{"common..... and another one at the end fulltext"}}

should be something like
'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"introtext", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"attribs", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"urls", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"asset_id", "note":"note"}, "special":{"fulltext":"fulltext"}}'

the same fix on postgresql and mssql

@brianteeman
Copy link
Member Author

@brianteeman brianteeman commented Dec 23, 2017

@alikon all done - thanks

@alikon
Copy link
Contributor

@alikon alikon commented Dec 24, 2017

I have tested this item successfully on e67b603


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19134.

@alikon
alikon approved these changes Dec 24, 2017
@ghost
Copy link

@ghost ghost commented Dec 24, 2017

@Quy can you please retest?

@Quy
Copy link
Contributor

@Quy Quy commented Dec 24, 2017

I have tested this item successfully on e67b603


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19134.

@Quy
Copy link
Contributor

@Quy Quy commented Dec 24, 2017

RTC

@joomla-cms-bot joomla-cms-bot added the RTC label Dec 24, 2017
@infograf768 infograf768 added this to the Joomla 3.9.0 milestone Dec 28, 2017
@brianteeman brianteeman closed this Apr 3, 2018
@joomla-cms-bot joomla-cms-bot removed the RTC label Apr 3, 2018
@zero-24 zero-24 removed this from the Joomla 3.9.0 milestone Apr 7, 2018
@brianteeman brianteeman deleted the brianteeman:article-notes branch May 29, 2018
@brianteeman brianteeman restored the brianteeman:article-notes branch May 29, 2018
@brianteeman brianteeman reopened this May 29, 2018
@Quy
Copy link
Contributor

@Quy Quy commented May 29, 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19134.

@joomla-cms-bot joomla-cms-bot added the RTC label May 29, 2018
@mbabker mbabker added this to the Joomla 3.9.0 milestone Jun 2, 2018
@mbabker mbabker changed the base branch from staging to 3.9-dev Jun 2, 2018
Michael Babker
@mbabker mbabker merged commit 46c840e into joomla:3.9-dev Jun 2, 2018
1 of 4 checks passed
1 of 4 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/drone/pr this build is pending
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Hound No violations found. Woof!
@joomla-cms-bot joomla-cms-bot removed the RTC label Jun 2, 2018
@brianteeman
Copy link
Member Author

@brianteeman brianteeman commented Jun 2, 2018

Thanks

@brianteeman brianteeman deleted the brianteeman:article-notes branch Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.