Revision: 1283
Author: LudicrousResearcher
Date: Mon Nov 30 10:30:13 2009
Log: Work on Issue 95.
Added support for draft page to create new complex inference rules.
Added support for autocomplete search on concepts, with test tools.
http://code.google.com/p/delphi-museum-project/source/detail?r=1283
Added:
/trunk/api/ac_concepts.php
/trunk/modules/ontotools
/trunk/modules/ontotools/addInference.php
/trunk/modules/test
/trunk/modules/test/ac_concepts.php
/trunk/modules/test/ac_test.php
/trunk/themes/pahma/images/choose.gif
/trunk/themes/pahma/images/delete.gif
/trunk/themes/pahma/images/indicator.gif
/trunk/themes/pahma/scripts/addInference.js
/trunk/themes/pahma/style/jquery.autocomplete.css
/trunk/themes/pahma/templates/ac_concept.tpl
/trunk/themes/pahma/templates/ac_test.tpl
/trunk/themes/pahma/templates/addInference.tpl
Modified:
/trunk/schemas/addBaseRolesAndPerms.sql
/trunk/themes/pahma/templates/admin.tpl
=======================================
--- /dev/null
+++ /trunk/api/ac_concepts.php Mon Nov 30 10:30:13 2009
@@ -0,0 +1,42 @@
+<?php
+require_once "apiSetup.php";
+
+if (!isset($_GET["q"])) return;
+$term = strtolower($_GET["q"]);
+if(!$term) return;
+$terms = explode(' ', $term);
+foreach($terms as $subterm) {
+ $word = trim($subterm);
+ if(!empty($word) ) {
+ $kwdterms[] = '+'.$word.'*';
+ }
+}
+
+$limit = 0;
+if(isset($_GET["limit"])){
+ $limit = 0 + (int)$_GET["limit"];
+}
+if($limit<=1) {
+ $limit = 40;
+}
+$qString =
+ "SELECT c.display_name,
c.id, f.display_name"
+ ." FROM hooks h JOIN categories c on h.cat_id=
c.id JOIN facets f on
c.facet_id=
f.id"
+ ." WHERE MATCH(h.token) AGAINST('".implode(' ',$kwdterms)."' IN BOOLEAN
MODE)"
+ ." GROUP BY h.cat_id ORDER BY c.display_name LIMIT ".$limit;
+$qString2 =
+ "SELECT c.display_name,
c.id, f.display_name"
+ ." FROM categories c JOIN facets f on c.facet_id=
f.id"
+ ." WHERE MATCH(c.display_name) AGAINST('".implode(' ',$kwdterms)."' IN
BOOLEAN MODE)"
+ ." ORDER BY c.display_name LIMIT ".$limit;
+$results =& $db->query($qString2);
+if (PEAR::isError($results)) {
+ return;
+}
+//echo $qString;
+while ($row = $results->fetchRow(MDB2_FETCHMODE_ORDERED)) {
+ echo "$row[0] ($row[2])|$row[1]\n";
+}
+$results->free();
+
+?>
=======================================
--- /dev/null
+++ /trunk/modules/ontotools/addInference.php Mon Nov 30 10:30:13 2009
@@ -0,0 +1,53 @@
+<?php
+/* Include Files *********************/
+require_once("../../libs/env.php");
+/*************************************/
+// If the user isn't logged in, send to the login page.
+if(($login_state != DELPHI_LOGGED_IN) && ($login_state !=
DELPHI_REG_PENDING)){
+ header( 'Location: ' . $CFG->wwwroot .
+ '/modules/auth/login.php?redir=' .$_SERVER['REQUEST_URI'] );
+ die();
+}
+
+$t->assign('page_title', 'PAHMA/Delphi: Add Complex Inference');
+$opmsg = "";
+
+// This needs to verify perms.
+if( !currUserHasPerm( 'EditInferences' ) ) {
+ $opmsg = "You do not have rights to Edit inferences. <br />
+ Please contact your Delphi administrator for help.";
+ $t->assign('addinf_error', $opmsg);
+
+ $t->display('addInference.tpl');
+ die();
+}
+
+$style_block = "<style>
+.nochoice {color:#888; }
+.intro {font-size:0.9em; font-weight:bold; margin-bottom:0;}
+.up {margin-bottom: 0.1em; }
+.label {font-weight:bold; margin-bottom:0;}
+#formCont {padding:0px 30px; }
+#table1 {padding:10px; border: solid 1px black;}
+#table1 td {padding:4px; }
+#table1 .label {font-size:0.9em; }
+#table1 input.numeric {text-align:right; }
+</style>";
+
+$t->assign("style_block", $style_block);
+
+$themebase = $CFG->wwwroot.'/themes/'.$CFG->theme;
+
+$script_block = '
+<script type="text/javascript">
+ var _themeroot = "'.$themebase.'";
+</script>
+<script type="text/javascript"
src="'.$themebase.'/scripts/addInference.js"></script>';
+
+$t->assign("script_block", $script_block);
+
+if($opmsg!="")
+ $t->assign('opmsg', $opmsg);
+
+$t->display('addInference.tpl');
+?>
=======================================
--- /dev/null
+++ /trunk/modules/test/ac_concepts.php Mon Nov 30 10:30:13 2009
@@ -0,0 +1,38 @@
+<?php
+
+require_once("../../libs/env.php");
+$themebase = $CFG->wwwroot.'/themes/'.$CFG->theme;
+
+$style_block =
+'<link rel="stylesheet"
href="'.$themebase.'/style/jquery.autocomplete.css" type="text/css">';
+
+$t->assign("style_block", $style_block);
+$script_block = '
+<script type="text/javascript"
src="../../libs/jquery/jquery.autocomplete.pack.js"></script>
+<script type="text/javascript"
src="../../libs/jquery/jquery.bgiframe.min.js"></script>
+<script type="text/javascript"
src="../../libs/jquery/jquery.ajaxQueue.js"></script>
+<script type="text/javascript">
+$().ready(function() {
+
+ $("#concept").autocomplete("'.$CFG->wwwroot.'/api/ac_concepts.php", {
+ minChars: 2,
+ scroll: true,
+ scrollHeight: 180,
+ max: 40,
+ matchSubset: false
+ });
+
+ $("#concept").result(function(event, data, formatted) {
+ if (data)
+ $("#concept_id").val(data[1]);
+ });
+
+});
+
+</script>';
+$t->assign("script_block", $script_block);
+
+// Display template
+$t->display('ac_concept.tpl');
+
+?>
=======================================
--- /dev/null
+++ /trunk/modules/test/ac_test.php Mon Nov 30 10:30:13 2009
@@ -0,0 +1,35 @@
+<?php
+
+require_once("../../libs/env.php");
+$themebase = $CFG->wwwroot.'/themes/'.$CFG->theme;
+
+$style_block = '<link rel="stylesheet"
href="'.$themebase.'/style/jquery.autocomplete.css"
+type="text/css">';
+
+$t->assign("style_block", $style_block);
+$script_block = '
+<script type="text/javascript"
src="../../libs/jquery/jquery.autocomplete.pack.js"></script>
+<script type="text/javascript">
+$().ready(function() {
+
+
$("#singleBirdRemote").autocomplete("'.$CFG->wwwroot.'/api/ac_search.php", {
+ width: 260,
+ minChars: 2,
+ max: 20,
+ scrollHeight: 200
+ });
+
+ $("#singleBirdRemote").result(function(event, data, formatted) {
+ if (data)
+ $("#singleBirdResult").val(data[1]);
+ });
+
+});
+
+</script>';
+$t->assign("script_block", $script_block);
+
+// Display template
+$t->display('ac_test.tpl');
+
+?>
=======================================
--- /dev/null
+++ /trunk/themes/pahma/images/choose.gif Mon Nov 30 10:30:13 2009
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/themes/pahma/images/delete.gif Mon Nov 30 10:30:13 2009
@@ -0,0 +1,6 @@
+GIF89a Õ ÿÿÿkacB8B)$)ZQZB<BŒ†Œ! !101½º½ªsqs989ÞÛÞÎËÎœšœ”’”ŒŠŒ„‚„RQRJIJBAB18B!(1BIR !Zeksy{{‚„1<1BEBJMJZ]Zsus„†„ÞßÞÖ×ÖÎÏÎÆÇÆ®¥¦¥ceZ„‚{kic{ysÆÃ½½ºµÞÛÖÖÓÎÎËÆçãÞ¥žœÞ×ÖÖÏÎÎÇÆçßÞ ÿÿÿ !ù : , ƒ@ pH, È¢ qK
+Q–ŠâèH ¢‹ Bœ¹
++cÍ%²XV3ÝŒc ¥‘4³äq°LpN ,ti46$yB/ ‚1 ‰ .! N6 !0 "
+&H0, .B55 "H) #%D2
+MF-9 'F
+/G/*)1GÂÆÇÈEA ;
=======================================
--- /dev/null
+++ /trunk/themes/pahma/images/indicator.gif Mon Nov 30 10:30:13 2009
@@ -0,0 +1,43 @@
+GIF89a Ä ÿÿÿîîîÝÝÝ»»»ªªª™™™ˆˆˆwwwfffUUUDDD333""" ÿÿÿ !ÿ NETSCAPE2.0 !ù , w
$B ‰$å¨B # Ï# «(<LàÈÁ¬
+3Ãð ¦D Å æH$^¶”@é ø Pd€°¸"U
+³P# Îa
+‚\;ŸÍƒÃ1ª
+
+oÏ::0
+v @ $|,3 ‚_# d €5 3—" s5 e! !ù , c $ŽÐ ˆ 9*"#
+
+¡Š Ä8ö3ÌbÁ4
+ k” B Óã‘J‰
+`4˜ò†< q8ì² B ø‚_
+™sDP@U Ó d¯×Z„ f* i "‚( )† VY Ž#! !ù , ` $ŽPa ¨ˆˆ
+ K*: Ô u ” Ñ #Á@tX
+ƒ!&0<
+ U#' ž áh€Øm 'Ñ@Yˆ¢^hÂa-k÷Ü(„Áë.
+†ƒ šNò € |$ C f)@‚f|! !ù , b $ŽbAžâ @‰"&
+- ë"è*6C ã È€ *
+‚+`jè 4ˆ 2`È 5’° X ¢ÑpÀ’ á ñh/H±“`.Ð
¦ëh †ÌõR" ]SW B]€~‚†€Š(! !ù , I $ŽÐq ¨˜ˆÏæìÚB
+,
+n[ÐhÒ ÇÂä* G‰Ç
+UÜ‘–¨ÅH )8£GÍtJÕ^SÔ@˜ºŽÆ-*Dm˦ؤ T ‡
+ !ù , q $ŽÐ0 ( ¢qˆ‡ k ÁÈ©€ 7A G d†‚é°(1 ¢ÀÀ0 Œ ‚ dÁ
X¤€¢`U ÎeR!‘P ÎèT Áh Â(Á¢€Âv!_"PQ V e
+ Y
+i) Z `x# '3y |)žŽ! !ù , ` $Ž ¨8ˆEÁ¦ìI¸
+ ‹F0C
+ š ÝÀT@ˆ F‘`˜B4 ¨À
+ð‰‚A €b ZÅbq¸ ¬ ²‚ À° ‚ ·ÆÃ )/a zSS€ & V€
p$! !ù , ^ $B‚8"1® Ú¢ ®0Џ ˜‹B RÂ0
+ v«Ã"ÈBŽ®Ùlp¨ª¤£XbˆÕݤFŸ‘ a²
+ ƒAA&*X†Ç Á(@ˆ3 ºÔ ,° (
+} Q+> R! !ù , c $ŽP ¨xB‚ +*œ-[Ädà¶ á¢+“i@
+)` L¢
+?'I`¨JG‚ƒ¶øbP¾©âñhŽ
+ƒÊñX¸ B )0 ¢Â׸X ›Q# } N o "tI+ZI! !ù , \
$ŽP` ©Š¦8¬êù®©*ÔÅ „1 ¶• ‚h 0‚r°x8 °BÁ‡ µQa ù ˆÅVÄ
+¥!ÑM
+D„l!¡ 4 %Ø B‡
+öBe
+PDY0 0! !ù , ] $Ž$ ”è ¥À¢ÂI> QÊÁð ôóŽ ]éð ´d"†2 8 G£qH9
¯ A 2– ¢ŸÈ€ðB ª"á, D‡‚H('
+ 4³Á½C
+\0 ` UL" r(! !ù , d $ŽdI `®Ãìkò °øBÂó˜B
+· m è•
+ŽAÉ72,
+ĩ(P
+ X鲪‚ø “’ 8@R%‚a K ‡*¡€ þD¨ ÁŒè2E { $ƒ„f t5†C%! ;
=======================================
--- /dev/null
+++ /trunk/themes/pahma/scripts/addInference.js Mon Nov 30 10:30:13 2009
@@ -0,0 +1,131 @@
+$(document).ready(function(){
+ //alert("Hi there");
+ addReqRow();
+ addReqRow();
+ addExclRow();
+ addExclRow();
+ $("#InfConcept")[0].focus();
+});
+
+var nReqRows = 0;
+var nExclRows = 0;
+
+function newReqRowHTML( iRow ) {
+ var id0 = "ReqRow" + iRow;
+ var id2 = "ReqConcept" + iRow;
+ var id3 = "ReqConceptID" + iRow;
+ var htmlStr = '<tr class="ReqRow" id="' + id0 + '"><td
width="10px"></td>' +
+ '<td><p class="label" align="right">Concept:</p></td>' +
+ '<td><input id="'+id2+'" type="text" maxlength="150" size="40" value=""
/>' +
+ '<input id="'+id3+'" type="hidden" value="'+(10001*(iRow+1))+'" /></td>'
+
+ '<td><input type="image" src="'+_themeroot+'/images/choose.gif"
onclick="ShowChooser(\''+id2+'\',\''+id3+'\');"/></td>' +
+ '<td><input type="image" src="'+_themeroot+'/images/delete.gif"
onclick="DeleteRow(\''+id0+'\',\'Req\');"/></td>' +
+ '<td width="10px"></td></tr>';
+ return htmlStr;
+}
+
+function addReqRow() {
+ if( $("tr.ReqRow").length <= 0 ) {
+ $("#ReqModeRow").after( newReqRowHTML(0) );
+ } else {
+ $("tr.ReqRow:last").after( newReqRowHTML(nReqRows) );
+ }
+ nReqRows += 1;
+}
+
+function DeleteRow(rowID, rowtype) {
+ var sel = "#"+rowID;
+ $(sel).remove();
+ if( rowtype == 'Req') {
+ if( $("tr.ReqRow").length == 0 ) {
+ nReqRows = 0;
+ addReqRow();
+ }
+ } else if( $("tr.ExclRow").length == 0 ) {
+ nExclRows = 0;
+ addExclRow();
+ }
+}
+
+function newExclRowHTML( iRow ) {
+ var id0 = "ExclRow" + iRow;
+ var id2 = "ExclConcept" + iRow;
+ var id3 = "ExclConceptID" + iRow;
+ var htmlStr = '<tr class="ExclRow" id="' + id0 + '"><td
width="10px"></td>' +
+ '<td><p class="label" align="right">Concept:</p></td>' +
+ '<td><input id="'+id2+'" type="text" maxlength="150" size="40" value=""
/>' +
+ //'<input id="'+id3+'" type="hidden" value="'+(10100*(iRow+1))+'"
/></td>' +
+ '<input id="'+id3+'" type="hidden" value="" /></td>' +
+ '<td><input type="image" src="'+_themeroot+'/images/choose.gif"
onclick="ShowChooser(\''+id2+'\',\''+id3+'\');"/></td>' +
+ '<td><input type="image" src="'+_themeroot+'/images/delete.gif"
onclick="DeleteRow(\''+id0+'\',\'Excl\');"/></td>' +
+ '<td width="10px"></td></tr>';
+ return htmlStr;
+}
+
+function addExclRow() {
+ if( $("tr.ExclRow").length <= 0 ) {
+ $("#ExclModeRow").after( newExclRowHTML(0) );
+ } else {
+ $("tr.ExclRow:last").after( newExclRowHTML(nExclRows) );
+ }
+ nExclRows += 1;
+}
+
+function ShowChooser( conceptText, conceptID ) {
+ var str = "Browse for concepts...";
+ var concept = "" + $("#"+conceptText)[0].value;
+ var id = "" + $("#"+conceptID)[0].value;
+ if( concept != "" )
+ str += "\n Specified concept: \"" + concept + "\"";
+ if( id != "" )
+ str += "\n Specified ID: \"" + id + "\"";
+ alert( str );
+}
+
+function prepareAddInfXML() {
+ var xmlStr = '<infer name="' + $("#NameText")[0].value + '"' +
+ '
confidence="'+$("#ConfSel")[0].options[$("#ConfSel")[0].selectedIndex].value
+'"';
+ var refidstr = $("#InfConceptID")[0].value;
+ if(( "" + refidstr ) == "" ) {
+ alert( "Invalid Rule: No inferred concept specified!" );
+ return null;
+ }
+ xmlStr += ' idref="'+ refidstr + '">';
+ xmlStr += "\n <notes>" + $("#InfNotes")[0].value + "</notes>";
+ xmlStr += '\n <require
mode="'+$("#InfReqSel")[0].options[$("#InfReqSel")[0].selectedIndex].text
+'">';
+
+ var nReqRows = $("tr.ReqRow").length;
+ var nReqFound = 0;
+ for( var i=0; i < nReqRows; i++ ) {
+ var idval = "#ReqConceptID" + i;
+ refidstr = $(idval)[0].value;
+ if(( "" + refidstr ) != "" ) {
+ xmlStr += '\n <concept idref="'+ refidstr + '" />';
+ nReqFound++;
+ }
+ }
+ if( nReqFound == 0 ) {
+ alert( "Invalid Rule: No required concepts specified!" );
+ return null;
+ }
+ xmlStr += '\n </require>';
+
+ var nExclRows = $("tr.ExclRow").length;
+ var nExclFound = 0;
+ for( i=0; i < nExclRows; i++ ) {
+ var idval = "#ExclConceptID" + i;
+ refidstr = $(idval)[0].value;
+ if(( "" + refidstr ) != "" ) {
+ if( nExclFound == 0 )
+ xmlStr += '\n <exclude
mode="'+$("#InfExclSel")[0].options[$("#InfExclSel")[0].selectedIndex].text
+'">';
+ xmlStr += '\n <concept idref="'+ refidstr + '" />';
+ nExclFound++;
+ }
+ }
+ if( nExclFound > 0 )
+ xmlStr += '\n </exclude>';
+ xmlStr += '\n</infer>';
+ alert( "XML for new Rule:\n\n" + xmlStr );
+ return xmlStr;
+}
+
=======================================
--- /dev/null
+++ /trunk/themes/pahma/style/jquery.autocomplete.css Mon Nov 30 10:30:13
2009
@@ -0,0 +1,48 @@
+.ac_results {
+ padding: 0px;
+ border: 1px solid black;
+ background-color: white;
+ overflow: hidden;
+ z-index: 99999;
+}
+
+.ac_results ul {
+ width: 100%;
+ list-style-position: outside;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+.ac_results li {
+ margin: 0px;
+ padding: 2px 5px;
+ cursor: default;
+ display: block;
+ /*
+ if width will be 100% horizontal scrollbar will apear
+ when scroll mode will be used
+ */
+ /*width: 100%;*/
+ font: menu;
+ font-size: 12px;
+ /*
+ it is very important, if line-height not setted or setted
+ in relative units scroll will be broken in firefox
+ */
+ line-height: 16px;
+ overflow: hidden;
+}
+
+.ac_loading {
+ background: white url('../images/indicator.gif') right center no-repeat;
+}
+
+.ac_odd {
+ background-color: #eee;
+}
+
+.ac_over {
+ background-color: #0A246A;
+ color: white;
+}
=======================================
--- /dev/null
+++ /trunk/themes/pahma/templates/ac_concept.tpl Mon Nov 30 10:30:13 2009
@@ -0,0 +1,19 @@
+{include file="header.tpl"}
+
+<div id="contentNarrow">
+<br />
+
+<p>This is a test of the jQuery AutoComplete support.</p>
+
+ <p>
+ <label>Enter concept:</label>
+ <input type="text" id="concept" size="40"/>
+ </p>
+ <p>
+ <label>Concept ID:</label>
+ <input type="text" id="concept_id" size="40"/>
+ </p>
+</div>
+
+
+{include file="footer.tpl"}
=======================================
--- /dev/null
+++ /trunk/themes/pahma/templates/ac_test.tpl Mon Nov 30 10:30:13 2009
@@ -0,0 +1,19 @@
+{include file="header.tpl"}
+
+<div id="contentNarrow">
+<br />
+
+<p>This is a test of the jQuery AutoComplete support.</p>
+
+ <p>
+ <label>Single Bird (remote):</label>
+ <input type="text" id="singleBirdRemote" />
+ </p>
+ <p>
+ <label>Taxonomic name:</label>
+ <input type="text" id="singleBirdResult" />
+ </p>
+</div>
+
+
+{include file="footer.tpl"}
=======================================
--- /dev/null
+++ /trunk/themes/pahma/templates/addInference.tpl Mon Nov 30 10:30:13 2009
@@ -0,0 +1,106 @@
+{include file="header.tpl"}
+
+{if isset($addinf_error) }
+ <h2>{$addinf_error}</h2>
+{else}
+ <h2>Add a new Inference Rule:</h2>
+ <div id="formCont">
+ <p class="label">Name: <input id="NameText" type="text" maxlength="150"
size="35" value="NewRule" />
+ Confidence:
+ <select id="ConfSel" SelectedIndex="0">
+ <option value="0.1" >10%</option>
+ <option value="0.2" >20%</option>
+ <option value="0.3" >30%</option>
+ <option value="0.4" >40%</option>
+ <option value="0.5" >50%</option>
+ <option value="0.6" >60%</option>
+ <option value="0.7" >70%</option>
+ <option value="0.8" >80%</option>
+ <option value="0.9" selected="true" >90%</option>
+ <option value="1.0" >100%</option>
+ </select>
+
+ <br />
+ </p>
+
+ <table border="0" id="table1" cellspacing="4px">
+ <tr><td colspan="6" height="10px"></td></tr>
+ <tr>
+ <td width="10px"></td>
+ <td colspan="4"><p class="intro" align="left">
+ Let Delphi infer that an object has</p>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr>
+ <td width="10px"></td>
+ <td><p class="label" align="right">Concept:</p></td>
+ <td>
+ <input id="InfConcept" type="text" maxlength="150" size="40" value=""
/>
+ <input id="InfConceptID" type="hidden" value="10000" />
+ </td>
+ <td><input type="image" src="{$themeroot}/images/choose.gif"
onclick="ShowChooser('InfConcept','InfConceptID');"/></td>
+ <td></td>
+ <td width="10px"></td>
+ </tr>
+ <tr>
+ <td width="10px"></td>
+ <td><p class="label" align="right">Notes:</p></td>
+ <td colspan="3">
+ <textarea rows="2" id="InfNotes" cols="40"></textarea>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr><td colspan="6"><hr></td>
+ </tr>
+ <tr id="ReqModeRow">
+ <td width="10px"></td>
+ <td><p class="intro" align="right">When it has:</p></td>
+ <td colspan="3"><p class="intro up">
+ <select id="InfReqSel" SelectedIndex="0">
+ <option value="0" selected="true" >All</option>
+ <option value="1" >Any</option>
+ </select> of the following concepts:</p>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr>
+ <td width="10px"></td>
+ <td colspan="4"><p align="right">
+ <input id="MoreReqBtn" type="button" value="(Add more)"
style="font-size: 8pt" onclick="addReqRow();"/>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr><td colspan="6" height="15px"></td>
+ <tr id="ExclModeRow">
+ <td width="10px"></td>
+ <td><p class="intro" align="right">Unless it has:</p></td>
+ <td colspan="3"><p class="intro up">
+ <select id="InfExclSel" SelectedIndex="1">
+ <option value="0" >All</option>
+ <option value="1" selected="true">Any</option>
+ </select> of the following concepts:</p>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr>
+ <td width="10px"></td>
+ <td colspan="4"><p align="right">
+ <input id="MoreExclBtn" type="button" value="(Add more)"
style="font-size: 8pt" onclick="addExclRow();"/>
+ </td>
+ <td width="10px"></td>
+ </tr>
+ <tr><td colspan="6"><hr></td>
+ <tr><td colspan="6">
+ <p align="center"> <input id="CommitBtn" type="button" value="Add this
rule"
+ style="font-size:10pt;font-weight:bold" onclick="prepareAddInfXML();"
/></p>
+ </td></tr>
+ <tr><td colspan="6" height="10px"></td></tr>
+ </table>
+
+ </div>
+ {if isset($opmsg) }
+ <p>{$opmsg}</p>
+ {/if}
+{/if}
+{include file="footer.tpl"}
=======================================
--- /trunk/schemas/addBaseRolesAndPerms.sql Sun Nov 29 23:11:44 2009
+++ /trunk/schemas/addBaseRolesAndPerms.sql Mon Nov 30 10:30:13 2009
@@ -12,7 +12,8 @@
( 5, 'MarkFavorites', 'Permission to add and remove items from default
Favorites set.', now() ),
( 6, 'ViewBaseCMSInfo', 'Permission to see basic details of the
Collection management system, such as object number. This does not include
access to sensitive information.', now() ),
( 7, 'ViewSensitiveInfo', 'Permission to see sensitive information from
the Collections metadata.', now() ),
- ( 8, 'EditNewsContent', 'Permission to News Content Items.', now() );
+ ( 8, 'EditNewsContent', 'Permission to edit News Content Items.', now()
),
+ ( 9, 'EditInferences', 'Permission to add and edit complex ontology
inference rules.', now() );
INSERT INTO role_perms( role_id, perm_id, creation_time ) VALUES
( 1, 1, now() ),
@@ -22,12 +23,14 @@
( 1, 5, now() ),
( 1, 6, now() ),
( 1, 8, now() ),
+ ( 1, 9, now() ),
( 2, 4, now() ),
( 2, 5, now() ),
( 3, 4, now() ),
( 3, 5, now() ),
( 3, 6, now() ),
( 3, 7, now() ),
+ ( 3, 9, now() ),
( 4, 4, now() ),
( 4, 5, now() ),
( 4, 6, now() );
=======================================
--- /trunk/themes/pahma/templates/admin.tpl Wed Jul 15 00:27:54 2009
+++ /trunk/themes/pahma/templates/admin.tpl Mon Nov 30 10:30:13 2009
@@ -19,6 +19,8 @@
{/if}
<dt><h3><a href="editNews.php?id=1">Edit News Content</a></h3></dt>
<dd>Creates News items for display on the front page.</dd>
+<dt><h3><a href="../ontotools/addInference.php">Add Ontology Inference
Rule</a></h3></dt>
+<dd>Creates new inference rules to be used by the indexing tools.</dd>
</dl>
<p></p>
<p></p>