HTML improvements
authorAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 2 Jun 2005 11:23:06 +0000 (11:23 +0000)
committerAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 2 Jun 2005 11:23:06 +0000 (11:23 +0000)
org.gridsite.core/src/grst_admin_file.c
org.gridsite.core/src/mod_gridsite.c

index f89a004..b4d47f5 100644 (file)
@@ -955,7 +955,7 @@ void filehistory(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
                {
                    GRSThttpPrintf(&bp, "<td><a href=\"");
                     if (strcmp (file, GRST_ACL_FILE)==0)
-                        GRSThttpPrintf(&bp, "%s%s?cmd=acl_history&dir_uri=%s&file=%s\">View</a></td></tr>\n",
+                        GRSThttpPrintf(&bp, "%s%s?cmd=acl_history&amp;dir_uri=%s&amp;file=%s\">View</a></td></tr>\n",
                            dir_uri, admin_file, dir_uri, namelist[i]->d_name);
                     else GRSThttpPrintf(&bp, "%s%s\">View</a></td></tr>\n",
                        dir_uri, namelist[i]->d_name);
@@ -1338,7 +1338,7 @@ void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
                       statbuf.st_size, modified);
 
               GRSThttpPrintf(&bp,
-                   "<td><a href=\"%s%s?cmd=history&file=%s\">"
+                   "<td><a href=\"%s%s?cmd=history&amp;file=%s\">"
                       "History</a></td>",
                       dir_uri, admin_file, GRST_ACL_FILE);
             }
@@ -1351,7 +1351,7 @@ void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
           if (GRSTgaclPermHasAdmin(perm)) 
                GRSThttpPrintf(&bp,
                    "<td><a href=\"%s%s?cmd=admin_acl\">Edit</a></td>"
-                   "<td><a href=\"%s%s?cmd=delete&file=%s\">Delete</a></td>",
+                   "<td><a href=\"%s%s?cmd=delete&amp;file=%s\">Delete</a></td>",
                    dir_uri, admin_file,
                    dir_uri, admin_file, GRST_ACL_FILE);
           else if (GRSTgaclPermHasRead(perm))
@@ -1420,7 +1420,7 @@ void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
 
                    if (numfiles == 0)
                         GRSThttpPrintf(&bp,
-                        "<td><a href=\"%s%s?cmd=delete&file=%s\">"
+                        "<td><a href=\"%s%s?cmd=delete&amp;file=%s\">"
                         "Delete</a></td>\n", 
                         dir_uri, admin_file, namelist[n]->d_name);
                    else GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
@@ -1473,7 +1473,7 @@ void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
                           statbuf.st_size, modified);                                        
 
                    GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=history&file=%s\">"
+                     "<td><a href=\"%s%s?cmd=history&amp;file=%s\">"
                       "History</a></td>",
                       dir_uri, admin_file, d_name);
 
@@ -1484,28 +1484,28 @@ void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
                             (strcasecmp(&p[1], "zip") == 0) &&
                             GRSTgaclPermHasRead(perm))
                              GRSThttpPrintf(&bp,
-                               "<td><a href=\"%s%s?cmd=ziplist&file=%s\">"
+                               "<td><a href=\"%s%s?cmd=ziplist&amp;file=%s\">"
                                "List</a></td>\n",
                                dir_uri, admin_file, d_name);                   
                    else if ((p != NULL) && 
                        (strstr(editable, &p[1]) != NULL) &&
                        GRSTgaclPermHasWrite(perm))
                          GRSThttpPrintf(&bp,
-                               "<td><a href=\"%s%s?cmd=edit&file=%s\">"
+                               "<td><a href=\"%s%s?cmd=edit&amp;file=%s\">"
                                "Edit</a></td>\n",
                                dir_uri, admin_file, d_name);
                    else  GRSThttpPrintf(&bp, "<td>&nbsp;</td>");
 
                    if (GRSTgaclPermHasWrite(perm))
                     GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=delete&file=%s\">"
+                     "<td><a href=\"%s%s?cmd=delete&amp;file=%s\">"
                      "Delete</a></td>\n", dir_uri, admin_file, d_name);
                    else
                     GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
 
                    if (GRSTgaclPermHasWrite(perm))
                     GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=rename&file=%s\">"
+                     "<td><a href=\"%s%s?cmd=rename&amp;file=%s\">"
                      "Rename</a></td></tr>\n", dir_uri, admin_file, d_name);
                    else
                     GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>");
index 9b9580b..e9c7afb 100644 (file)
@@ -371,7 +371,7 @@ char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
     p[1] = '\0';
     /* dir_uri always gets both a leading and a trailing slash */
        
-    out = apr_pstrdup(r->pool, "<p><small>\n");
+    out = apr_pstrdup(r->pool, "<p>\n");
 
     if (!isdirectory)
       {
@@ -380,7 +380,7 @@ char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
         localtime_r(&mtime_time, &mtime_tm);
         strftime(modified, sizeof(modified), 
                  "%a&nbsp;%e&nbsp;%B&nbsp;%Y", &mtime_tm);    
-        temp = apr_psprintf(r->pool,"<hr>Last modified %s\n", modified);
+        temp = apr_psprintf(r->pool,"<hr><small>Last modified %s\n", modified);
         out = apr_pstrcat(r->pool, out, temp, NULL);
 
         if ((conf->adminuri != NULL) &&
@@ -390,14 +390,16 @@ char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
             (strncmp(file, GRST_HIST_PREFIX, sizeof(GRST_HIST_PREFIX)-1) != 0))
           {
             temp = apr_psprintf(r->pool, 
-                            ". <a href=\"%s?cmd=history&file=%s\">"
+                            ". <a href=\"%s?cmd=history&amp;file=%s\">"
                             "View&nbsp;page&nbsp;history</a>\n",
                             conf->adminfile, file);
             out = apr_pstrcat(r->pool, out, temp, NULL);
           }
+          
+        out = apr_pstrcat(r->pool, out, "</small>", NULL);
       }
 
-    out = apr_pstrcat(r->pool, out, "<hr>", NULL);
+    out = apr_pstrcat(r->pool, out, "<hr><small>", NULL);
 
     if (r->connection->notes != NULL)
          grst_cred_0 = (char *) 
@@ -444,7 +446,7 @@ char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
                          sizeof(GRST_HIST_PREFIX) - 1) != 0))
               {
                 temp = apr_psprintf(r->pool, 
-                     "<a href=\"%s?cmd=edit&file=%s\">"
+                     "<a href=\"%s?cmd=edit&amp;file=%s\">"
                      "Edit&nbsp;page</a> .\n", conf->adminfile, file);
                 out = apr_pstrcat(r->pool, out, temp, NULL);
               }
@@ -483,7 +485,7 @@ char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
         (conf->adminfile != NULL) &&
         (conf->adminfile[0] != '\0'))
       {
-        temp = apr_psprintf(r->pool, ". <a href=\"%s?cmd=print&file=%s\">"
+        temp = apr_psprintf(r->pool, ". <a href=\"%s?cmd=print&amp;file=%s\">"
                "Print&nbsp;View</a>\n", conf->adminfile, file);
         out = apr_pstrcat(r->pool, out, temp, NULL);
       }