<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>
<td>4. <small><a href="%s/admin/bibindex/bibindexadmin.py/editindex?idxID=%s&ln=%s&mtype=perform_modifyindexstemming">Modify index stemming language</a></small></td>
output+=write_outcome(res)+"""<br /><a href="%s/admin/bibindex/bibindexadmin.py/editindex?idxID=%s&ln=%s">Configure this index</a>."""%(CFG_SITE_URL,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/help/admin/bibindex-admin-guide">?</a>]</small>"""%(fld_dict[int(fldID)],CFG_SITE_URL)
output=""
iffldID:
fldID=int(fldID)
ifconfirmin["0",0]:
check=run_sql("SELECT id_field 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="5"></a>5. Delete the index. <small>[<a title="See guide" href="%s/help/admin/bibindex-admin-guide">?</a>]</small>"""%CFG_SITE_URL
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>"""
output+="""<span class="info">Stemming language has not been changed</span>"""
elifconfirmin[0,"0"]:
text="""
<span class="important">You are going to change the stemming language for this index. Please note you should not enable stemming for structured-data indexes like "report number", "year", "author" or "collection". On the contrary, it is advisable to enable stemming for indexes like "fulltext", "abstract", "title", etc. since this would improve retrieval quality. <br /> Beware that after changing the stemming language of an index you will have to reindex it. It is a good idea to change the stemming language and to reindex during low usage hours of your service, since searching will be not functional until the reindexing will be completed</span>.<br /> <strong>Are you sure you want to change the stemming language of this index?</strong>"""
subtitle="""<a name="2"></a>1. Modify field code for logical field '%s' <small>[<a title="See guide" href="%s/help/admin/bibindex-admin-guide">?</a>]</small>"""%(fld_dict[int(fldID)],CFG_SITE_URL)
subtitle="""<a name="4"></a>3. Modify MARC tags for the logical field '%s' <small>[<a title="See guide" href="%s/help/admin/bibindex-admin-guide">?</a>]</small>"""%(fld_dict[int(fldID)],CFG_SITE_URL)
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>
"""%(CFG_SITE_URL,fldID,ln,CFG_SITE_URL,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>"""%(CFG_SITE_URL,fldID,tagID,res[i-1][1],ln,random.randint(0,1000),CFG_SITE_URL)
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>'%(CFG_SITE_URL,fldID,tagID,res[i][1],ln,random.randint(0,1000),CFG_SITE_URL)