<div id="theme-detail" class="box controller ui-widget-content ui-corner-all">
	<div class="controller-box">
		<div class="sub-box description">
			<?php
				if (empty($theme['description'])) {
					echo '（テーマ説明無し）';
				} else {
					echo nl2br(h($theme['description']));
				}
			?>
		</div>
		<div class="sub-box description">
			<?php
				if (empty($theme['key1']) && empty($theme['key2']) && empty($theme['key3'])) {
					echo '（キーワード登録無し）';
				} else {
					echo '<h3>キーワード</h3>';
					echo '<ul class="description">';
					foreach (array($theme['key1'], $theme['key2'], $theme['key3']) as $k) {
						if (empty($k))
							continue;
						echo '<li><a href="'.u('keyword/'.rawurlencode($k)).'">'.h($k).'</a></li>';
					}
					echo '</ul>';
				}
			?>
		</div>
		<div id="theme-favorite" class="sub-box description">
		</div>
		<script type="text/javascript">
			T.getFavorite($("#theme-favorite"), "theme", "<?php echo h($theme['name']);?>");
		</script>
<?php
if (can_action('edit_theme')) {
?>
		<div class="sub-box description">
			<a href="<?php echo u('edit_theme/'.rawurlencode($theme['name']));?>">編集</a>
		</div>
<?php
}
?>
<?php
	if (can_action('operation')) {
?>
		<div class="sub-box delete_box">
			<a id="delete_link" href="javascript:T.O.delTheme('<?php echo h($theme['name']);?>')">削除</a>
		</div>
<?php
	}
?>
	</div>
</div>
