mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
medal valid forever text
This commit is contained in:
@@ -39,6 +39,14 @@ class Medal extends NexusModel
|
|||||||
return nexus_trans("medal.get_types." . $this->get_type);
|
return nexus_trans("medal.get_types." . $this->get_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDurationTextAttribute($value): string
|
||||||
|
{
|
||||||
|
if ($this->duration > 0) {
|
||||||
|
return $this->duration;
|
||||||
|
}
|
||||||
|
return nexus_trans("label.permanent");
|
||||||
|
}
|
||||||
|
|
||||||
public function users(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
public function users(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class, 'user_medals', 'medal_id', 'uid')->withTimestamps();
|
return $this->belongsToMany(User::class, 'user_medals', 'medal_id', 'uid')->withTimestamps();
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ foreach ($rows as $row) {
|
|||||||
);
|
);
|
||||||
$table .= sprintf(
|
$table .= sprintf(
|
||||||
'<tr><td>%s</td><td>%s</td><td><img src="%s" style="max-width: 60px;max-height: 60px;" class="preview" /></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>',
|
'<tr><td>%s</td><td>%s</td><td><img src="%s" style="max-width: 60px;max-height: 60px;" class="preview" /></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>',
|
||||||
$row->id, $row->name, $row->image_large, number_format($row->price), $row->duration, $row->description, $action
|
$row->id, $row->name, $row->image_large, number_format($row->price), $row->durationText, $row->description, $action
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$table .= '</tbody></table>';
|
$table .= '</tbody></table>';
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ get_where("audiocodecs", "audiocodec", "aud");
|
|||||||
$hasStickyFirst = $hasStickySecond = $hasStickyNormal = $noNormalResults = false;
|
$hasStickyFirst = $hasStickySecond = $hasStickyNormal = $noNormalResults = false;
|
||||||
$prependIdArr = $prependRows = $normalRows = [];
|
$prependIdArr = $prependRows = $normalRows = [];
|
||||||
$stickyWhere = $normalWhere = '';
|
$stickyWhere = $normalWhere = '';
|
||||||
if (isset($_GET['sticky'])) {
|
if (isset($_GET['sticky']) && $inclbookmarked == 0) {
|
||||||
$stickyArr = explode(',', $_GET['sticky']);
|
$stickyArr = explode(',', $_GET['sticky']);
|
||||||
//Only handle sticky first + second
|
//Only handle sticky first + second
|
||||||
$posStates = [];
|
$posStates = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user