Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-armstrong committed Apr 5, 2016
1 parent ce5a275 commit 2b9ecc4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions lms/djangoapps/teams/static/teams/js/views/edit_team_members.js
Expand Up @@ -38,7 +38,7 @@
render: function() {
if (this.model.get('membership').length === 0) {
HtmlUtils.setHtml(
this.$el.html,
this.$el,
HtmlUtils.joinHtml(
HtmlUtils.HTML('<p>'),
gettext('This team does not have any members.'),
Expand All @@ -54,17 +54,17 @@
},

renderTeamMembers: function() {
var self = this, dateJoined, lastActivity;
var self = this, dateJoinedHtml, lastActivityHtml;

_.each(this.model.get('membership'), function(membership) {
dateJoined = StringUtils.interpolate(
dateJoinedHtml = HtmlUtils.interpolateHtml(
// Translators: 'date' is a placeholder for a fuzzy, relative timestamp
// (see: https://github.com/rmm5t/jquery-timeago)
gettext('Joined {date}'),
{date: self.dateTemplate({date: membership.date_joined})}
);

lastActivity = StringUtils.interpolate(
lastActivityHtml = HtmlUtils.interpolateHtml(
// Translators: 'date' is a placeholder for a fuzzy, relative timestamp
// (see: https://github.com/rmm5t/jquery-timeago)
gettext('Last Activity {date}'),
Expand All @@ -82,8 +82,8 @@
),
username: membership.user.username,
memberProfileUrl: '/u/' + membership.user.username,
dateJoined: dateJoined,
lastActive: lastActivity
dateJoinedHtml: dateJoinedHtml,
lastActivityHtml: lastActivityHtml
})
);
});
Expand Down
Expand Up @@ -5,9 +5,9 @@
<div class="member-info-container">
<span class="primary"><%- username %></span>
<div class="secondary">
<span id="date-joined"><%- dateJoined %></span>
<span id="date-joined"><%= HtmlUtils.ensureHtml(dateJoinedHtml) %></span>
<span> | </span>
<span id="last-active"><%- lastActive %></span>
<span id="last-active"><%= HtmlUtils.ensureHtml(lastActivityHtml) %></span>
</div>
</div>
<button class="action-remove-member" data-username="<%- username %>">
Expand Down
2 changes: 1 addition & 1 deletion lms/static/js/components/card/views/card.js
Expand Up @@ -110,7 +110,7 @@
details: [],
actionClass: '',
actionUrl: '',
actionContent: ''
actionContentHtml: ''
});

return CardView;
Expand Down
4 changes: 2 additions & 2 deletions lms/static/js/spec/components/card/card_spec.js
Expand Up @@ -61,7 +61,7 @@
description: 'A test description',
actionClass: 'test-action',
actionUrl: 'www.example.com',
actionContent: 'A test action'
actionContentHtml: 'A test action'
}))();
verifyContent(view);
});
Expand All @@ -74,7 +74,7 @@
description: function () { return 'A test description'; },
actionClass: function () { return 'test-action'; },
actionUrl: function () { return 'www.example.com'; },
actionContent: function () { return 'A test action'; }
actionContentHtml: function () { return 'A test action'; }
}));
verifyContent(view);
});
Expand Down

0 comments on commit 2b9ecc4

Please sign in to comment.