Merge pull request #1574 from opf/fix/path-helper-refactor
Added static paths to PathHelper and using them in wp templates.pull/1582/head
commit
1b71e45e4f
@ -0,0 +1,44 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
angular.module('openproject.workPackages.tabs') |
||||
|
||||
.directive('userActivity', ['PathHelper', function(PathHelper) { |
||||
return { |
||||
restrict: 'E', |
||||
replace: true, |
||||
templateUrl: '/templates/work_packages/tabs/_user_activity.html', |
||||
scope: { |
||||
activity: '=', |
||||
currentAnchor: '=' |
||||
}, |
||||
link: function(scope) { |
||||
scope.userPath = PathHelper.staticUserPath; |
||||
} |
||||
}; |
||||
}]); |
@ -0,0 +1,15 @@ |
||||
<div class="work-package-details-activities-activity-contents"> |
||||
<div class="comments-number"><a ng-href="#{{ currentAnchor }}" ng-bind="'#' + ($index+1)"></a> |
||||
</div> |
||||
<img class="avatar" ng-src="{{ activity.props.userAvatar }}" /> |
||||
<span class="user"><a ng-href="{{ userPath(activity.props.userId) }}" name="{{ currentAnchor }}" ng-bind="activity.props.userName"></a></span> |
||||
<span class="date">commented on <span ng-bind="activity.props.createdAt | date:'short'"/></span> |
||||
<span class="comment"> |
||||
<span class="message" ng-show="activity.props._type == 'Activity::Comment'">{{ activity.props.comment }}</span> |
||||
<ul class="work-package-details-activities-messages"> |
||||
<li ng-repeat="detail in activity.props.htmlDetails track by $index"> |
||||
<span class="message" ng-bind-html="detail"/> |
||||
</li> |
||||
</ul> |
||||
</span> |
||||
</div> |
Loading…
Reference in new issue