Fossil SCM

Make the 'awaiting approval' label on forum posts more prominent for those who can see their content despite them being pending.

stephan 2026-06-03 17:21 UTC attach-v2
Commit 41823b0aeccb85f6c5ce06e34a7a6a91a92ada9398155e70db9e5af7400030fb
1 file changed +9 -6
+9 -6
--- src/forum.c
+++ src/forum.c
@@ -1113,10 +1113,13 @@
11131113
@ style='margin-left:%d(iIndent*iIndentScale)ex;'>
11141114
}else{
11151115
@ >
11161116
}
11171117
1118
+ bPrivate = content_is_private(p->fpid);
1119
+ bSameUser = login_is_individual()
1120
+ && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
11181121
/* If this is the first post (or an edit thereof), emit the thread title. */
11191122
if( pManifest->zThreadTitle ){
11201123
@ <h1>%h(pManifest->zThreadTitle)</h1>
11211124
}
11221125
@@ -1196,18 +1199,18 @@
11961199
/* Provide a link to the raw source code. */
11971200
if( !bUnf ){
11981201
@ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a>
11991202
}
12001203
@ </h3>
1204
+
1205
+ if( bPrivate && (bSameUser || g.perm.Admin || g.perm.ModForum) ){
1206
+ moderation_pending_www(p->fpid);
1207
+ }
12011208
}/*!bRaw*/
12021209
1203
- /* Check if this post is approved, also if it's by the current user. */
1204
- bPrivate = content_is_private(p->fpid);
1205
- bSameUser = login_is_individual()
1206
- && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
1207
-
1208
- /* Render the post if the user is able to see it. */
1210
+ /* Check if this post is approved, also if it's by the current user.
1211
+ Render the post if the user is able to see it. */
12091212
if( bPrivate && !g.perm.ModForum && !bSameUser ){
12101213
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
12111214
}else{
12121215
if( bRaw || bUnf || p->pEditTail ){
12131216
zMimetype = "text/plain";
12141217
--- src/forum.c
+++ src/forum.c
@@ -1113,10 +1113,13 @@
1113 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
1114 }else{
1115 @ >
1116 }
1117
 
 
 
1118 /* If this is the first post (or an edit thereof), emit the thread title. */
1119 if( pManifest->zThreadTitle ){
1120 @ <h1>%h(pManifest->zThreadTitle)</h1>
1121 }
1122
@@ -1196,18 +1199,18 @@
1196 /* Provide a link to the raw source code. */
1197 if( !bUnf ){
1198 @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a>
1199 }
1200 @ </h3>
 
 
 
 
1201 }/*!bRaw*/
1202
1203 /* Check if this post is approved, also if it's by the current user. */
1204 bPrivate = content_is_private(p->fpid);
1205 bSameUser = login_is_individual()
1206 && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
1207
1208 /* Render the post if the user is able to see it. */
1209 if( bPrivate && !g.perm.ModForum && !bSameUser ){
1210 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
1211 }else{
1212 if( bRaw || bUnf || p->pEditTail ){
1213 zMimetype = "text/plain";
1214
--- src/forum.c
+++ src/forum.c
@@ -1113,10 +1113,13 @@
1113 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
1114 }else{
1115 @ >
1116 }
1117
1118 bPrivate = content_is_private(p->fpid);
1119 bSameUser = login_is_individual()
1120 && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
1121 /* If this is the first post (or an edit thereof), emit the thread title. */
1122 if( pManifest->zThreadTitle ){
1123 @ <h1>%h(pManifest->zThreadTitle)</h1>
1124 }
1125
@@ -1196,18 +1199,18 @@
1199 /* Provide a link to the raw source code. */
1200 if( !bUnf ){
1201 @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a>
1202 }
1203 @ </h3>
1204
1205 if( bPrivate && (bSameUser || g.perm.Admin || g.perm.ModForum) ){
1206 moderation_pending_www(p->fpid);
1207 }
1208 }/*!bRaw*/
1209
1210 /* Check if this post is approved, also if it's by the current user.
1211 Render the post if the user is able to see it. */
 
 
 
 
1212 if( bPrivate && !g.perm.ModForum && !bSameUser ){
1213 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
1214 }else{
1215 if( bRaw || bUnf || p->pEditTail ){
1216 zMimetype = "text/plain";
1217

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button