-
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
Jcorex-100:Most read and most cited #68
base: 8.x-1.x-dev
Are you sure you want to change the base?
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.
Please check all points
$alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$nid); | ||
$total_record[$alias] = $title; | ||
} | ||
$num_per_page = 3; |
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.
Let me know use of this variable? this is hardcoded by value 3.
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.
currently there is no configuration is created for details page how many records we have to show on one page so hardcoded for now. In future we can create configuration page.
{{row.journal_title}} {{row.date_epub}} {{row.volume}}({{row.issue}}): {{ row.fpage }}-{{ row.lpage }}; DOI: https://doi.org/{{ row.doi}} | ||
</p> | ||
{% endfor %} | ||
</ul> |
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.
Check alignment
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.
done
</ul> | ||
<div class="text-center altmetrics-pager">{{ pager }}</a> </div> | ||
</div> | ||
|
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 extra lines end of this file
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.
done
<li><a href="{{key}}">{{ title }}</a></br><hr></li> | ||
{% endfor %} | ||
</ul> | ||
<a href="/content/{{corpus}}/most-read" class="nav-toggle">Read More</a> |
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.
Check alignment for a tag
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.
done
]; | ||
} | ||
} | ||
|
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 extra line
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.
done
padding-left:0px; | ||
} | ||
#mostcited ul li { | ||
padding-left:0px; |
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.
Space issue
padding-left: 0px;
list-style-type: none; | ||
} | ||
#mostread .journals-articles-top ul>li:before, .page-node-type-page .block-region-right ul>li:before, .tab-content ul>li:before, ul.unorder-listing>li:before { | ||
content: " " !important; |
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.
Check important here in all place of css
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.
whenever possible I have removed the important from css this place require important
#mostread .journals-articles-top ul>li:before, .page-node-type-page .block-region-right ul>li:before, .tab-content ul>li:before, ul.unorder-listing>li:before {
content: " " !important;
width: 0px !important;
}
$alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$nid); | ||
$most_cited[$alias] = $title; | ||
} | ||
$build = []; |
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.
Any use of this variable?
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.
I have removed this variable
$node = $rows['#node']; | ||
$title = $node->get('title')->value; | ||
$nid = $node->get('nid')->value; | ||
$alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$nid); |
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.
space issue in the end '/node/'. $nid
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.
done
$mostCited = $block_manager->createInstance('most_read_cited_block', [ | ||
'read_cited' => $tab, | ||
'view_mode' => 'default', | ||
'limit' => 3, |
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.
Again hardcoded limit value
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.
resolved the issue
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.
Few points added
@@ -83,8 +83,7 @@ function getData ($corpus,$tab) { | |||
foreach ($authors as $key => $value) { | |||
$author_names[$key] = $value['value']; | |||
} | |||
$authors_name = $author_names; | |||
$authors=implode(' ',$authors_name); | |||
$authors = implode(' ',$author_names); | |||
$alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$nid); |
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.
Space issue . getAliasByPath('/node/'. $nid);
@@ -83,8 +83,7 @@ function getData ($corpus,$tab) { | |||
foreach ($authors as $key => $value) { | |||
$author_names[$key] = $value['value']; | |||
} | |||
$authors_name = $author_names; | |||
$authors=implode(' ',$authors_name); | |||
$authors = implode(' ',$author_names); |
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.
space issue $authors = implode(' ', $author_names);
@@ -3,9 +3,11 @@ | |||
<div id="mostread"> | |||
<ul> | |||
{% for key, title in most_read %} | |||
<li><a href="{{key}}">{{ title }}</a></br><hr></li> | |||
<li> | |||
<a href="{{key}}">{{ title }} </a> |
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.
Extra space after title : {{ title }}
@@ -28,8 +29,7 @@ | |||
{% endif %} | |||
<hr> | |||
{% endfor %} | |||
</ul> | |||
</ul> | |||
|
|||
<div class="text-center altmetrics-pager">{{ pager }}</a> </div> |
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.
Seems wrong tag added by you .
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.
this is variable is used for pagination
Jcorex-100:Most read and most cited