Index: trunk/extensions/Wikidata/App.php |
— | — | @@ -112,7 +112,8 @@ |
113 | 113 | 'ow_will_insert'=>"Will insert the following:", |
114 | 114 | 'ow_contents_of_mapping'=>'Contents of mapping', |
115 | 115 | 'ow_available_contexts'=>'Available contexts', |
116 | | - 'add_concept_link'=>'Add link to other concepts' |
| 116 | + 'add_concept_link'=>'Add link to other concepts', |
| 117 | + 'ow_concept_panel'=>'Concept Panel' |
117 | 118 | ) |
118 | 119 | ); |
119 | 120 | |
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php |
— | — | @@ -154,22 +154,27 @@ |
155 | 155 | $active=true; # wrong place, but hey |
156 | 156 | $dm=$this->getDefinedMeaningId(); |
157 | 157 | $dc=wdGetDataSetContext(); |
158 | | - $ow_conceptpanel="Concept Panel"; |
| 158 | + $ow_conceptpanel=wfMsg("ow_concept_panel"); |
159 | 159 | |
160 | 160 | $html="<div class=\"dataset-panel\">";; |
161 | 161 | $html.="<table border=\"0\"><tr><th class=\"dataset-panel-heading\">$ow_conceptpanel</th></tr>"; |
162 | 162 | $sk=$wgUser->getSkin(); |
163 | 163 | $meanings=getDefinedMeaningDataAssociatedByConcept($dm,$dc); |
164 | | - foreach ($meanings as $dm) { |
165 | | - $dataset=$dm->getDataset(); |
166 | | - $active=($dataset->getPrefix()==$dc->getPrefix()); |
167 | | - $name=$dataset->fetchName(); |
168 | | - #$name="woo"; |
169 | | - $prefix=$dataset->getPrefix(); |
170 | | - |
171 | | - $class= $active ? 'dataset-panel-active' : 'dataset-panel-inactive'; |
172 | | - $slot = $active ? "$name" : $sk->makeLinkObj($dm->getTitle(),$name,"dataset=$prefix"); |
173 | | - $html.="<tr><td class=\"$class\">$slot</td></tr>"; |
| 164 | + if($meanings) { |
| 165 | + foreach ($meanings as $dm) { |
| 166 | + $dataset=$dm->getDataset(); |
| 167 | + $active=($dataset->getPrefix()==$dc->getPrefix()); |
| 168 | + $name=$dataset->fetchName(); |
| 169 | + #$name="woo"; |
| 170 | + $prefix=$dataset->getPrefix(); |
| 171 | + |
| 172 | + $class= $active ? 'dataset-panel-active' : 'dataset-panel-inactive'; |
| 173 | + $slot = $active ? "$name" : $sk->makeLinkObj($dm->getTitle(),$name,"dataset=$prefix"); |
| 174 | + $html.="<tr><td class=\"$class\">$slot</td></tr>"; |
| 175 | + } |
| 176 | + } else { |
| 177 | + $name=$dc->fetchName(); |
| 178 | + $html.="<tr><td class=\"dataset-panel-active\">$name</td></tr>"; |
174 | 179 | } |
175 | 180 | $cmtitle=Title::newFromText("Special:ConceptMapping"); |
176 | 181 | $titleText=$wgTitle->getPrefixedURL(); |