Skip to content

Commit b06e111

Browse files
committed
1 parent 8274a3c commit b06e111

File tree

5 files changed

+131
-93
lines changed

5 files changed

+131
-93
lines changed

ALA_Imaging/ala_ddl.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ BEGIN
287287
77457,
288288
'No verbatim locality recorded',
289289
'unknown',
290-
'c',
290+
'collector',
291291
'Herb',
292292
'UAM',
293293
'Entered by ALA Imaging Project - more data will be available after images are scanned.',

Bulkloader/BulkloaderStageCleanup.cfm

+7-2
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@
239239
<cfquery name="ctspecimen_event_type" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
240240
select specimen_event_type from ctspecimen_event_type order by specimen_event_type
241241
</cfquery>
242+
<cfquery name="ctcollector_role" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
243+
select collector_role from ctcollector_role order by collector_role
244+
</cfquery>
245+
242246
<hr>
243247
<br>
244248
This form will happily replace all your good values with garbage. There is no finesse. (Load to bulkloader and use SQL browse/edit option.) Reload your text file and start over if you muck it up.
@@ -437,8 +441,9 @@
437441
<td>
438442
<select name="COLLECTOR_ROLE_#x#" id="COLLECTOR_ROLE_#x#">
439443
<option value=""></option>
440-
<option value="c">c</option>
441-
<option value="p">p</option>
444+
<cfloop query="ctcollector_role">
445+
<option value="#collector_role#">#collector_role#</option>
446+
</cfloop>
442447
</select>
443448
</td>
444449
</tr>

DataEntry.cfm

+6-4
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
<cfquery name="ctew" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
170170
select e_or_w from ctew order by e_or_w
171171
</cfquery>
172+
<cfquery name="ctcollector_role" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
173+
select collector_role from ctcollector_role order by collector_role
174+
</cfquery>
172175
<cfquery name="ctns" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
173176
select n_or_s from ctns order by n_or_s
174177
</cfquery>
@@ -290,10 +293,9 @@
290293
<cfif i is 1 or i is 3 or i is 5><tr></cfif>
291294
<td id="d_collector_role_#i#" align="right">
292295
<select name="collector_role_#i#" size="1" <cfif i is 1>class="reqdClr"</cfif> id="collector_role_#i#">
293-
<option value="c">Collector</option>
294-
<cfif i gt 1>
295-
<option value="p">Preparator</option>
296-
</cfif>
296+
<cfloop query="ctcollector_role">
297+
<option value="#collector_role#">#collector_role#</option>
298+
</cfloop>
297299
</select>
298300
</td>
299301
<td id="d_collector_agent_#i#" nowrap="nowrap">

editColls.cfm

+116-85
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,140 @@
11
<cfinclude template="/includes/alwaysInclude.cfm">
2+
<cfquery name="ctcollector_role" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
3+
select collector_role from ctcollector_role order by collector_role
4+
</cfquery>
25
<cfquery name="getColls" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
36
SELECT
47
agent_name,
58
collector_role,
69
coll_order,
710
collector.agent_id,
8-
institution_acronym
11+
collector_id
912
FROM
1013
collector,
11-
preferred_agent_name,
12-
cataloged_item,
13-
collection
14+
preferred_agent_name
1415
WHERE
15-
collector.collection_object_id = cataloged_item.collection_object_id and
16-
cataloged_item.collection_id=collection.collection_id AND
17-
collector.agent_id = preferred_agent_name.agent_id AND
18-
collector.collection_object_id = #collection_object_id#
16+
collector.collection_object_id = #collection_object_id# and
17+
collector.agent_id = preferred_agent_name.agent_id
1918
ORDER BY
2019
collector_role, coll_order
2120
</cfquery>
21+
<script>
22+
function deleteThis(i){
23+
$("#name_" + i).val('DELETE');
24+
$("#agent_id_" + i).val('DELETE');
25+
}
26+
27+
28+
29+
$(function() {
30+
$( "#sortable" ).sortable({
31+
handle: '.dragger'
32+
});
33+
34+
});
2235
23-
<cfoutput> <cfset i=1>
2436
25-
<table>
26-
<cfloop query="getColls">
27-
<form name="colls#i#" method="post" action="editColls.cfm" onSubmit="return gotAgentId(this.newagent_id.value)">
28-
<input type="hidden" name="collection_object_id" value="#collection_object_id#">
29-
<input type="hidden" name="Action" value="">
30-
<tr #iif(i MOD 2,DE("class='evenRow'"),DE("class='oddRow'"))# ><td>
31-
Name: <input type="text" name="Name" value="#getColls.agent_name#" class="reqdClr"
32-
onchange="getAgent('newagent_id','Name','colls#i#',this.value); return false;"
33-
onKeyPress="return noenter(event);">
37+
</script>
38+
<cfoutput>
39+
<cfset i=1>
40+
<form name="colls" method="post" action="editColls.cfm" >
41+
<input type="hidden" name="collection_object_id" value="#collection_object_id#">
42+
<input type="hidden" name="action" value="saveedits">
3443

35-
<input type="hidden" name="newagent_id">
36-
<input type="hidden" name="oldagent_id" value="#agent_id#">
3744

38-
Role:
39-
<input type="hidden" name="oldRole" value="#getColls.collector_role#">
40-
<select name="collector_role" size="1" class="reqdClr">
41-
<option <cfif #getColls.collector_role# is 'c'> selected </cfif>value="c">collector</option>
42-
<option <cfif #getColls.collector_role# is 'p'> selected </cfif>value="p">preparator</option>
43-
</select>
44-
Order:
45-
<input type="hidden" name="oldOrder" value="#getColls.coll_order#">
46-
<select name="coll_order" size="1" class="reqdClr">
47-
<cfset thisLoop =#getColls.recordcount# +1>
48-
<cfloop from="1" index="c" to="#thisLoop#">
49-
<option
50-
<cfif #c# is #getColls.coll_order#> selected </cfif>value="#c#">#c#</option>
51-
45+
46+
47+
<table id="clastbl" border="1">
48+
<thead>
49+
<tr>
50+
<th>draghandle</th>
51+
<th>Agent</th>
52+
<th>Role</th>
53+
<th>Order</th>
54+
</tr>
55+
</thead>
56+
<tbody id="sortable">
57+
<cfloop query="getColls">
58+
<input type="hidden" name="collector_id_#i#" value="#collector_id#">
59+
<tr #iif(i MOD 2,DE("class='evenRow'"),DE("class='oddRow'"))# id="row_#i#">
60+
<td class="dragger">
61+
(drag row here)
62+
</td>
63+
<td>
64+
<input type="text" name="name_#i#" id="name_#i#" value="#getColls.agent_name#" class="reqdClr"
65+
onchange="getAgent('newagent_id','name_#i#','colls',this.value); return false;"
66+
onKeyPress="return noenter(event);">
67+
<input type="hidden" name="agent_id_#i#" id="agent_id_#i#">
68+
</td>
69+
<td>
70+
<select name="collector_role" size="1" class="reqdClr">
71+
<cfloop query="ctcollector_role">
72+
<option <cfif getColls.collector_role is ctcollector_role.collector_role> selected="selected" </cfif>
73+
value="#ctcollector_role.collector_role#">#ctcollector_role.collector_role#</option>
74+
</cfloop>
75+
</select>
76+
</td>
77+
<td>
78+
<select name="coll_order" size="1" class="reqdClr">
79+
<cfset thisLoop =getColls.recordcount + 1>
80+
<cfloop from="1" index="c" to="#thisLoop#">
81+
<option <cfif c is getColls.coll_order> selected="selected" </cfif>value="#c#">#c#</option>
82+
</cfloop>
83+
</select>
84+
</td>
85+
<td>
86+
<input type="button" class="delBtn" value="delete" onclick="deleteThis('#i#');">
87+
</td>
88+
</tr>
89+
<cfset i = i+1>
5290
</cfloop>
53-
</select>
54-
55-
<input type="button"
56-
value="Save"
57-
class="savBtn"
58-
onmouseover="this.className='savBtn btnhov'"
59-
onmouseout="this.className='savBtn'"
60-
onclick="colls#i#.Action.value='saveEdits';submit();">
61-
62-
<input type="button" value="Delete" class="delBtn"
63-
onClick="colls#i#.Action.value='deleteColl';confirmDelete('colls#i#');">
64-
65-
</td></tr>
66-
</form>
67-
<cfset i = #i#+1>
68-
</cfloop>
69-
</table>
70-
<table class="newRec">
71-
<tr>
72-
<td><strong>Add an Agent:</strong></td>
73-
</tr>
74-
<tr>
75-
<td><form name="newColl" method="post" action="editColls.cfm" onSubmit="return gotAgentId(this.newagent_id.value)">
76-
<input type="hidden" name="collection_object_id" value="#collection_object_id#">
77-
<input type="hidden" name="Action" value="newColl">
78-
79-
Name: <input type="text" name="name" class="reqdClr"
80-
onchange="getAgent('newagent_id','name','newColl',this.value); return false;"
81-
onKeyPress="return noenter(event);">
82-
<input type="hidden" name="newagent_id">
91+
</tbody>
92+
</table>
93+
<input type="hidden" name="number_of_collectors" id="number_of_collectors" value="#i#">
94+
<br>
95+
<input type="submit" value="Save" class="savBtn">
96+
</form>
97+
98+
8399

84100

85-
Role:
86-
<select name="collector_role" size="1" class="reqdClr">
87-
<option value="c">collector</option>
88-
<option value="p">preparator</option>
89-
90-
</select>
91-
Order:
92-
<select name="coll_order" size="1" class="reqdClr">
93-
<cfset thisLoop = #getColls.recordcount# +1>
94-
<cfloop from="1" index="c" to="#thisLoop#">
95-
<option <cfif #c# is #thisLoop#> selected </cfif>
96-
value="#c#">#c#</option>
97-
98-
</cfloop>
99-
</select>
101+
<table class="newRec">
102+
<tr>
103+
<td><strong>Add an Agent:</strong></td>
104+
</tr>
105+
<tr>
106+
<td><form name="newColl" method="post" action="editColls.cfm" onSubmit="return gotAgentId(this.newagent_id.value)">
107+
<input type="hidden" name="collection_object_id" value="#collection_object_id#">
108+
<input type="hidden" name="Action" value="newColl">
109+
110+
Name: <input type="text" name="name" class="reqdClr"
111+
onchange="getAgent('newagent_id','name','newColl',this.value); return false;"
112+
onKeyPress="return noenter(event);">
113+
<input type="hidden" name="newagent_id">
100114

101-
<input type="submit" value="Create" class="insBtn"
102-
onmouseover="this.className='insBtn btnhov'" onmouseout="this.className='insBtn'">
103-
104-
</form></td>
105-
</tr>
106-
</table>
115+
116+
Role:
117+
<select name="collector_role" size="1" class="reqdClr">
118+
<option value="c">collector</option>
119+
<option value="p">preparator</option>
120+
121+
</select>
122+
Order:
123+
<select name="coll_order" size="1" class="reqdClr">
124+
<cfset thisLoop = #getColls.recordcount# +1>
125+
<cfloop from="1" index="c" to="#thisLoop#">
126+
<option <cfif #c# is #thisLoop#> selected </cfif>
127+
value="#c#">#c#</option>
128+
129+
</cfloop>
130+
</select>
131+
132+
<input type="submit" value="Create" class="insBtn"
133+
onmouseover="this.className='insBtn btnhov'" onmouseout="this.className='insBtn'">
134+
135+
</form></td>
136+
</tr>
137+
</table>
107138
<p>
108139

109140
</cfoutput>

includes/SearchSql.cfm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1915,7 +1915,7 @@
19151915
<cfset basQual = " #basQual# AND (
19161916
upper(#session.flatTableName#.higher_geog) || ' ' || upper(#session.flatTableName#.spec_locality)
19171917
|| ' ' || upper(#session.flatTableName#.verbatim_locality) || ' ' || upper(locality.S$GEOGRAPHY) LIKE '%#ucase(escapeQuotes(any_geog))#%'
1918-
OR upper(geog_search_term.search_term) like '%#ucase(any_geog)#%' )">
1918+
OR upper(geog_search_term.search_term) like '%#ucase(escapeQuotes(any_geog))#%' )">
19191919
</cfif>
19201920
<cfif isdefined("geog_auth_rec_id") AND len(geog_auth_rec_id) gt 0>
19211921
<cfset basQual = " #basQual# AND #session.flatTableName#.geog_auth_rec_id=#geog_auth_rec_id#">

0 commit comments

Comments
 (0)