mirror of https://github.com/abpframework/abp.git
1 changed files with 12 additions and 6 deletions
@ -1,29 +1,35 @@ |
|||||
@inject ICurrentUser CurrentUser |
@inject ICurrentUser CurrentUser |
||||
@using Volo.Abp.Users |
@using Volo.Abp.Users |
||||
@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewComponent.ReactionSelectionViewModel |
@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewComponent.ReactionSelectionViewModel |
||||
|
|
||||
|
@if (CurrentUser.IsAuthenticated || Model.Reactions.Count(r => r.Count > 0) > 0) |
||||
|
{ |
||||
<div class="text-right"> |
<div class="text-right"> |
||||
<div class="px-2 py-1 my-3 card border-0 shadow-sm d-inline-block"> |
<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"> |
<span class="cms-reaction-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId"> |
||||
|
|
||||
@if (CurrentUser.IsAuthenticated) |
@if (CurrentUser.IsAuthenticated) |
||||
{ |
{ |
||||
<a class="cms-reaction-select-icon" href="#"><i class="fa fa-smile-o text-muted"></i></a> |
<a class="cms-reaction-select-icon" href="javascript:;"> |
||||
|
<i class="fa fa-smile-o text-muted"></i> |
||||
|
</a> |
||||
<div class="cms-reaction-selection-popover-content" style="display: none"> |
<div class="cms-reaction-selection-popover-content" style="display: none"> |
||||
@foreach (var reaction in Model.Reactions) |
@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"> |
<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> |
<i class="@reaction.Icon fa-2x"></i> |
||||
</span> |
</span> |
||||
} |
} |
||||
</div> |
</div> |
||||
} |
} |
||||
@foreach (var reaction in Model.Reactions.Where(r => r.Count > 0)) |
@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")"> |
<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> |
<i class="@reaction.Icon"></i> |
||||
<small class="text-muted" style="opacity: .75;">@(reaction.Count)</small> |
<small class="text-muted" style="opacity: .75;">@(reaction.Count)</small> |
||||
</span> |
</span> |
||||
} |
} |
||||
</span> |
</span> |
||||
</div> |
</div> |
||||
</div> |
</div> |
||||
|
} |
||||
|
|||||
Loading…
Reference in new issue