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
Contributor

@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

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
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
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
@@ -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); ?>">
Copy link
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
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
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
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
Contributor

Choose a reason for hiding this comment

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

Add closing >

@Quy
Copy link
Contributor

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">
Copy link
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
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
Copy link
Contributor

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

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

@alikon all done - thanks

@alikon
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Dec 24, 2017

@Quy can you please retest?

@Quy
Copy link
Contributor

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 commented Dec 24, 2017

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
Copy link
Contributor

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 This Pull Request is Ready To Commit 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 June 2, 2018 15:28
@mbabker mbabker merged commit 46c840e into joomla:3.9-dev Jun 2, 2018
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 2, 2018
@brianteeman
Copy link
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.

None yet

8 participants