Diff
Not logged in

Differences From:

File src/tktsetup.c part of check-in [1e9c0e287e] - Test commands for importing and exporting ticket configurations. by drh on 2007-10-03 12:20:00. [view]

To:

File src/tktsetup.c part of check-in [d5e7891b07] - Add a more advanced commit-hook mechanism that allows us to specify multiple procedures in a particular order prior to commit. Continuing work toward getting tickets going. by drh on 2007-11-18 20:48:07. Also file src/tktsetup.c part of check-in [d0305b305a] - Merged mainline into my branch to get the newest application. by aku on 2007-12-05 08:07:46. [view]

@@ -38,95 +38,7 @@
     login_needed();
   }
 
   style_header("Ticket Setup");
-  @ <dl id="setup">
-  setup_menu_entry("Load", "tktsetup_load",
-    "Load a predefined ticket configuration");
-  setup_menu_entry("Save", "tktsetup_save",
-    "Save the current ticket configuration as an artifact");
-  setup_menu_entry("Fields", "tktsetup_fields",
-    "View or edit the fields allowed in tickets");
-  setup_menu_entry("New", "tktsetup_template?type=new",
-    "View or edit the template page used for creating a new ticket");
-  setup_menu_entry("View", "tktsetup_template?type=view",
-    "View or edit the template page used for viewing a ticket");
-  setup_menu_entry("Edit", "tktsetup_template?type=edit",
-    "View or edit the template page used for editing a ticket");
-  @ </dl>
-
-  style_footer();
-}
-
-/*
-** Load the ticket configuration in the artifact with rid.
-** If an error occurs, return 1 and leave an error message.
-*/
-static int load_config(int rid, Blob *pErr){
-  Blob content;
-  int rc;
-  if( content_get(rid, &content)==0 ){
-    blob_appendf(pErr, "no such artifact: %d", rid);
-    return 1;
-  }
-  rc = ticket_config_parse(&content, 0, pErr);
-  blob_reset(&content);
-  return rc;
-}
-
-/*
-** WEBPAGE: /tktsetup_load
-*/
-void tktsetup_load_page(void){
-  int loadrid;
-  Blob err;
-  Stmt s;
-
-  login_check_credentials();
-  if( !g.okSetup ){
-    login_needed();
-  }
-  if( P("dflt")!=0 ){
-    ticket_load_default_config();
-    cgi_redirect("tktsetup");
-  }
-  loadrid = atoi(PD("id","0"));
-  blob_zero(&err);
-  if( loadrid ){
-    if( load_config(loadrid, &err) ){
-      style_header("Configuration Error");
-      @ <p>The following error occurred while trying to load
-      @ the configuration in artifact #%d(loadrid):</p>
-      @ <blockquote><b>%h(blob_str(&err))</b></blockquote>
-      @ <p>Return to the <a href="tktsetup">ticket setup menu</a>.</p>
-      style_footer();
-    }else{
-      cgi_redirect("tktsetup");
-    }
-    return;
-  }
-  style_header("Load Configuration");
-  @ <p>Select one of the following ticket configurations to load:</p>
-  @ <ul>
-  @ <li><p>[<a href="tktsetup_load?dflt=1">default</a>]
-  @        The default built-in ticket configuration.</p></li>
-  db_prepare(&s,
-    "SELECT blob.uuid, tagxref.rid, datetime(tagxref.mtime, 'localtime')"
-    "  FROM tagxref, blob"
-    " WHERE tagxref.tagid=(SELECT tagid FROM tag "
-                           "WHERE tagname='ticket_configuration')"
-    "   AND blob.rid=tagxref.rid"
-    " ORDER BY tagxref.mtime DESC"
-  );
-  while( db_step(&s)==SQLITE_ROW ){
-    const char *zUuid = db_column_text(&s, 0);
-    int rid = db_column_int(&s, 1);
-    const char *zWhen = db_column_text(&s, 2);
-    @ <li><p>[<a href="tktsetup_load?id=%d(rid)">%s(zUuid)</a>].
-    @        Configuration created on %s(zWhen).</p></li>
-  }
-  db_finalize(&s);
-  @ <li><p>[<a href="tktsetup">Cancel</a>].  Return to the main
-  @        ticket configuration setup menu.</p></li>
-  @ </ul>
+  @ <i>TBD...</i>
   style_footer();
 }