예제 #1
0
    public function render()
    {
        $output = "<div class=\"admin-bar\">";
        if (count($this->buttons) > 0) {
            ob_start();
            foreach ($this->buttons as $button) {
                ?>
			    <div class="admin-button ui-widget-header <?php 
                if ($button->active) {
                    ?>
active<?php 
                }
                ?>
 <?php 
                echo @$button->action_name;
                ?>
" title="<?php 
                echo @$button->title;
                ?>
">
			        <div class="icon"><?php 
                echo StdLib::load_image(@$button->image . ".png", "20px");
                ?>
</div>
			        <div class="button-text" <?php 
                if (@$button->text == "") {
                    ?>
style="display:none;"<?php 
                }
                ?>
> <?php 
                echo @$button->text;
                ?>
</div>
			    </div>
			    <?php 
            }
            $output .= ob_get_contents();
        }
        $output .= "</div>";
        ob_end_clean();
        $this->render_style();
        $this->render_js();
        echo $output;
    }
예제 #2
0
 /**
  * Get Icon
  * 
  * Returns the HTML for the icon that depends on the status of the message ("error","success","warning").
  * 
  * @param   (string)    $type   Type of message icon needed ("error","success","warning")
  * @return  (string)
  */
 public function get_icon($type)
 {
     $icon = "<div class='message-icon'>";
     switch ($type) {
         case "success":
             $icon .= StdLib::load_image("check-64", "16px", "16px");
             break;
         case "error":
             $icon .= StdLib::load_image("attention", "16px", "16px");
             break;
         default:
             $icon .= StdLib::load_image("flag_mark_blue", "16px", "16px");
             break;
     }
     if ($icon != "") {
         $icon .= "</div>";
     }
     return $icon;
 }
예제 #3
0
  * the library which can take months (execution-time speaking).
  * 
  * @param   (string)    $image      The name of the image to lookup
  * @return  (string,boolean)        Returns the path of the image or false if it can't find it
  */
 public static function get_cache($image)
 {
     if (isset(StdLib::$image_cache[$image])) {
         return StdLib::$image_cache[$image];
     }
     return false;
 }
 /**
  * Load Image Source
  * 
  * Function sets up and calls a recursive function to find an image in the image directorys. Returns a web
  * link to the image.
  * 
  * @param   (string)    $image      Image name to find.
  * @param   (string)    $subdir     Subdirectory to start looking for matching image.
  * @return  (string,boolean)        Returns web based path if found, false if not found
  */
 public static function load_image_source($image, $subdir = "")
 {
     # Get the URL target directory
     $target_dir = self::get_library_path(true) . $subdir;
     # Find the image in the target directory
     $image = self::find_image_path($image, $target_dir);
예제 #4
0
	jQuery(document).ready(function($){
		$("button").button();
		// This gets all the messages for this user
	});
	</script>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<div id="logo" style="position:relative;">
			<div id="logo-image" style="position:absolute;top:5px;left:15px;">
				<?php 
echo StdLib::load_image('person.png', "48px", "48px");
?>
			</div>
			<div id="logo-text">
				<?php 
echo CHtml::encode(Yii::app()->name);
?>
			</div>
			<div id="mainmenu">
				<?php 
if (Yii::app()->user->isGuest) {
    ?>
				<a href="<?php 
    echo Yii::app()->createUrl('login');
    ?>
">Login</a>
예제 #5
0
    ?>
",
			"data":			"tags="+$tag+"&cid=<?php 
    echo $contact->cid;
    ?>
",
			"dataType": "JSON",
			"success":	function(data){
				if(data.tags.length>0)
				{
					var $tagbox = "";
					$.each(data.tags, function(key,value){
						if(value!="")
						{
							$tagbox += '<div class=\"tag-container\">'+value+' <a href=\"#\"><?php 
    echo StdLib::load_image("remove.png", "13px", "13px");
    ?>
</a></div>';
						}
					});
					console.log($tagbox);
					$("div.contact-tags").html($tagbox);
					$("span#tag-count").text(data.tags.length);
				}
				$("div.tags input").val("").focus();
				$("div.tag-container img").fadeTo(100,.5);
				return true;
			}
		});
		return true;
	});
예제 #6
0
}
ul li {
  font-size:13px;
  padding-bottom:5px;
}
div.menu {
    margin-bottom:25px;
}
</style>
<div class="menu">
    <a href="<?php 
echo Yii::app()->createUrl('newdepartment');
?>
">
        <span class="flash"><?php 
echo StdLib::load_image("plus", "16px");
?>
</span> Add New Department
    </a>
</div>

<ul>
<?php 
foreach ($departments as $dept) {
    ?>
  <li><a href="<?php 
    echo Yii::app()->createUrl('dept');
    ?>
?deptid=<?php 
    echo $dept->deptid;
    ?>