Permalink
Browse files

new information tool for content and content type is now the tooltip

  • Loading branch information...
1 parent 6a75d6f commit ab611b3082de7c38c8ec7dd2594a696e4b745b22 @emad-elsaid committed Sep 13, 2009
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -33,6 +33,7 @@ function add_js( $script = '' )
/* get full URL if script path
* is local script
* */
+ $script = trim($script);
$CI =& get_instance();
if( is_local($script) )
{
@@ -74,6 +75,7 @@ function add_css( $style = '', $position = '' )
* */
else
{
+ $style = trim($style);
$CI =& get_instance();
switch( $position )
@@ -112,6 +114,7 @@ function add_dojo( $req = '' )
* */
else
{
+ $req = trim($req);
$CI =& get_instance();
if(! in_array($req, $CI->vunsy->dojo))
@@ -140,6 +143,7 @@ function add_header( $block='' )
* */
else
{
+ $block = trim($block);
$CI =& get_instance();
if(! in_array($block, $CI->vunsy->header))
@@ -161,13 +165,14 @@ function is_local( $path )
}
if ( ! function_exists('add')){
- function add( $item )
+ function add( $item, $position='' )
{
if( is_array( $item ) )
{
foreach( $item as $i )
add( $i );
+ return;
}
$item = trim( $item );
@@ -181,7 +186,7 @@ function add( $item )
}
else if( $ext=='css' )
{
- add_css( $item );
+ add_css( $item, $position );
return TRUE;
}
else if( $ext=='.js' )
@@ -0,0 +1,37 @@
+<?php
+ $content_id = $ci->uri->segment(5);
+ $content_ins = new Content();
+ $content_ins->get_by_id( $content_id );
+
+ if( ! $content_ins->exists() )
+ show_error( 'content not found' );
+
+ $parent_content = new Content();
+ $parent_content->get_by_id( $content_ins->parent_content );
+
+ $parent_section = new Section();
+ $parent_section->get_by_id( $content_ins->parent_section );
+
+ $data_table = array(
+ 'Content ID'=>$content_ins->id,
+ 'Content path'=>$content_ins->path,
+ 'Section'=>(empty($parent_section->name))? 'Index':$parent_section->name,
+ 'Subsections'=>($content_ins->subsection)? 'Yes':'No',
+ 'Parent'=>$parent_content->path,
+ 'Cell'=>$content_ins->cell,
+ 'Sort'=>$content_ins->sort
+ );
+
+ $ci->load->library('gui');
+ $ci->app->add_info('Content information and the containers');
+ echo $ci->gui->form( '#', $data_table );
+?>
+
+<style>
+label{
+ font-weight: bold;
+}
+tr{
+ border-bottom: 1px solid black;
+}
+</style>
@@ -5,7 +5,7 @@
add( 'jquery/theme/ui.core.css' );
add( 'jquery/jquery.js' );
-$script = <<<EOT
+add( <<<EOT
<script language="javascript" >
$(function(){
$('.editCtrl > .editCtrlToggler' ).click(function(){
@@ -23,8 +23,8 @@
});
});
</script>
-EOT;
-add( $script );
+EOT
+);
$p = new Content();
$p->get_by_id($parent);
@@ -33,7 +33,7 @@
?>
<div class="editCtrl vunsyCtrl" >
-<img class="editCtrlToggler" src="<?=$img_url?>edit show.png" >
+<img class="editCtrlToggler" src="<?=$img_url?>edit show.png" title="<?=substr( $path, strrpos($path,'/')+1,strrpos($path,'.')-strrpos($path,'/')-1 ) ?>" >
<span class="editGroup ui-helper-hidden" >
<?php if( $can_edit ){ ?>
@@ -63,7 +63,10 @@
<img src="<?=$img_url?>delete.png" title="Delete" >
</a>
<?php } ?>
-
+ <a class="iframe" href="<?= site_url("admin/app/content Inserter/info/$id") ?>" >
+ <img src="<?=$img_url?>info.png" title="Information" >
+ </a>
+
</span>
</div>
<?php } ?>
@@ -29,7 +29,7 @@
$XHR_URL = site_url('admin/app/editmode/'.(($ci->vunsy->edit_mode())?'viewmode':'editmode'));
-$scripts = <<<EOT
+add( <<<EOT
<script type="text/javascript">
@@ -61,6 +61,8 @@ function()
}
);
+
+// make trigger draggable to show content under it
$(function(){
$('.trigger').draggable({axis:'y'});
});
@@ -77,37 +79,37 @@ function admin_editmode_toolbar()
});
}
</script>
-EOT;
-add( $scripts );
+EOT
+);
?>
<div class="panel">
<a href="<?=base_url()?>/kfm" class="iframe" title="My Computer">
- <img src="<?="{$local}"?>kfm.png" /> My computer
+ <img src="<?=$local?>kfm.png" /> My computer
</a>
-<a href="<?="{$url}"?>user manager" class="iframe" title="Users manager" >
- <img src="<?="{$local}"?>users.png" /> User manager
+<a href="<?=$url?>user manager" class="iframe" title="Users manager" >
+ <img src="<?=$local?>users.png" /> User manager
</a>
-<a href="<?="{$url}"?>section manager" class="iframe" title="Sections manager">
- <img src="<?="{$local}"?>section.png" /> Sections manager
+<a href="<?=$url?>section manager" class="iframe" title="Sections manager">
+ <img src="<?=$local?>section.png" /> Sections manager
</a>
-<a href="<?="{$url}"?>Package manager" class="iframe" title="Package manager" >
- <img src="<?="{$local}"?>software.png" /> Package manager
+<a href="<?=$url?>Package manager" class="iframe" title="Package manager" >
+ <img src="<?=$local?>software.png" /> Package manager
</a>
-<a href="<?="{$url}"?>software manager" class="iframe" title="Software manager">
- <img src="<?="{$local}"?>software.png" /> Software manager
+<a href="<?=$url?>software manager" class="iframe" title="Software manager">
+ <img src="<?=$local?>software.png" /> Software manager
</a>
<br />
-<?="{$links_text}"?>
+<?=$links_text?>
<br />
<a href="javascript:admin_editmode_toolbar()" >
- <img src="<?="{$local}"?>editmode.png" title="Editmode toggle" /> Editmode toggle
+ <img src="<?=$local?>editmode.png" title="Editmode toggle" /> Toggle Edit mode
</a>
-<a href="<?="{$logout}"?>" >
- <img src="<?="{$local}"?>logout.png" title="Logout" /> Logout
+<a href="<?=$logout?>" >
+ <img src="<?=$local?>logout.png" title="Logout" /> Logout
</a>
</div>
<a class="ui-draggable trigger" href="#"></a>

0 comments on commit ab611b3

Please sign in to comment.