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

40 index published item comments #41

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/Command/IndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class IndexCommand extends Command
[ 'type', '', 'string' ],
[ 'mvdb_id', '', 'string' ],
[ 'piano_combination', '', 'string' ],
[ 'public_comment', 'comment', 'string' ],
[ 'final', '', '' ] ];
protected static $actionData = [
[ 'quantity', '', 'int' ],
Expand Down
28 changes: 28 additions & 0 deletions Classes/Domain/Model/PublishedItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ class PublishedItem extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $comment = '';

/**
* publicComment
*
* @var string
*/
protected $publicComment = '';

/**
* publisher
*
Expand Down Expand Up @@ -1009,6 +1016,16 @@ protected static function getSubitemPlateId(PublishedSubitem $subitem): string
return $subitem->getPlateId();
}

/**
* Returns the public comment
*
* @return string $publicComment
*/
public function getPublicComment(): string
{
return $this->publicComment;
}

/**
* Returns the comment
*
Expand All @@ -1019,6 +1036,17 @@ public function getComment(): string
return $this->comment;
}

/**
* Sets the public comment
*
* @param string $publicComment
* @return void
*/
public function setPublicComment(string $publicComment): void
{
$this->publicComment = $publicComment;
}

/**
* Sets the comment
*
Expand Down
16 changes: 13 additions & 3 deletions Configuration/TCA/tx_mpdbcore_domain_model_publisheditem.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'title,type,instrumentation,responsible_person,language,id,comment',
'searchFields' => 'title,type,instrumentation,responsible_person,language,id,comment,public_comment',
'iconfile' => 'EXT:mpdb_core/Resources/Public/Icons/tx_mpdbcore_domain_model_publishermakroitem.gif'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, type, instrumentation, data_acquisition_certain, related_persons_known, work_examined, data_set_manually_checked, contained_works_identified, responsible_person, date_of_publishing, final, language, id, comment, contained_works, editors, instruments, genre, first_composer, published_subitems, publisher',
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, type, instrumentation, data_acquisition_certain, related_persons_known, work_examined, data_set_manually_checked, contained_works_identified, responsible_person, date_of_publishing, final, language, id, comment, public_comment, contained_works, editors, instruments, genre, first_composer, published_subitems, publisher',
],
'types' => [
'1' => ['showitem' => 'title, type, instrumentation, data_acquisition_certain, related_persons_known, work_examined, data_set_manually_checked, contained_works_identified, responsible_person, date_of_publishing, final, language, id, comment, contained_works, editors, instruments, genre, first_composer, published_subitems, publisher, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, sys_language_uid, l10n_parent, l10n_diffsource, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, hidden, starttime, endtime'],
'1' => ['showitem' => 'title, type, instrumentation, data_acquisition_certain, related_persons_known, work_examined, data_set_manually_checked, contained_works_identified, responsible_person, date_of_publishing, final, language, id, comment, public_comment, contained_works, editors, instruments, genre, first_composer, published_subitems, publisher, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, sys_language_uid, l10n_parent, l10n_diffsource, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, hidden, starttime, endtime'],
],
'columns' => [
'sys_language_uid' => [
Expand Down Expand Up @@ -284,6 +284,16 @@
'eval' => 'trim'
]
],
'public_comment' => [
'exclude' => true,
'label' => 'LLL:EXT:mpdb_core/Resources/Private/Language/locallang_db.xlf:tx_mpdbcore_domain_model_publisheditem.public_comment',
'config' => [
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim'
]
],
'contained_works' => [
'exclude' => true,
'label' => 'enthaltene Werke',
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<trans-unit id="tx_mpdbcore_domain_model_publisheditem.comment" resname="tx_mpdbcore_domain_model_publisheditem.comment" approved="yes">
<source>comment</source>
</trans-unit>
<trans-unit id="tx_mpdbcore_domain_model_publisheditem.public_comment" resname="tx_mpdbcore_domain_model_publisheditem.public_comment" approved="yes">
<source>public comment</source>
</trans-unit>
<trans-unit id="tx_mpdbcore_domain_model_publisheditem.contained_works" resname="tx_mpdbcore_domain_model_publisheditem.contained_works" approved="yes">
<source>contained works</source>
</trans-unit>
Expand Down
3 changes: 2 additions & 1 deletion ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CREATE TABLE tx_mpdbcore_domain_model_publishedsubitem (
db_identifier int(11) DEFAULT '0' NOT NULL,
contained_works int(11) unsigned DEFAULT '0' NOT NULL,
publisher_actions int(11) unsigned DEFAULT '0' NOT NULL,
mvdb_id varchar(255) DEFAULT '' NOT NULL
mvdb_id varchar(255) DEFAULT '' NOT NULL

);

Expand All @@ -51,6 +51,7 @@ CREATE TABLE tx_mpdbcore_domain_model_publisheditem (
mvdb_id varchar(255) DEFAULT '' NOT NULL,
plate_ids varchar(255) DEFAULT '' NOT NULL,
comment text,
public_comment text,
contained_works int(11) unsigned DEFAULT '0' NOT NULL,
editors int(11) unsigned DEFAULT '0' NOT NULL,
instruments int(11) unsigned DEFAULT '0' NOT NULL,
Expand Down