Add submission note icon to article lists

I would like to have a small icon (a colored exclamation mark would be enough) which is displayed at articles in the unassigned, in review and in editing lists the editors see to indicate that a submission note was added to the article. This way, an editor can leave comments in the submission notes (like: communication with author is ongoing - please leave submission untouched, this has been submitted before, this might be of interest for xxx, save for special issue, author is always late with payment, …) and all others will immediately see there is a comment. It would make collaboration / communication between editors easier.

Hi @heike_riegler,

We’ve already done something very similar for OJS 3.0 (as yet unreleased) and OMP for the same reasons you provide. For OJS 2.4.x, that’ll require some modification. You’ll have to use the NoteDAO to check whether notes exist for the submission…

$noteDao =& DAORegistry::getDAO('NoteDAO');
$notesExist = $noteDao->notesExistByAssoc(ASSOC_TYPE_ARTICLE, $article->getId());
if ($notesExist) {
    ...
}

Regards,
Alec Smecher
Public Knowledge Project Team

Hy @asmecher ,

i want the same thing in ojs 2.4.8. In which file should i use that code?

Hi @suzy,

This will require some PHP and Smarty expertise. The relevant templates are templates/sectionEditor/submissions*.tpl and templates/editor/submissions*.tpl (for the various queues). The basic idea on the PHP side is described above, though it’ll take some adaptation to provide the data in queues rather than for a single submission.

Regards,
Alec Smecher
Public Knowledge Project Team

Hy @asmecher,

thank you for your answer! I am really new at ojs. Two weeks ago i have seen this system for the first time so i am still learning. I have added following code to SectionEditorSubmission.inc.php:

function hasCommentNote($subId) {
$host = Config::getVar(‘database’, ‘host’);
$username = Config::getVar(‘database’, ‘username’);
$password = Config::getVar(‘database’, ‘password’);
$databaseName = Config::getVar(‘database’, ‘name’);
$conection = mysqli_connect($host, $username, $password, $databaseName);
$sql = "SELECT title FROM notes WHERE assoc_id = " . $subId . “”;
$result = mysqli_query($conection, $sql);
if (mysqli_num_rows($result) > 0) {
return $result;
} else {
return null;
}
}

In .tpl files i have added new column named Note and values Yes or No. I know this is not the right way but it works.

Thank you again and best regards!

Hi @suzy,

That’ll work – but it might be better to stick with the exiting database connection code etc., rather than rewriting your own, using the NoteDAO per the code snippet mentioned above.

Regards,
Alec Smecher
Public Knowledge Project Team