<td>1. <small><a href="%s/admin/bibindex/bibindexadmin.py/field?ln=%s&mtype=perform_showfieldoverview#1">Overview of logical fields</a></small></td>
<td>1. <small><a href="%s/admin/bibindex/bibindexadmin.py/editfield?fldID=%s&ln=%s&mtype=perform_modifyfield">Modify field code</a></small></td>
<td>3. <small><a href="%s/admin/bibindex/bibindexadmin.py/editfield?fldID=%s&ln=%s&mtype=perform_modifyfieldtags">Modify MARC tags</a></small></td>
<td>5. <small><a href="%s/admin/bibindex/bibindexadmin.py/editfield?fldID=%s&ln=%s&mtype=perform_showdetailsfield">Show field usage</a></small></td>
<td>1. <small><a href="%s/admin/bibindex/bibindexadmin.py/editindex?idxID=%s&ln=%s&mtype=perform_modifyindex">Modify index name / descriptor</a></small></td>
<td>3. <small><a href="%s/admin/bibindex/bibindexadmin.py/editindex?idxID=%s&ln=%s&mtype=perform_modifyindexfields">Modify index fields</a></small></td>
output+=write_outcome(res)+"""<br><a href="%s/admin/bibindex/bibindexadmin.py/editindex?idxID=%s&ln=%s">Configure this index</a>."""%(weburl,res[1],ln)
elifconfirmnotin["-1",-1]:
output+="""<b><span class="info">Please give the index a name.</span></b>
return"""<b><span class="info">Field does not exist</span></b>"""
subtitle="""<a name="4"></a>4. Delete the logical field '%s' <small>[<a title="See guide" href="%s/admin/bibindex/guide.html">?</a>]</small>"""%(fld_dict[int(fldID)],weburl)
output=""
iffldID:
fldID=int(fldID)
ifconfirmin["0",0]:
check=run_sql("SELECT * from idxINDEX_field where id_field=%s"%fldID)
text=""
ifcheck:
text+="""<b><span class="info">This field is used in an index, deletion may cause problems.</span></b><br>"""
text+="""Do you want to delete the logical field '%s' and all its relations and definitions."""%(fld_dict[fldID])
subtitle="""<a name="4"></a>4. Delete the index. <small>[<a title="See guide" href="%s/admin/bibindex/guide.html">?</a>]</small>"""%weburl
output=""
ifconfirmin["0",0]:
idx=get_idx(idxID)
ifidx:
text=""
text+="""<b><span class="info">By deleting an index, you may also loose any indexed data in the forward and reverse table for this index.</span></b><br>"""
text+="""Do you want to delete the index '%s' and all its relations and definitions."""%(idx[0][1])
output+=createhiddenform(action="deleteindex#5",
text=text,
button="Confirm",
idxID=idxID,
confirm=1)
else:
return"""<br><b><span class="info">Index specified does not exist.</span></b>"""
query="SELECT tag.value FROM tag, field_tag WHERE tag.id=field_tag.id_tag AND field_tag.id_field=%d ORDER BY field_tag.score DESC,tag.value ASC"%field_id
subtitle="""<a name="2"></a>1. Modify field code for logical field '%s' <small>[<a title="See guide" href="%s/admin/bibindex/guide.html">?</a>]</small>"""%(fld_dict[int(fldID)],weburl)
subtitle="""<a name="4"></a>3. Modify MARC tags for the logical field '%s' <small>[<a title="See guide" href="%s/admin/bibindex/guide.html">?</a>]</small>"""%(fld_dict[int(fldID)],weburl)
output="""<dl>
<dt>Menu</dt>
<dd><a href="%s/admin/bibindex/bibindexadmin.py/addtag?fldID=%s&ln=%s#4.1">Add MARC tag</a></dd>
<dd><a href="%s/admin/bibindex/bibindexadmin.py/deletetag?fldID=%s&ln=%s#4.1">Delete unused MARC tags</a></dd>
</dl>
"""%(weburl,fldID,ln,weburl,fldID,ln)
header=['','Value','Comment','Actions']
actions=[]
res=get_fld_tags(fldID)
iflen(res)>0:
i=0
for(fldID,tagID,tname,tvalue,score)inres:
move=""
ifi!=0:
move+="""<a href="%s/admin/bibindex/bibindexadmin.py/switchtagscore?fldID=%s&id_1=%s&id_2=%s&ln=%s&=rand=%s#4"><img border="0" src="%s/img/smallup.gif" title="Move tag up"></a>"""%(weburl,fldID,tagID,res[i-1][1],ln,random.randint(0,1000),weburl)
else:
move+=" "
i+=1
ifi!=len(res):
move+='<a href="%s/admin/bibindex/bibindexadmin.py/switchtagscore?fldID=%s&id_1=%s&id_2=%s&ln=%s&rand=%s#4"><img border="0" src="%s/img/smalldown.gif" title="Move tag down"></a>'%(weburl,fldID,tagID,res[i][1],ln,random.randint(0,1000),weburl)