Henri Yandell (Created) (JIRA) wrote on Wed, Dec 21, 2011 at 06:03:30 +0000:
> Note list name on mail detail page
> ----------------------------------
>
> Key: INFRA-4238
> URL: https://issues.apache.org/jira/browse/INFRA-4238
> Project: Infrastructure
> Issue Type: Improvement
> Security Level: public (Regular issues)
> Reporter: Henri Yandell
> Priority: Minor
>
>
> Looking at
> http://mail-archives.apache.org/mod_mbox/www-infrastructure-dev/201112.mbox/%[email protected]%3E
> - it would be nice to know what mailing list the email is to in the
> UI. Currently you have to infer it from links or the url.
>
> Having it as some kind of title would be good. Possibly it could
> replace the 'list index' text for the link to the emails for that
> mailing list.
>
[[[
Tweak <h1/> title in the message display screen, for INFRA-4238.
Patch by: danielsh
* module-2.0/mod_mbox_out.c
(mbox_ajax_browser, mbox_static_browser):
Include the directory's basename in the title.
]]]
[[[
Index: module-2.0/mod_mbox_out.c
===================================================================
--- module-2.0/mod_mbox_out.c (revision 1188408)
+++ module-2.0/mod_mbox_out.c (working copy)
@@ -17,6 +17,8 @@
/* This file contains all output functions.
*/
+#include <libgen.h> /* basename() */
+
#include "mod_mbox.h"
#ifdef APLOG_USE_MODULE
@@ -886,9 +888,11 @@ apr_status_t mbox_ajax_browser(request_rec *r)
{
mbox_dir_cfg_t *conf;
char *baseURI;
+ const char *base_path;
conf = ap_get_module_config(r->per_dir_config, &mbox_module);
baseURI = get_base_uri(r);
+ base_path = get_base_path(r);
ap_set_content_type(r, "text/html; charset=utf-8");
@@ -920,7 +924,8 @@ apr_status_t mbox_ajax_browser(request_rec *r)
ap_rprintf(r,
" <body id=\"archives\" onload=\"javascript:loadBrowser
('%s');\">\n",
baseURI);
- ap_rputs(" <h1>Mailing list archives</h1>\n\n", r);
+ ap_rprintf(r, " <h1>%s mailing list archives</h1>\n\n",
+ basename(base_path));
ap_rputs(" <h5>\n", r);
@@ -930,7 +935,7 @@ apr_status_t mbox_ajax_browser(request_rec *r)
}
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the list index\">"
- "List index</a></h5>", get_base_path(r));
+ "List index</a></h5>", base_path);
/* Output a small notice if no MboxScriptPath configuration
directive was specified. */
@@ -1122,6 +1127,7 @@ int mbox_static_message(request_rec *r, apr_file_t
Message *m;
char *baseURI, *from, **context, *msgID, *escaped_msgID;
+ const char *base_path = get_base_path(r);
conf = ap_get_module_config(r->per_dir_config, &mbox_module);
baseURI = get_base_uri(r);
@@ -1166,7 +1172,8 @@ int mbox_static_message(request_rec *r, apr_file_t
ap_rputs(" </head>\n\n", r);
ap_rputs(" <body id=\"archives\">\n", r);
- ap_rputs(" <h1>Mailing list archives</h1>\n\n", r);
+ ap_rprintf(r, " <h1>%s mailing list archives</h1>\n\n",
+ basename(base_path));
ap_rputs(" <h5>\n", r);
@@ -1176,7 +1183,7 @@ int mbox_static_message(request_rec *r, apr_file_t
}
ap_rprintf(r, "<a href=\"%s\" title=\"Back to the list index\">"
- "List index</a></h5>", get_base_path(r));
+ "List index</a></h5>", base_path);
/* Display context message list */
from = ESCAPE_OR_BLANK(r->pool, m->from);
]]]
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>