Reduce recent links count to 5

This commit is contained in:
Suraj Shetty 2018-10-19 09:04:45 +05:30
parent 2c839c4161
commit 3624e90b47
2 changed files with 9 additions and 6 deletions

View file

@ -116,7 +116,7 @@ body[data-route*="social"] {
}
.preview-card {
text-decoration: none;
height: 150px;
max-height: 150px;
border: 1px solid @light-border-color;
border-radius: 5px;
margin-top: 15px;
@ -125,12 +125,15 @@ body[data-route*="social"] {
display: flex;
img {
border: none;
margin: 0 10px;
max-width: 150px;
height: auto;
max-height: 90%;
margin: 10px;
max-width: 160px;
max-height: 140px;
align-self: center;
}
p {
overflow: hidden;
.text-medium
}
}
}

View file

@ -33,7 +33,7 @@ def toggle_like(post_name, user=None):
def frequently_visited_links():
return frappe.get_all('Route History', fields=['route', 'count(name) as count'], filters={
'user': frappe.session.user
}, group_by="route", order_by="count desc", limit=10)
}, group_by="route", order_by="count desc", limit=5)
@frappe.whitelist()
def get_link_info(url):