mirror of https://github.com/abpframework/abp.git
committed by
GitHub
8 changed files with 171 additions and 160 deletions
@ -1,25 +1,29 @@ |
|||
@inject ICurrentUser CurrentUser |
|||
@using Volo.Abp.Users |
|||
@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewComponent.ReactionSelectionViewModel |
|||
<span class="cms-reaction-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId"> |
|||
<div class="text-right"> |
|||
<div class="px-2 py-1 my-3 card border-0 shadow-sm d-inline-block"> |
|||
<span class="cms-reaction-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId"> |
|||
|
|||
@if (CurrentUser.IsAuthenticated) |
|||
{ |
|||
<a class="cms-reaction-select-icon" tabindex="0"><i class="fa fa-smile-o"></i></a> |
|||
<div class="cms-reaction-selection-popover-content" style="display: none"> |
|||
@foreach (var reaction in Model.Reactions) |
|||
{ |
|||
<span class="mr-1 cms-reaction-icon @(reaction.IsSelectedByCurrentUser ? "cms-reaction-icon-selected" : "")" data-reaction-name="@reaction.Name"> |
|||
<img src="@reaction.Icon" width="18" height="18"/> |
|||
</span> |
|||
} |
|||
@if (CurrentUser.IsAuthenticated) |
|||
{ |
|||
<a class="cms-reaction-select-icon" href="#"><i class="fa fa-smile-o text-muted"></i></a> |
|||
<div class="cms-reaction-selection-popover-content" style="display: none"> |
|||
@foreach (var reaction in Model.Reactions) |
|||
{ |
|||
<span class="m-2 p-2 w-25 d-inline-block text-center cms-reaction-icon @(reaction.IsSelectedByCurrentUser ? "shadow-sm bg-light rounded cms-reaction-icon-selected" : "")" data-reaction-name="@reaction.Name"> |
|||
<i class="@reaction.Icon fa-2x"></i> |
|||
</span> |
|||
} |
|||
</div> |
|||
} |
|||
@foreach (var reaction in Model.Reactions.Where(r => r.Count > 0)) |
|||
{ |
|||
<span class="ml-3 cms-reaction-icon @(reaction.IsSelectedByCurrentUser ? "cms-reaction-icon-selected" : "")" data-reaction-name="@reaction.Name" data-click-action="@(CurrentUser.IsAuthenticated ? "true" : "false")"> |
|||
<i class="@reaction.Icon"></i> |
|||
<small class="text-muted" style="opacity: .75;">@(reaction.Count)</small> |
|||
</span> |
|||
} |
|||
</span> |
|||
</div> |
|||
} |
|||
@foreach (var reaction in Model.Reactions.Where(r => r.Count > 0)) |
|||
{ |
|||
<span class="mr-1 cms-reaction-icon @(reaction.IsSelectedByCurrentUser ? "cms-reaction-icon-selected" : "")" data-reaction-name="@reaction.Name" data-click-action="@(CurrentUser.IsAuthenticated ? "true" : "false")"> |
|||
<img src="@reaction.Icon" width="18" height="18"/> |
|||
@(reaction.Count) |
|||
</span> |
|||
} |
|||
</span> |
|||
</div> |
|||
@ -1,13 +1,8 @@ |
|||
.cms-reaction-select-icon |
|||
{ |
|||
.cms-reaction-select-icon, .cms-reaction-icon { |
|||
cursor: pointer; |
|||
} |
|||
.cms-reaction-icon |
|||
{ |
|||
cursor: pointer; |
|||
padding: 3px 5px 5px; |
|||
} |
|||
.cms-reaction-icon-selected |
|||
{ |
|||
background-color: #eef; |
|||
} |
|||
.cms-reaction-selection-popover-content i.fa-2x{ |
|||
width: 25%; |
|||
display: inline-block; |
|||
float: left; |
|||
} |
|||
Loading…
Reference in new issue