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

Add the option to show abstracts on the issue page #104

Open
wants to merge 6 commits into
base: stable-3_3_0
Choose a base branch
from

Conversation

ronste
Copy link

@ronste ronste commented Jan 23, 2025

Hi @Vitaliy-1 ,

as discussed here my PR to add a feature to show abstarcts on the issue page.

Currently there is a test installation available at http://ojs-dev-01.cedis.fu-berlin.de/index.php/tfj where you can see the frontend effect.

In the backend it looks like this:

grafik

This PR is for 3.3. I can prepare a 3.4 PR in a next step.

P.S.: Naturally I am not able to provide translations for all supported languages. I just add DE and EN.

Best wishes,
Ronald

*/
public function getAllSectionColors() {
$issueDao = DAORegistry::getDAO('IssueDAO');
$issues = $issueDao->getPublishedIssues(Application::get()->getRequest()->getContext()->getId());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we avoid this call? I'm worrying that it introduces additional database call to retrieve all issue objects per each request.

Copy link
Collaborator

@Vitaliy-1 Vitaliy-1 left a comment

Choose a reason for hiding this comment

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

We do need this CSS only for the issue page, right?
If using TemplateManager::display hook, is it possible then to do something like the following?

function addStyle(string $hookname, array $args)
{
  $templateMgr = $args[0];
  $template = $args[1];

  if ($template !== "frontend/pages/issue.tpl") return false;
  
  $issue = $templateMgr->getTemplateVars('issue');
  $colors = $issue->getData('immersionSectionColor');
  ...
}

@Vitaliy-1
Copy link
Collaborator

Thanks @ronste! I've made a comment regarding avoiding IssueDAO call per each request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants