On ' + fmt.link('/properties/' + w.propertyId, w.propertyName || 'Property ' + w.propertyId) + name +
+ return '
On ' + fmt.property(w.propertyId, w.propertyName || 'Property ' + w.propertyId) + name +
'
(' + fmt.character(w.ownerId, w.ownerName) + ', ' + esc(w.zoneId) + ')' +
'
3D';
}
diff --git a/dDashboardServer/static/js/ugc.js b/dDashboardServer/static/js/ugc.js
index aa90f9b53..4f4b93479 100644
--- a/dDashboardServer/static/js/ugc.js
+++ b/dDashboardServer/static/js/ugc.js
@@ -474,7 +474,7 @@
var refs = null, refTimer = null;
function whereText(w) {
return (w || []).map(function (x) {
- if (x.type === 'property') return 'On
' + esc(x.propertyName || 'property ' + x.propertyId) + '' + (x.ownerName ? ' of ' + esc(x.ownerName) : '');
+ if (x.type === 'property') return 'On ' + fmt.property(x.propertyId, x.propertyName || 'property ' + x.propertyId) + (x.ownerName ? ' of ' + esc(x.ownerName) : '');
if (x.type === 'mail') return 'In a mail to
' + esc(x.characterName || x.characterId) + '';
return 'In the creator\'s ' + esc(x.inventory || 'inventory');
}).join('
') || '
Not found placed, mailed or with its creator';
diff --git a/dDashboardServer/templates/index.jinja2 b/dDashboardServer/templates/index.jinja2
index 2517bb571..b5e5d1bfb 100644
--- a/dDashboardServer/templates/index.jinja2
+++ b/dDashboardServer/templates/index.jinja2
@@ -235,7 +235,7 @@ $(function () {
{ data: 'instanceID', render: function (d, t, row) { return row.properties ? esc(row.properties) + ' propert' + (row.properties === 1 ? 'y' : 'ies') : esc(d); } }
].concat(detailedWorlds ? [{ data: 'cloneID' }, { data: 'propertyName', defaultContent: '', render: function (d, t, row) {
if (!row.cloneID) return '
-';
- return (row.propertyId ? fmt.link('/properties/' + row.propertyId, d || '(unnamed)') : esc(d || '')) + (row.ownerId ? '
by ' + fmt.character(row.ownerId, row.ownerName) + '
' : '');
+ return (row.propertyId ? fmt.property(row.propertyId, d) : esc(d || '')) + (row.ownerId ? '
by ' + fmt.character(row.ownerId, row.ownerName) + '
' : '');
} }] : []).concat([
{ data: 'players', render: function (d) { return fmt.badge(d, 'primary'); } }
]).concat(detailedWorlds ? [{ data: 'isPrivate', render: function (d) { return d ? fmt.badge('Private', 'warning') : fmt.badge('Public', 'success'); } }, { data: 'port', defaultContent: '', render: function (d, t, row) { return '
' + esc((row.ip || '') + ':' + d) + ''; } }] : []).concat(DASH.can('worlds_manage') ? [{ data: null, orderable: false, className: 'text-end', render: function (d, t, row) {
diff --git a/dDashboardServer/templates/moderation.jinja2 b/dDashboardServer/templates/moderation.jinja2
index 382f57e22..365bd8187 100644
--- a/dDashboardServer/templates/moderation.jinja2
+++ b/dDashboardServer/templates/moderation.jinja2
@@ -88,7 +88,7 @@ $(function () {
if (DASH.can('moderate_properties')) {
serverTable('#pendingPropsTable', '/api/tables/pending_properties', [
{ data: 'id', orderable: false },
- { data: 'name', orderable: false, render: function (d, t, row) { return fmt.link('/properties/' + row.id, d || '(unnamed)'); } },
+ { data: 'name', orderable: false, render: function (d, t, row) { return fmt.property(row.id, d); } },
{ data: 'owner_id', orderable: false, render: function (d, t, row) { return fmt.character(d, row.owner_name); } },
// Nothing built yet is worth knowing before approving it for everyone to visit
{ data: 'models', orderable: false, render: function (d) { return d ? esc(d) : fmt.badge('Empty', 'secondary'); } },
diff --git a/dDashboardServer/templates/properties.jinja2 b/dDashboardServer/templates/properties.jinja2
index 0cacab41a..32d3ede19 100644
--- a/dDashboardServer/templates/properties.jinja2
+++ b/dDashboardServer/templates/properties.jinja2
@@ -62,7 +62,7 @@ $(function () {
var pending = document.getElementById('pendingOnly');
var table = serverTable('#propertiesTable', '/api/tables/properties', [
{ data: 'id' },
- { data: 'name', render: function (d, t, row) { return fmt.link('/properties/' + row.id, d || '(unnamed)'); } },
+ { data: 'name', render: function (d, t, row) { return t === 'display' ? fmt.property(row.id, d) : d; } },
{ data: 'owner_id', render: function (d, t, row) { return fmt.character(d, row.owner_name); } },
{ data: 'mod_approved', render: function (d) { return d ? fmt.badge('Approved', 'success') : fmt.badge('Unapproved', 'warning'); } },
{ data: 'reputation' },
@@ -95,7 +95,7 @@ $(function () {
if (!slots.length) { slotsEl.innerHTML = '
No property worlds found in the client data.
'; return; }
slotsEl.innerHTML = slots.map(function (s) {
var showing = s.showing
- ? fmt.link('/properties/' + s.showing.id, s.showing.name || '(unnamed)') + '
by ' + esc(s.showing.owner_name) + ''
+ ? fmt.property(s.showing.id, s.showing.name) + '
by ' + esc(s.showing.owner_name) + ''
: '
Nothing (locked slot)';
var warn = fullAuto ? '' : s.picked_unavailable ? '
The picked property isn\'t an approved public property of ' + esc(s.zone_name) + ' (any more), so the slot falls back to Auto.
'
: s.picked_shown_elsewhere ? '
The picked property is already shown in an earlier slot, so this one falls back to Auto.
' : '';