#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2011 Aimluck,Inc.
 * http://www.aipo.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *#

## ---------------------------------------------------------------------------
#if( ! $portlet.isClosed($data) )
#if($!isMaximized && ($!showTab == "true"))
                            <!-- MAIN TAB -->
                            <div id="mainTab" class="clearfix">
                              <ul class="tabContainer">
#foreach ( $tab in $tabs )
                               <li#if ($tab.Link && ($tab.isSelected() == true)) class="selectedMenu" #end>
                                  <div class="menuTitle"><a class="menuList" title="$tab.Title" href="$tab.Link">$tab.Title</a></div>
                                  <div class="menuIcon">
                                      #if ($!tab.Authority)#foreach ($action in $tab.Actions)
                                            #if (${client} == "IPAD")
                                            <a href="${action.Link}"><img class="img_icon" title="${action.Alt}" alt="${action.Alt}" src="${skin.getImage($action.Name,"images/${action.Name}.gif")}"/></a>
                                            #else
                                            <a href="javascript:void(0);" onclick="aipo.common.showDialog('$!{jslink}/js_pane/$!{tab.Id}?template=CustomizeFormScreen')"><img class="img_icon" title="${action.Alt}" alt="${action.Alt}" src="${skin.getImage($action.Name,"images/${action.Name}.gif")}"/></a>
                                            #end
                                      #end#end
                                  </div>
                                </li>
#end
                               <li class="tooltip_box">
                                 <div class="tooltip_gray">Aipoアプリを追加して、もっと便利に</div>
                                 <a href="http://store.aipo.com/" target="_blank">
                                   <img src="images/common/img_aipostore.gif" alt="" />
                                 </a>
                               </li>
                              </ul>
                            </div>
                            <!-- /MAIN TAB -->
                            <!-- MAIN OUTER -->
                            <table class="tableWrapper">
                              <tbody>
                                <tr>
                                  <td class="wide top">
                                    <div class="roundTopMain clearfix">
                                      <div class="roundRightMain">
                                        <div class="roundBottomMain">
                                          <div class="roundLeftMain">
                                            <div class="roundTopLeftMain">
                                              <div class="roundTopRightMain">
                                                <div class="roundBottomRightMain">
                                                  <div class="roundBottomLeftMain">
                                                    <div class="roundMainWrapper">
$portlet.getContent($data)
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </td>
                                </tr>
                              </tbody>
                            </table>
                            <!-- /MAIN OUTER  -->
#else
                                                              <!-- PORTLET OUTER -->
                                                              <div class="dojoDndItem $!portlet.ID">
                                                              <div class="roundTopBlock clearfix">
                                                                <div class="roundRightBlock">
                                                                  <div class="roundBottomBlock">
                                                                    <div class="roundLeftBlock">
                                                                      <div class="roundTopLeftBlock">
                                                                        <div class="roundTopRightBlock">
                                                                          <div class="roundBottomRightBlock" >
                                                                            <div class="roundBottomLeftBlock">
                                                                              <table class="roundBlockWrapperTop">
                                                                                <tbody>
                                                                                  <tr>
#if( !$!isMaximized  && $portlet.isShowTitleBar($data))
                                                                                    <td class="roundBlockTitle wide #if (${client} != "IPAD")dojoDndHandle#end"><a href="$!utils.escapeXML($!jslink.getAction("controls.Maximize",$!portlet.ID))">$!utils.escapeXML($portlet_instance.Title)</a></td>
#foreach ( $function in $functions )
                                                                                    <td class="roundBlockIcon"><a #if($function.Screen) href="javascript:void(0);" #if($!{function.AfterFunction}) onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template",$function.Mode).addQueryData("entityid","new"))','$!portlet.ID',${function.AfterFunction});" #else onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template",$function.Mode).addQueryData("entityid","new"))','$!portlet.ID');" #end #else href="$!utils.escapeXML($!jslink.getAction("controls.Maximize",$!portlet.ID).addQueryData("mode",$function.Mode))"#end><img class="img_icon" title="$function.Caption" alt="$function.Caption" src="images/$!function.Image"/>$function.Caption</a></td>
#end
<td class="roundBlockIcon last">
    #foreach ( $action in $actions )
    	#if (${client} == "IPAD")
    	<a href="$!utils.escapeXML(${action.Link})"><img class="img_icon" title="${action.Alt}" alt="${action.Alt}" src="${skin.getImage($action.Name,"images/common/${action.Name}.gif")}"/></a>
        #else
        <a href="javascript:void(0);" class='customizeMenuIcon' onclick="aipo.customize.showMenu('$!{portlet.ID}');"><img class="img_icon" title="${action.Alt}" alt="${action.Alt}" src="${skin.getImage($action.Name,"images/common/${action.Name}.gif")}"/></a>
        #end
    #end
    #if (${client} != "IPAD")
    <div class="menubar" id="menubar_$!{portlet.ID}" style="position:absolute;left:-5;top:5;display:none;">
        <ul>
            #foreach ( $action in $actions )
                <li><a href="$!utils.escapeXML(${action.Link})">設定</a></li>
            #end
            <li class="last"><a href="javascript:void(0);" onclick="aipo.customize.deletesubmit('$!jslink.getPortletById($!portlet.ID).addQueryData('template', 'CustomizeFormJSONScreen').addQueryData('mode', 'delete')', '$!portlet.ID', function(){ dojo.query('.dojoDndItem.$!{portlet.ID}').orphan() } );">削除</a></li>
        </ul>
    </div>
    #end
</td>

#else
                                                                                    <td class="roundBlockTitle dojoDndHandle">$!utils.escapeXML($portlet_instance.Title)</td>
                                                                                    <td class="roundBlockMenu dojoDndHandle"><span id="portletMenu"></span></td>
                                                                                    <td class="endcap"></td>
#end
                                                                                </tr>
                                                                                </tbody>
                                                                              </table>
                                                                              <div class="roundBlockWrapperBottom clearfix">
                                                                                <div class="roundBlockContent">
                                                                                  <div dojoType="aimluck.widget.Contentpane" widgetId="portlet_$!portlet.ID" id="portlet_$!portlet.ID">
$!portlet.getContent($data)
                                                                                  </div>
                                                                                </div>
                                                                              </div>
                                                                            </div>
                                                                          </div>
                                                                        </div>
                                                                      </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                              </div>
                                                              </div>
                                                              <!-- /PORTLET OUTER -->
#end
#end
