diff --git a/app/assets/javascripts/admin/components/staff-actions.js.es6 b/app/assets/javascripts/admin/components/staff-actions.js.es6
new file mode 100644
index 00000000000..9e742526afa
--- /dev/null
+++ b/app/assets/javascripts/admin/components/staff-actions.js.es6
@@ -0,0 +1,22 @@
+import DiscourseURL from 'discourse/lib/url';
+
+export default Ember.Component.extend({
+ classNames: ['table', 'staff-actions'],
+
+ willDestroyElement() {
+ this.$().off('click.discourse-staff-logs');
+ },
+
+ didInsertElement() {
+ this._super();
+
+ this.$().on('click.discourse-staff-logs', '[data-link-post-id]', e => {
+ let postId = $(e.target).attr('data-link-post-id');
+
+ this.store.find('post', postId).then(p => {
+ DiscourseURL.routeTo(p.get('url'));
+ });
+ return false;
+ });
+ }
+});
diff --git a/app/assets/javascripts/admin/models/staff-action-log.js.es6 b/app/assets/javascripts/admin/models/staff-action-log.js.es6
index e60d815f7c7..5c84e5c3940 100644
--- a/app/assets/javascripts/admin/models/staff-action-log.js.es6
+++ b/app/assets/javascripts/admin/models/staff-action-log.js.es6
@@ -1,6 +1,7 @@
import { ajax } from 'discourse/lib/ajax';
import AdminUser from 'admin/models/admin-user';
import { escapeExpression } from 'discourse/lib/utilities';
+import getUrl from 'discourse-common/lib/get-url';
const StaffActionLog = Discourse.Model.extend({
showFullDetails: false,
@@ -10,7 +11,7 @@ const StaffActionLog = Discourse.Model.extend({
}.property('action_name'),
formattedDetails: function() {
- var formatted = "";
+ let formatted = "";
formatted += this.format('email', 'email');
formatted += this.format('admin.logs.ip_address', 'ip_address');
formatted += this.format('admin.logs.topic_id', 'topic_id');
@@ -26,9 +27,13 @@ const StaffActionLog = Discourse.Model.extend({
return formatted;
}.property('ip_address', 'email', 'topic_id', 'post_id', 'category_id'),
- format: function(label, propertyName) {
+ format(label, propertyName) {
if (this.get(propertyName)) {
- return ('' + I18n.t(label) + ': ' + escapeExpression(this.get(propertyName)) + '
');
+ let value = escapeExpression(this.get(propertyName));
+ if (propertyName === 'post_id') {
+ value = `${value}`;
+ }
+ return `${I18n.t(label)}: ${value}
`;
} else {
return '';
}
diff --git a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
index 5df150c79fb..3445abf8df5 100644
--- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
+++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
@@ -39,7 +39,7 @@