-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/frontpage views #32
Conversation
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.
Looks good. Some minor changes needed.
@@ -3,23 +3,26 @@ langcode: en | |||
status: true | |||
dependencies: | |||
config: | |||
- field.field.paragraph.os2loop_section_page_views_refer.os2loop_section_page_view | |||
- field.field.paragraph.os2loop_section_page_views_refer.field_os2loop_section_page_block |
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.
Remove the field_
prefix (cf. https://github.com/itk-dev/os2loop/tree/develop/docs/development#fields).
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.
Changed
config/sync/core.entity_view_display.paragraph.os2loop_section_page_views_refer.default.yml
Outdated
Show resolved
Hide resolved
id: paragraph.os2loop_section_page_views_refer.default | ||
targetEntityType: paragraph | ||
bundle: os2loop_section_page_views_refer | ||
mode: default | ||
content: | ||
os2loop_section_page_view: | ||
weight: 2 | ||
field_os2loop_section_page_block: |
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.
Remove the field_
prefix (cf. https://github.com/itk-dev/os2loop/tree/develop/docs/development#fields).
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.
Changed
foreach ($expertises as $expertise) { | ||
$term_ids[] = $expertise['target_id']; | ||
} |
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.
You could use array_column($expertises, 'target_id')
here to do the same.
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.
Changed
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.
Changed
return $this->entityTypeManager | ||
->getListBuilder('node') | ||
->getStorage() | ||
->loadByProperties([ | ||
'type' => 'os2loop_question', | ||
'status' => 1, | ||
'os2loop_shared_subject' => $user_expertises, | ||
]); | ||
} |
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.
You have almost the same code in both getContentByUserExpertise
and getContentByUserProfession
. Consider moving it into a helper function that can be called (twice).
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.
Added helper function
<div class="list-group"> | ||
<article class="list-group-item mb-2 bg-light border-0"> | ||
<div class="text-muted small">{{ node.type.entity.label }} </div> | ||
<h2 class="h6"><a href="{{ url('entity.node.canonical', { 'node': node.id() }) }}">{{ node.title() }}</a></h2> |
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.
h2
element with class name h6
? Is that a typo?
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.
Hmm. This should be h3.
H3 is the correct html tag. H6 is a bootstrap helper class to resize the header, instead of styling it.
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.
CHanged to h3
*/ | ||
#} | ||
{% for item in items %} | ||
<h2{{ attributes.addClass("h4") }}>{{ item.content }}</h2> |
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.
h2
vs h4
. Am i missing something?
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.
H2 is the correct html tag. H4 is a bootstrap helper class to resize the header, instead of styling it.
…-external-source_03_2021 Feature/loop 751 add template for external source 03 2021
Feature/BKL-52-AdjustSpacingOnQuestionForm
https://jira.itkdev.dk/browse/LOOP-735