+
+ /*
+ * List all action files in use, together with view and edit links,
+ * except for standard.action, which should only be viewable. (Not
+ * enforced in the editor itself)
+ * FIXME: Shouldn't include hardwired HTML here, use line template instead!
+ */
+ s = strdup("");
+ for (i = 0; i < MAX_ACTION_FILES; i++)
+ {
+ if (((fl = csp->actions_list[i]) != NULL) && ((b = fl->f) != NULL))
+ {
+ if (!err) err = string_append(&s, "<tr><td>");
+ if (!err) err = string_join(&s, html_encode(csp->actions_list[i]->filename));
+ snprintf(buf, 100, "</td><td class=\"cmd\"><a href=\"/show-status?file=actions&index=%d\">View</a> ", i);
+ if (!err) err = string_append(&s, buf);
+
+ if (NULL == strstr(csp->actions_list[i]->filename, "standard.action") && NULL != csp->config->actions_file_short[i])
+ {
+ snprintf(buf, 100, "<a href=\"/edit-actions-list?f=%s\">Edit</a>", csp->config->actions_file_short[i]);
+ if (!err) err = string_append(&s, buf);
+ }