Merge pull request #4543 from xfalcox/linkify-user-stats
FEATURE: Clinking on stats in user summary take you to the respective activity page
This commit is contained in:
commit
dd9ba3c50c
|
@ -1,19 +1,41 @@
|
||||||
<div class='top-section stats-section'>
|
<div class='top-section stats-section'>
|
||||||
<h3 class='stats-title'>{{i18n "user.summary.stats"}}</h3>
|
<h3 class='stats-title'>{{i18n "user.summary.stats"}}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{user-stat value=model.days_visited label="user.summary.days_visited"}}</li>
|
<li>
|
||||||
|
{{user-stat value=model.days_visited label="user.summary.days_visited"}}
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class='value'>{{model.time_read}}</span>
|
<span class='value'>{{model.time_read}}</span>
|
||||||
<span class='label'>{{{i18n "user.summary.time_read"}}}</span>
|
<span class='label'>{{{i18n "user.summary.time_read"}}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>{{user-stat value=model.posts_read_count label="user.summary.posts_read"}}</li>
|
<li>
|
||||||
<li>{{user-stat value=model.likes_given label="user.summary.likes_given"}}</li>
|
{{user-stat value=model.posts_read_count label="user.summary.posts_read"}}
|
||||||
|
</li>
|
||||||
|
<li class="linked-stat">
|
||||||
|
{{#link-to 'userActivity.likesGiven'}}
|
||||||
|
{{user-stat value=model.likes_given label="user.summary.likes_given"}}
|
||||||
|
{{/link-to}}
|
||||||
|
</li>
|
||||||
{{#if model.bookmark_count}}
|
{{#if model.bookmark_count}}
|
||||||
<li>{{user-stat value=model.bookmark_count label="user.summary.bookmark_count"}}</li>
|
<li class="linked-stat">
|
||||||
|
{{#link-to 'userActivity.bookmarks'}}
|
||||||
|
{{user-stat value=model.bookmark_count label="user.summary.bookmark_count"}}
|
||||||
|
{{/link-to}}
|
||||||
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li>{{user-stat value=model.topic_count label="user.summary.topic_count"}}</li>
|
<li class="linked-stat">
|
||||||
<li>{{user-stat value=model.post_count label="user.summary.post_count"}}</li>
|
{{#link-to 'userActivity.topics'}}
|
||||||
<li>{{user-stat value=model.likes_received label="user.summary.likes_received"}}</li>
|
{{user-stat value=model.topic_count label="user.summary.topic_count"}}
|
||||||
|
{{/link-to}}
|
||||||
|
</li>
|
||||||
|
<li class="linked-stat">
|
||||||
|
{{#link-to 'userActivity.replies'}}
|
||||||
|
{{user-stat value=model.post_count label="user.summary.post_count"}}
|
||||||
|
{{/link-to}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{user-stat value=model.likes_received label="user.summary.likes_received"}}
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,17 @@
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
margin: 0 5px 10px 0;
|
margin: 0 5px 10px 0;
|
||||||
background: dark-light-diff($primary, $secondary, 90%, -65%);
|
background: dark-light-diff($primary, $secondary, 90%, -65%);
|
||||||
|
|
||||||
|
&.linked-stat { // This makes the entire "box" (the li) clickable instead of a narrow area.
|
||||||
|
padding: 0;
|
||||||
|
a {
|
||||||
|
padding: 10px 14px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li:last-of-type {
|
li:last-of-type {
|
||||||
|
|
Loading…
Reference in New Issue