Skip to content

[new feature] Article notes field - #19134

Merged
mbabker merged 13 commits into
joomla:3.9-devfrom
brianteeman:article-notes
Jun 2, 2018
Merged

[new feature] Article notes field#19134
mbabker merged 13 commits into
joomla:3.9-devfrom
brianteeman:article-notes

Conversation

@brianteeman

@brianteeman brianteeman commented Dec 22, 2017

Copy link
Copy Markdown
Contributor

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

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
@@ -0,0 +1,4 @@
ALTER TABLE `#__content` ADD COLUMN `note` VARCHAR(255) NOT NULL DEFAULT '';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks - should be ok now

@brianteeman brianteeman added this to the Joomla 3.9.0 milestone Dec 22, 2017
<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); ?>">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same fix here with the underlined space.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to inputbox

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

</div>
<div class="controls">
<?php echo $this->form->getInput('version_note'); ?>
</div

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add closing >

@Quy

Quy commented Dec 22, 2017

Copy link
Copy Markdown
Contributor

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">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add break-word?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well - wont do any harm

@Quy

Quy commented Dec 23, 2017

Copy link
Copy Markdown
Contributor

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.

@alikon alikon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy Markdown
Contributor Author

@alikon all done - thanks

@alikon

alikon commented Dec 24, 2017

Copy link
Copy Markdown
Contributor

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.

@ghost

ghost commented Dec 24, 2017

Copy link
Copy Markdown

@Quy can you please retest?

@Quy

Quy commented Dec 24, 2017

Copy link
Copy Markdown
Contributor

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

Quy commented Dec 24, 2017

Copy link
Copy Markdown
Contributor

RTC

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit 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 This Pull Request is Ready To Commit label Apr 3, 2018
@zero-24 zero-24 removed this from the Joomla 3.9.0 milestone Apr 7, 2018
@brianteeman
brianteeman deleted the article-notes branch May 29, 2018 08:16
@brianteeman
brianteeman restored the article-notes branch May 29, 2018 09:23
@brianteeman brianteeman reopened this May 29, 2018
@Quy

Quy commented May 29, 2018

Copy link
Copy Markdown
Contributor

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 This Pull Request is Ready To Commit label May 29, 2018
@joomla-cms-bot joomla-cms-bot added PR-3.9-dev and removed RTC This Pull Request is Ready To Commit labels Jun 2, 2018
@brianteeman

Copy link
Copy Markdown
Contributor Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants