-
Notifications
You must be signed in to change notification settings - Fork 467
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
Links: Add links on homepage - refs #4767 #4788
Conversation
An error occurred when fetching issues. View more on Code Climate. |
<div v-for="(link, index) in links" :key="'link-' + index" class="flex items-center gap-2"> | ||
<i class="mdi mdi-link-variant text-gray-500"></i> | ||
<a :href="link.url" :target="link.target" :title="link.title" class="text-primary"> | ||
{{ link.title }} | ||
</a> | ||
</div> | ||
|
||
<ShortCutList | ||
v-for="(shortcut, index) in shortcuts" | ||
:key="'shortcut-' + index.toString()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creo que para estos casos en que se manda algo desde una herramienta, se deben registrar como ShortCut
// Links to display on homepage | ||
$qb = $linkRepo->getResourcesByCourse($course, $this->getSession()); | ||
$qb->andWhere('resource.onHomepage = 1'); | ||
$qb->addOrderBy('resource.displayOrder', 'ASC'); | ||
$linkEntities = $qb->getQuery()->getResult(); | ||
|
||
$links = []; | ||
/* @var CLink $linkEntity */ | ||
foreach ($linkEntities as $linkEntity) { | ||
$links[] = [ | ||
'title' => $linkEntity->getTitle(), | ||
'url' => $linkEntity->getUrl(), | ||
'description' => $linkEntity->getDescription(), | ||
'target' => $linkEntity->getTarget(), | ||
]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto debería hacerlo el $shortcutRepository, líneas más abajo
I close this PR to avoid the conflicting files |
No description provided.