option to enable/disable item titles

This commit is contained in:
2026-05-25 09:55:53 +02:00
parent 1adc0f4ee2
commit fda2ed36bd
7 changed files with 17 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
<div class="location">{{ link.main }}{{ item.id }}{{ link.suffix }}</div>
<div class="gapLeft"></div>
</div>
@if(item.title)
@if(enable_item_title && item.title)
<div class="item_title">{!! item.title !!}</div>
@endif
@@ -201,7 +201,7 @@
<div class="modal-content" style="max-width: 500px;">
<div class="modal-body" style="padding: 20px 0; text-align: left;">
<table class="info-table">
@if(can_manage_item)
@if(enable_item_title && can_manage_item)
<tr class="info-title-row">
<th>Title</th>
<td>
@@ -212,7 +212,7 @@
<span id="info-title-status" class="info-title-status" style="display:none"></span>
</td>
</tr>
@elseif(item.title)
@elseif(enable_item_title && item.title)
<tr>
<th>Title</th>
<td>{!! item.title !!}</td>

View File

@@ -60,7 +60,7 @@
<div class="location">{{ link.main }}{{ item.id }}{{ link.suffix }}</div>
<div class="gapLeft"></div>
</div>
@if(item.title)
@if(enable_item_title && item.title)
<div class="item_title">{!! item.title !!}</div>
@endif
@@ -175,7 +175,7 @@
<div class="modal-content" style="max-width: 500px;">
<div class="modal-body" style="padding: 20px 0; text-align: left;">
<table class="info-table">
@if(can_manage_item)
@if(enable_item_title && can_manage_item)
<tr class="info-title-row">
<th>Title</th>
<td>
@@ -186,7 +186,7 @@
<span id="info-title-status" class="info-title-status" style="display:none"></span>
</td>
</tr>
@elseif(item.title)
@elseif(enable_item_title && item.title)
<tr>
<th>Title</th>
<td>{!! item.title !!}</td>

View File

@@ -46,7 +46,7 @@
@endif
<link rel="stylesheet" href="/s/css/upload.css?v={{ ts }}">
@endif
<script>window.f0ckThemes = {{ themes_json }}; window.f0ckDefaultTheme = "{{ default_theme }}"; window.f0ckDomain = "{{ domain }}"; window.f0ckGitHash = "{{ git_hash }}"; window.f0ckAllowedImages = {{ allowed_comment_images_json }}; window.f0ckEmbedYoutubeInComments = {{ embed_youtube_in_comments ? 'true' : 'false' }}; window.f0ckEnableYoutubeUpload = {{ enable_youtube_upload ? 'true' : 'false' }}; window.f0ckBrandImages = {{ custom_brand_images_json }}; window.f0ckMediaBase = "{{ paths_images }}"; window.f0ckShitpostMode = {{ shitpost_mode ? 'true' : 'false' }}; window.f0ckShitpostRequireRating = {{ shitpost_require_rating ? 'true' : 'false' }}; window.f0ckShitpostMinTags = {{ shitpost_min_tags || 0 }};</script>
<script>window.f0ckThemes = {{ themes_json }}; window.f0ckDefaultTheme = "{{ default_theme }}"; window.f0ckDomain = "{{ domain }}"; window.f0ckGitHash = "{{ git_hash }}"; window.f0ckAllowedImages = {{ allowed_comment_images_json }}; window.f0ckEmbedYoutubeInComments = {{ embed_youtube_in_comments ? 'true' : 'false' }}; window.f0ckEnableYoutubeUpload = {{ enable_youtube_upload ? 'true' : 'false' }}; window.f0ckBrandImages = {{ custom_brand_images_json }}; window.f0ckMediaBase = "{{ paths_images }}"; window.f0ckShitpostMode = {{ shitpost_mode ? 'true' : 'false' }}; window.f0ckShitpostRequireRating = {{ shitpost_require_rating ? 'true' : 'false' }}; window.f0ckShitpostMinTags = {{ shitpost_min_tags || 0 }}; window.f0ckEnableItemTitle = {{ enable_item_title ? 'true' : 'false' }};</script>
@if(!private_society || session)
<script src="/s/js/marked.min.js" defer></script>
<script src="/s/js/comments.js?v={{ ts }}" defer></script>

View File

@@ -58,7 +58,7 @@
</div>
</div>
@if(!shitpost_mode)
@if(!shitpost_mode && enable_item_title)
<div class="form-section global-title-section">
<label>Title <span style="opacity: 0.5; font-weight: normal;">{{ t('upload.comment_optional') }}</span></label>
<input type="text" name="title" class="upload-title-input" placeholder="Add a title for this item…" maxlength="500" autocomplete="off">