Fossil

Check-in [529492b9de]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor adjustments to drop-down menus on the /reports page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | andygoth-user-reports
Files: files | file ages | folders
SHA1: 529492b9de7f70ac98a57a84747a21bea9d5853c
User & Date: drh 2015-05-19 10:20:38.423
Context
2015-05-19
10:24
Enhancements to the /reports interface, including improved filtering by user. ... (check-in: 16ab6ee852 user: drh tags: trunk)
10:20
Minor adjustments to drop-down menus on the /reports page. ... (Closed-Leaf check-in: 529492b9de user: drh tags: andygoth-user-reports)
2015-05-18
22:18
Pull in the memory allocation fix from trunk. ... (check-in: 879958277a user: drh tags: andygoth-user-reports)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/statrep.c.
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
  int i;                             /* Loop counter */
  const char *zUserName;             /* Name of user */
  const struct {
    const char *zName;  /* Name of view= screen type */
    const char *zVal;   /* Value of view= query parameter */
    int eType;          /* Corresponding RPT_* define */
  } aViewType[] = {
     {  "By File",     "byfile",    RPT_BYFILE    },
     {  "By Month",    "bymonth",   RPT_BYMONTH   },
     {  "By User",     "byuser",    RPT_BYUSER    },
     {  "By Week",     "byweek",    RPT_BYWEEK    },
     {  "By Weekday",  "byweekday", RPT_BYWEEKDAY },
     {  "By Year",     "byyear",    RPT_BYYEAR   },
  };
  const char *azType[] = {
     "a",  "Any Type",
     "ci", "Check-ins",
     "g",  "Tags",
     "e",  "Tech Notes",
     "t",  "Tickets",
     "w",  "Wiki"
  };
  







|







|







694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
  int i;                             /* Loop counter */
  const char *zUserName;             /* Name of user */
  const struct {
    const char *zName;  /* Name of view= screen type */
    const char *zVal;   /* Value of view= query parameter */
    int eType;          /* Corresponding RPT_* define */
  } aViewType[] = {
     {  "File Changes","byfile",    RPT_BYFILE    },
     {  "By Month",    "bymonth",   RPT_BYMONTH   },
     {  "By User",     "byuser",    RPT_BYUSER    },
     {  "By Week",     "byweek",    RPT_BYWEEK    },
     {  "By Weekday",  "byweekday", RPT_BYWEEKDAY },
     {  "By Year",     "byyear",    RPT_BYYEAR   },
  };
  const char *azType[] = {
     "a",  "All Changes",
     "ci", "Check-ins",
     "g",  "Tags",
     "e",  "Tech Notes",
     "t",  "Tickets",
     "w",  "Wiki"
  };
  
734
735
736
737
738
739
740
741
742
743
744

745
746
747
748
749
750
751
  if( eType!=RPT_NONE ){
    int nView = 0;                     /* Slots used in azView[] */
    const char *azView[16];            /* Drop-down menu of view types */
    for(i=0; i<ArraySize(aViewType); i++){
      azView[nView++] = aViewType[i].zVal;
      azView[nView++] = aViewType[i].zName;
    }
    style_submenu_multichoice("view", nView/2, azView, 0);
    if( eType!=RPT_BYFILE ){
      style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0);
    }

    if( eType!=RPT_BYUSER ){
      style_submenu_sql("u","User:",
         "SELECT '', 'All Users' UNION ALL "
         "SELECT x, x FROM ("
         "  SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s"
         "  ORDER BY 1 COLLATE nocase) WHERE x!=''",
         eType==RPT_BYFILE ? "WHERE type='ci'" : ""







<



>







734
735
736
737
738
739
740

741
742
743
744
745
746
747
748
749
750
751
  if( eType!=RPT_NONE ){
    int nView = 0;                     /* Slots used in azView[] */
    const char *azView[16];            /* Drop-down menu of view types */
    for(i=0; i<ArraySize(aViewType); i++){
      azView[nView++] = aViewType[i].zVal;
      azView[nView++] = aViewType[i].zName;
    }

    if( eType!=RPT_BYFILE ){
      style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0);
    }
    style_submenu_multichoice("view", nView/2, azView, 0);
    if( eType!=RPT_BYUSER ){
      style_submenu_sql("u","User:",
         "SELECT '', 'All Users' UNION ALL "
         "SELECT x, x FROM ("
         "  SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s"
         "  ORDER BY 1 COLLATE nocase) WHERE x!=''",
         eType==RPT_BYFILE ? "WHERE type='ci'" : ""