Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchTriple.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | require_once( "$IP/includes/SpecialPage.php" ); |
21 | 21 | |
22 | 22 | function doSpecialSearchTriple($par = null) { |
23 | | - global $wgOut, $wgRequest; |
| 23 | + global $wgOut, $wgRequest, $wgUser; |
24 | 24 | |
25 | 25 | $out = ''; |
26 | 26 | $searchtype = $wgRequest->getVal('do'); |
— | — | @@ -32,6 +32,15 @@ |
33 | 33 | $relation = ucfirst($relation); |
34 | 34 | $attribute = ucfirst($attribute); |
35 | 35 | |
| 36 | + |
| 37 | + $sk =& $wgUser->getSkin(); |
| 38 | + $out .= '<h2>' . wfMsg('redirectpagesub') . '</h2>'; |
| 39 | + $out .= '<ul><li>' . $sk->makeKnownLinkObj(Title::newFromText('Browse',NS_SPECIAL), wfMsg('browse') ) . '</li>'; |
| 40 | + $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('SearchByRelation',NS_SPECIAL), wfMsg('searchbyrelation') ) . '</li>'; |
| 41 | + $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('SearchByAttribute',NS_SPECIAL), wfMsg('searchbyattribute') ) . '</li>'; |
| 42 | + $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('Ask',NS_SPECIAL), wfMsg('ask') ) . '</li></ul>'; |
| 43 | + $out .= '<br /><br /><div style="border: 1px solid grey; padding: 20px; background: #DDD; ">'; |
| 44 | + |
36 | 45 | $out .= SMWSpecialSearchTriple::getSearchForm($subject, $relation, $object, $attribute, $value, $searchtype); |
37 | 46 | // find out what the user wants: |
38 | 47 | if ( ($searchtype==wfMsg('smw_searchtriple_searchatt')) || ($searchtype=='Search Attributes')) { |
— | — | @@ -43,6 +52,7 @@ |
44 | 53 | } // else: just don't do anything |
45 | 54 | |
46 | 55 | $wgOut->setPageTitle(wfMsg('searchtriple')); |
| 56 | + $out .= '</div>'; |
47 | 57 | $wgOut->addHTML($out); |
48 | 58 | } |
49 | 59 | |
— | — | @@ -66,7 +76,7 @@ |
67 | 77 | // '<input id="rel" type="radio" name="searchtype" value="relation" checked="checked" /><label for="rel">Relation</label>'. |
68 | 78 | // '<input id="att" type="radio" name="searchtype" value="attribute" checked="checked" /><label for="att">Attribute</label>'; |
69 | 79 | |
70 | | - $form .= '<table summary="layout table" style="padding: 4px 5px; border:0px; border-collapse:collapse;">' . "\n"; |
| 80 | + $form .= '<table summary="layout table" style="padding: 4px 5px; border:0px; border-collapse:collapse; background: none; ">' . "\n"; |
71 | 81 | //line 1 and 2: search for relations |
72 | 82 | $form .= '<tr>' . "\n"; |
73 | 83 | $form .= '<td>' . wfMsg('smw_searchtriple_subject') . '</td>' . "\n"; |
— | — | @@ -75,10 +85,10 @@ |
76 | 86 | $form .= '<td></td>' . "\n"; |
77 | 87 | $form .= '</tr>' . "\n"; |
78 | 88 | $form .= '<tr>' . "\n"; |
79 | | - $form .= '<td><input type="text" name="subject" value="' . htmlspecialchars($subject) . '"/></td>' . "\n"; |
80 | | - $form .= '<td><input type="text" name="relation" value="' . htmlspecialchars($relation) . '"/></td>' . "\n"; |
81 | | - $form .= '<td><input type="text" name="object" value="' . htmlspecialchars($object) . '"/></td>' . "\n"; |
82 | | - $form .= '<td><input type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchrel') . '"/></td>' . "\n"; |
| 89 | + $form .= '<td><input disabled="disabled" type="text" name="subject" value="' . htmlspecialchars($subject) . '"/></td>' . "\n"; |
| 90 | + $form .= '<td><input disabled="disabled" type="text" name="relation" value="' . htmlspecialchars($relation) . '"/></td>' . "\n"; |
| 91 | + $form .= '<td><input disabled="disabled" type="text" name="object" value="' . htmlspecialchars($object) . '"/></td>' . "\n"; |
| 92 | + $form .= '<td><input disabled="disabled" type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchrel') . '"/></td>' . "\n"; |
83 | 93 | $form .= '</tr>' . "\n"; |
84 | 94 | //line 3 and 4: search for attributes |
85 | 95 | $form .= '<tr>' . "\n"; |
— | — | @@ -89,9 +99,9 @@ |
90 | 100 | $form .= '</tr>' . "\n"; |
91 | 101 | $form .= '<tr>' . "\n"; |
92 | 102 | $form .= '<td></td>' . "\n"; |
93 | | - $form .= '<td><input type="text" name="attribute" value="' . htmlspecialchars($attribute) . '"/></td>' . "\n"; |
94 | | - $form .= '<td><input type="text" name="value" value="' . htmlspecialchars($value) . '"/></td>' . "\n"; |
95 | | - $form .= '<td><input type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchatt') . '"/></td>' . "\n"; |
| 103 | + $form .= '<td><input disabled="disabled" type="text" name="attribute" value="' . htmlspecialchars($attribute) . '"/></td>' . "\n"; |
| 104 | + $form .= '<td><input disabled="disabled" type="text" name="value" value="' . htmlspecialchars($value) . '"/></td>' . "\n"; |
| 105 | + $form .= '<td><input disabled="disabled" type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchatt') . '"/></td>' . "\n"; |
96 | 106 | $form .= '</tr>' . "\n"; |
97 | 107 | $form .= "</table> \n </form> \n <br/><hr/> \n"; |
98 | 108 | |