Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php |
— | — | @@ -51,6 +51,8 @@ |
52 | 52 | $html .= '<input type="text" name="article" value="' . htmlspecialchars($articletext) . '" />' . "\n"; |
53 | 53 | $html .= '<input type="submit" value="' . wfMsg('smw_browse_go') . "\"/>\n</form>\n"; |
54 | 54 | |
| 55 | + $vsep = '<tr><td colspan="2"><div class="smwhr"><hr /></div></td></tr>'; |
| 56 | + |
55 | 57 | if ('' == $articletext) { // empty, no article name given |
56 | 58 | $html .= wfMsg('smw_browse_docu') . "\n"; |
57 | 59 | } elseif ('in' == $mode) { // incoming links |
— | — | @@ -82,7 +84,7 @@ |
83 | 85 | // no need to show the navigation bars when there is not enough to navigate |
84 | 86 | if (($offset>0) || (count($results)>$limit)) |
85 | 87 | $html .= $navigation; |
86 | | - $html .= '<table style="width: 100%; "><tr><td colspan="2"><hr /></td></tr>' . "\n"; |
| 88 | + $html .= '<table style="width: 100%; ">' . $vsep . "\n"; |
87 | 89 | foreach ($results as $result) { |
88 | 90 | $innerlimit = 6; |
89 | 91 | $subjectoptions = new SMWRequestOptions(); |
— | — | @@ -96,13 +98,13 @@ |
97 | 99 | $innercount += 1; |
98 | 100 | if (($innercount < $innerlimit) || !$more) { |
99 | 101 | $subjectlink = SMWInfolink::newBrowsingLink('+',$subject->getText(), FALSE); |
100 | | - $html .= $skin->makeKnownLinkObj($subject) . ' ' . $subjectlink->getHTML($skin); |
| 102 | + $html .= $skin->makeKnownLinkObj($subject) . ' ' . $subjectlink->getHTML($skin); |
101 | 103 | if ($innercount<$subjectcount) $html .= ", \n"; |
102 | 104 | } else { |
103 | 105 | $html .= '<a href="' . $skin->makeSpecialUrl('SearchByRelation', 'type=' . urlencode($result->getText()) . '&target=' . urlencode($article->getText())) . '">' . wfMsg("smw_browse_more") . "</a><br />\n"; |
104 | 106 | } |
105 | 107 | } |
106 | | - $html .= '</td><td class="smwrelright">' . $skin->makeLinkObj($result, $result->getText()) . " " . $article->getText() . '</td></tr><tr><td colspan="2"><hr /></td></tr>' . "\n"; |
| 108 | + $html .= '</td><td class="smwrelright">' . $skin->makeLinkObj($result, $result->getText()) . " " . $article->getText() . '</td></tr>' . $vsep . "\n"; |
107 | 109 | } |
108 | 110 | $html .= "</table>\n"; |
109 | 111 | } |
— | — | @@ -118,18 +120,22 @@ |
119 | 121 | $html .= wfMsg( 'smw_browse_noout', $skin->makeSpecialUrl('SMWBrowse', 'article=' . urlencode($articletext) . '&mode=in' )); |
120 | 122 | } else { |
121 | 123 | $html .= 'See all <a href="' . $skin->makeSpecialUrl('SMWBrowse', 'mode=in&article=' . urlencode($articletext)) . '">incoming links of ' . $article->getText() . "</a><br /><br />\n"; // TODO |
122 | | - $html .= '<table style="width: 100%; ">' . "\n"; |
| 124 | + $html .= '<table style="width: 100%; ">'. $vsep . "\n"; |
123 | 125 | foreach ($results as $result) { |
124 | 126 | $objectoptions = new SMWRequestOptions(); |
125 | 127 | $html .= '<tr><td class="smwattname">' . "\n"; |
126 | 128 | $html .= $skin->makeLinkObj($result, $result->getText()) . "\n"; |
127 | 129 | $html .= '</td><td class="smwatts">' . "\n"; |
128 | 130 | $objects = &smwfGetStore()->getRelationObjects($article, $result, $objectoptions); |
| 131 | + $objectcount = count($objects); |
| 132 | + $count = 0; |
129 | 133 | foreach ($objects as $object) { |
| 134 | + $count += 1; |
130 | 135 | $searchlink = SMWInfolink::newBrowsingLink('+',$object->getText()); |
131 | | - $html .= $skin->makeLinkObj($object) . $searchlink->getHTML($skin) . "<br />\n"; |
| 136 | + $html .= $skin->makeLinkObj($object) . ' ' . $searchlink->getHTML($skin); |
| 137 | + if ($count<$objectcount) $html .= ", "; |
132 | 138 | } |
133 | | - $html .= "</td></tr>\n"; |
| 139 | + $html .= '</td></tr>'.$vsep."\n"; |
134 | 140 | } |
135 | 141 | $html .= "</table>\n"; |
136 | 142 | } |
Index: trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css |
— | — | @@ -104,6 +104,11 @@ |
105 | 105 | border-top: 1px dotted #AAAAAA; |
106 | 106 | } |
107 | 107 | |
| 108 | +div.smwhr hr{ |
| 109 | + background-color: #DDDDDD; |
| 110 | + color: #DDDDDD; |
| 111 | +} |
| 112 | + |
108 | 113 | /* warning messages */ |
109 | 114 | |
110 | 115 | span.smwwarning{ |