diff --git a/inc/template.php b/inc/template.php index 71eec0e6af9086caddd24c0a8d64e0eb9d82a43a..e108a843b7bdbb5128d90053e4b618b42c427314 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1303,7 +1303,7 @@ function tpl_actiondropdown($empty='',$button='>'){ * @param string $img - print image? (|button|badge) * @param bool $return - when true don't print, but return HTML */ -function tpl_license($img='badge',$return=false){ +function tpl_license($img='badge',$imgonly=false,$return=false){ global $license; global $conf; global $lang; @@ -1311,7 +1311,7 @@ function tpl_license($img='badge',$return=false){ if(!is_array($license[$conf['license']])) return ''; $lic = $license[$conf['license']]; - $out = '<p class="license">'; + $out = '<div class="license">'; if($img){ $src = license_img($img); if($src){ @@ -1320,11 +1320,13 @@ function tpl_license($img='badge',$return=false){ $out .= '><img src="'.DOKU_BASE.$src.'" class="medialeft lic'.$img.'" alt="'.$lic['name'].'" /></a> '; } } - $out .= $lang['license']; - $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"'; - if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"'; - $out .= '>'.$lic['name'].'</a>'; - $out .= '</p>'; + if(!$imgonly) { + $out .= $lang['license']; + $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"'; + if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"'; + $out .= '>'.$lic['name'].'</a>'; + $out .= '</div>'; + } if($return) return $out; echo $out; diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index b2af3f448d924f8d27b1e5960047506a3b637a6a..d8e4ddad9fd08cd30ff20c0af295294f305c6005 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -171,14 +171,15 @@ div.dokuwiki div#draft__status { color: __text_alt__; } -div.dokuwiki form#dw__editform div.license { - clear: left; +div.dokuwiki div.license { + padding: 0.5em; font-size: 90%; + text-align: center; } -div.dokuwiki p.license { +div.dokuwiki form#dw__editform div.license { + clear: left; font-size: 90%; - text-align: center; } /* --------- buttons ------------------- */