mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Implemented USERLIST as attribute type
SVN revision: 1134
This commit is contained in:
parent
d549e5e568
commit
e044406256
@ -93,7 +93,7 @@ BSC32_SBRS= \
|
|||||||
<<
|
<<
|
||||||
|
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
LINK32_FLAGS=wsock32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\elogd.pdb" /machine:I386 /out:"$(OUTDIR)\elogd.exe"
|
LINK32_FLAGS=wsock32.lib advapi32.lib /nologo /subsystem:console /stack:4000000 /incremental:no /pdb:"$(OUTDIR)\elogd.pdb" /machine:I386 /out:"$(OUTDIR)\elogd.exe"
|
||||||
LINK32_OBJS= \
|
LINK32_OBJS= \
|
||||||
"$(INTDIR)\elogd.obj" "$(INTDIR)\regex.obj"
|
"$(INTDIR)\elogd.obj" "$(INTDIR)\regex.obj"
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ BSC32_SBRS= \
|
|||||||
<<
|
<<
|
||||||
|
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
LINK32_FLAGS=wsock32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\elogd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\elogd.exe" /pdbtype:sept
|
LINK32_FLAGS=wsock32.lib advapi32.lib /nologo /subsystem:console /stack:4000000 /incremental:yes /pdb:"$(OUTDIR)\elogd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\elogd.exe" /pdbtype:sept
|
||||||
LINK32_OBJS= \
|
LINK32_OBJS= \
|
||||||
"$(INTDIR)\elogd.obj" "$(INTDIR)\regex.obj"
|
"$(INTDIR)\elogd.obj" "$(INTDIR)\regex.obj"
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile=".\Debug/elogd.pdb"
|
ProgramDatabaseFile=".\Debug/elogd.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
StackReserveSize="1048576"
|
StackReserveSize="4000000"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
|
|||||||
@ -1057,10 +1057,11 @@ Default is <i>"0, attribname, attribvalue, 80, 500"</i>. Trailing parameters can
|
|||||||
so specifying for example only the flags is possible.
|
so specifying for example only the flags is possible.
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<LI><b><code>Type <attribute> = date | numeric</b></code>
|
<LI><b><code>Type <attribute> = date | numeric | userlist</b></code>
|
||||||
<br>
|
<br>
|
||||||
A normal attribute can contain strings of any type. With this option, attributes can be
|
A normal attribute can contain strings of any type. With this option, attributes can be
|
||||||
forced to be numeric or to be a date. When new logbook entries are made,
|
forced to be numeric or to be a date, or to consist of a list of all users from the password file.
|
||||||
|
When new logbook entries are made,
|
||||||
numeric attributes are checked to contain only digits. Note that JavaScript has to be
|
numeric attributes are checked to contain only digits. Note that JavaScript has to be
|
||||||
enabled to do this.<br><br>
|
enabled to do this.<br><br>
|
||||||
|
|
||||||
@ -1073,6 +1074,10 @@ dates can be searched for via a start and end date. If date attributes are used
|
|||||||
(see above), a drop-down quick filter box is displayed which lets the user select "last day",
|
(see above), a drop-down quick filter box is displayed which lets the user select "last day",
|
||||||
"last week", "next week", and so on.<p>
|
"last week", "next week", and so on.<p>
|
||||||
|
|
||||||
|
If the attribute type is <b><code>userlist</code></b>, a drop-down box is displayed which contains
|
||||||
|
all user names from the current password file. This can be useful for example in a bug
|
||||||
|
tracking system, where a new entry gets assigned to an individual.<p>
|
||||||
|
|
||||||
<LI><b><code>Display <attribute> = <string></b></code>
|
<LI><b><code>Display <attribute> = <string></b></code>
|
||||||
<br>
|
<br>
|
||||||
Instead of subsituting an attribute, the original attribute can be kept and just the
|
Instead of subsituting an attribute, the original attribute can be kept and just the
|
||||||
|
|||||||
@ -53,10 +53,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Derive attribute options from list of entries of another logbook<td>1</td>
|
Derive attribute options from list of entries of another logbook<td>1</td>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Derive list of options for attribute from user list (Options [attrib] =
|
|
||||||
$user_list)<td>2</td>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Add/Remove logbooks though the web interface<td>1</td>
|
Add/Remove logbooks though the web interface<td>1</td>
|
||||||
|
|||||||
34
src/elogd.c
34
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.513 2004/11/17 14:39:16 midas
|
||||||
|
Implemented USERLIST as attribute type
|
||||||
|
|
||||||
Revision 1.512 2004/11/16 15:35:17 midas
|
Revision 1.512 2004/11/16 15:35:17 midas
|
||||||
Version 2.5.5-2
|
Version 2.5.5-2
|
||||||
|
|
||||||
@ -878,6 +881,7 @@ char author_list[MAX_N_LIST][NAME_LENGTH] = {
|
|||||||
#define AF_EXTENDABLE (1<<7)
|
#define AF_EXTENDABLE (1<<7)
|
||||||
#define AF_DATE (1<<8)
|
#define AF_DATE (1<<8)
|
||||||
#define AF_NUMERIC (1<<9)
|
#define AF_NUMERIC (1<<9)
|
||||||
|
#define AF_USERLIST (1<<10)
|
||||||
|
|
||||||
/* attribute format flags */
|
/* attribute format flags */
|
||||||
#define AFF_SAME_LINE 1
|
#define AFF_SAME_LINE 1
|
||||||
@ -5988,6 +5992,8 @@ and attr_flags arrays */
|
|||||||
attr_flags[i] |= AF_DATE;
|
attr_flags[i] |= AF_DATE;
|
||||||
if (strieq(type, "numeric"))
|
if (strieq(type, "numeric"))
|
||||||
attr_flags[i] |= AF_NUMERIC;
|
attr_flags[i] |= AF_NUMERIC;
|
||||||
|
if (strieq(type, "userlist"))
|
||||||
|
attr_flags[i] |= AF_USERLIST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7318,7 +7324,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
reply_tag[MAX_REPLY_TO * 10], att[MAX_ATTACHMENTS][256], encoding[80],
|
reply_tag[MAX_REPLY_TO * 10], att[MAX_ATTACHMENTS][256], encoding[80],
|
||||||
slist[MAX_N_ATTR + 10][NAME_LENGTH], svalue[MAX_N_ATTR + 10][NAME_LENGTH],
|
slist[MAX_N_ATTR + 10][NAME_LENGTH], svalue[MAX_N_ATTR + 10][NAME_LENGTH],
|
||||||
owner[256], locked_by[256], class_value[80], class_name[80], condition[256],
|
owner[256], locked_by[256], class_value[80], class_name[80], condition[256],
|
||||||
ua[NAME_LENGTH], mid[80], title[256];
|
ua[NAME_LENGTH], mid[80], title[256], login_name[256];
|
||||||
time_t now, ltime;
|
time_t now, ltime;
|
||||||
char fl[8][NAME_LENGTH];
|
char fl[8][NAME_LENGTH];
|
||||||
struct tm *pts, ts;
|
struct tm *pts, ts;
|
||||||
@ -7980,6 +7986,32 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
show_date_selector(day, month, year, str);
|
show_date_selector(day, month, year, str);
|
||||||
rsprintf("</td>\n");
|
rsprintf("</td>\n");
|
||||||
|
|
||||||
|
} else if (attr_flags[index] & AF_USERLIST) {
|
||||||
|
|
||||||
|
rsprintf("<td%s class=\"attribvalue\">\n", title);
|
||||||
|
|
||||||
|
/* display drop-down box with list of users */
|
||||||
|
rsprintf("<select name=\"%s\"", ua);
|
||||||
|
rsprintf(" onChange=\"mod();\">\n");
|
||||||
|
|
||||||
|
/* display emtpy option */
|
||||||
|
rsprintf("<option value=\"\">- %s -\n", loc("please select"));
|
||||||
|
|
||||||
|
for (i = 0; ; i++) {
|
||||||
|
if (!enum_user_line(lbs, i, login_name))
|
||||||
|
break;
|
||||||
|
get_user_line(lbs->name, login_name, NULL, str, NULL, NULL);
|
||||||
|
|
||||||
|
if (strieq(str, attrib[index]))
|
||||||
|
rsprintf("<option selected value=\"%s\">%s\n", str, str);
|
||||||
|
else
|
||||||
|
rsprintf("<option value=\"%s\">%s\n", str, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
rsprintf("</select>\n");
|
||||||
|
|
||||||
|
rsprintf("</td>\n");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* show normal edit field */
|
/* show normal edit field */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user