OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/frontend/app/templates/work_packages/activities/_user.html

72 lines
3.4 KiB

<div class="work-package-details-activities-activity-contents"
ng-mouseover="showActions()"
ng-mouseout="hideActions()">
<div class="comments-number">
<span ui-sref="work-packages.list.details.activity.details({ activity_no: activityNo })">
<a name="{{ activityNo }}"
ng-bind="'#' + activityNo"
href="#{{ activityNo }}"></a>
</span>
<div class="comments-icons"
ng-show="activity.props._type == 'Activity::Comment' && (inFocus || accessibilityModeEnabled)">
<accessible-by-keyboard ng-if="userCanQuote" execute="quoteComment()">
<icon-wrapper icon-name="quote" icon-title="{{ I18n.t('js.wiki_formatting.quote') }}" css-class="action-icon">
</icon-wrapper>
</accessible-by-keyboard>
<accessible-by-keyboard ng-if="userCanEdit" execute="editComment()">
<icon-wrapper icon-name="edit" icon-title="{{ I18n.t('js.button_edit') }}" css-class="action-icon">
</icon-wrapper>
</accessible-by-keyboard>
</div>
</div>
<div ng-if="userAvatar">
<img class="avatar" ng-src="{{ userAvatar }}" alt="Avatar" title="{{userName}}" />
</div>
<span class="user" ng-if="userActive"><a ng-href="{{ userPath(userId) }}" name="{{ currentAnchor }}" ng-bind="userName"></a></span>
<span class="user" ng-if="!userActive">{{ userName }}</span>
<span class="date">{{ isInitial ? I18n.t('js.label_created_on') : I18n.t('js.label_updated_on') }} <op-date-time date-time-value="activity.props.createdAt" /></span>
<span class="user-comment wiki">
<div ng-if="inEdit">
<form class="user-comment--form inplace-edit--write-value">
<div class="textarea-wrapper" ng-class="{'-preview': inPreview}">
<textarea wiki-toolbar
class="edit-comment-text focus-input inplace-edit--textarea -autogrow"
ng-hide="inPreview"
preview-toggle="toggleCommentPreview()"
ng-model="activity.props.comment.raw"
ng-bind-html="activity.props.comment.html"
required>
</textarea>
<div class="inplace-edit--preview" ng-if="inPreview">
<span ng-bind-html="previewHtml"></span>
</div>
</div>
<div class="inplace-edit--dashboard">
<div class="inplace-edit--controls">
<accessible-by-keyboard execute="updateComment()"
ng-disabled="editCommentForm.$invalid"
class="inplace-edit--control inplace-edit--control--save">
<icon-wrapper icon-name="yes" icon-title="{{ I18n.t('js.button_save') }}">
</icon-wrapper>
</accessible-by-keyboard>
<accessible-by-keyboard execute="cancelEdit()"
class="inplace-edit--control inplace-edit--control--cancel">
<icon-wrapper icon-name="close" icon-title="{{ I18n.t('js.button_cancel') }}">
</icon-wrapper>
</accessible-by-keyboard>
</div>
</div>
</form>
</div>
<span ng-if="!inEdit"
class="message"
ng-show="activity.props._type == 'Activity::Comment'"
ng-bind-html="comment"/>
<ul class="work-package-details-activities-messages" ng-if="!isInitial">
<li ng-repeat="detail in details track by $index">
<span class="message" ng-bind-html="detail"/>
</li>
</ul>
</span>
</div>