{*------------------------------------------------------------------------------- * Dataface Web Application Framework * Copyright (C) 2005-2006 Steve Hannah (shannah@sfu.ca) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *------------------------------------------------------------------------------- *}{if !$ENV.APPLICATION_OBJECT->main_content_only}{define_slot name="doctype_tag"}{/define_slot} {define_slot name="html_tag"}{/define_slot} {if !$ENV.prefs.no_history} {php} $app =& Dataface_Application::getInstance(); $_SESSION['--redirect'] = $app->url(''); {/php} {/if} {define_slot name="html_head"} {define_slot name="html_title"}{if $ENV.record}{$ENV.record->getTitle()} - {else}{$ENV.table_object->getLabel()} - {/if}{if $ENV.APPLICATION.title}{$ENV.APPLICATION.title}{else}Dataface Application{/if}{/define_slot} {define_slot name="dataface_stylesheets"}{/define_slot} {define_slot name="custom_stylesheets"}{/define_slot} {block name="custom_stylesheets2"} {define_slot name="dataface_javascripts"} {if $ENV.APPLICATION.usage_mode == 'edit'} {/if} {/define_slot} {* Add the head content that is to be inserted in the head of the document. This was added in version 1.0 to provide an easier way to add custom Stylesheets and javascripts to the pages. *} {foreach from=$ENV.APPLICATION_OBJECT->headContent item=headContent} {$headContent} {/foreach} {define_slot name="custom_javascripts"} {/define_slot} {define_slot name="head_slot"} {/define_slot} {include file="head_slot.html"} {block name="head"} {/define_slot} {block name="before_body"} {define_slot name="html_body"}
{block name="before_header"} {define_slot name="global_header"}{include file="global_header.html"}{/define_slot} {block name="after_header"} {if $ENV.prefs.show_search} {block name="before_search"} {define_slot name="search_form"}
{actions category="find_actions" var="find_actions"} {if $find_actions|@count > 1} {else} {foreach from=$find_actions item="find_action"} {assign var=option_value value=$find_action.action} {if !$option_value} {assign var=option_value value=$find_action.name} {/if} {/foreach} {/if} {block name="after_search_form_submit"}
{/define_slot} {block name="after_search"} {/if} {if $ENV.prefs.horizontal_tables_menu and $ENV.prefs.show_tables_menu} {block name="before_nav_menu"} {include file="Dataface_NavMenu.html"} {block name="after_nav_menu"} {/if}
{if !$ENV.prefs.hide_language_selector} {block name="before_language_selector"} {define_slot name="language_selector"}
{language_selector autosubmit="true" type="ul" use_flags=false}
{/define_slot} {block name="after_language_selector"} {/if} {if !$ENV.prefs.hide_user_status}
{if $ENV.username} {block name="before_user_status_logged_in"} {define_slot name="user_status_logged_in"}{assign var='username' value=$ENV.username}{translate id="Logged in as user" username=$username}Logged in as {$username}{/translate} ({translate id="scripts.GLOBAL.LABEL_LOGOUT}Logout{/translate}){/define_slot} {block name="after_user_status_logged_in"} {elseif $APP->getAuthenticationTool()} {block name="before_user_status_not_logged_in"} {define_slot name="user_status_not_logged_in"}{translate id="scripts.GLOBAL.LABEL_LOGIN"}Login{/translate}{/define_slot} {block name="after_user_status_not_logged_in"} {/if}
{/if}
{if !$ENV.prefs.hide_personal_tools} {if $ENV.user} {block name="before_personal_tools"} {define_slot name="personal_tools"} {actions_menu id="personal-tools" category="personal_tools" id_prefix="personal_tools_"} {/define_slot} {block name="after_personal_tools"} {/if} {/if} {if $ENV.prefs.show_bread_crumbs} {block name="before_bread_crumbs"} {define_slot name="bread_crumbs"}{/define_slot} {block name="after_bread_crumbs"} {/if}
{block name="before_main_table"} {define_slot name="main_table"}
{block name="before_left_column"} {define_slot name="left_column"} {if $ENV.prefs.show_record_tree} {block name="before_record_tree"} {load_record var="record"} {include file="RecordNavMenu.html" record=$record} {block name="after_record_tree"} {/if} {if !$ENV.prefs.horizontal_tables_menu and $ENV.prefs.show_tables_menu} {block name="before_nav_menu"} {include file="Dataface_NavMenu.html"} {block name="after_nav_menu"} {/if} {block name="before_application_menu"} {define_slot name="application_menu"}{include file="Dataface_Application_Menu.html"}{/define_slot} {block name="after_application_menu"} {/define_slot} {block name="after_left_column"} {block name="before_main_column"} {define_slot name="main_column"} {if $back and !$ENV.APPLICATION.hide_back} {/if}
{if $ENV.APPLICATION_OBJECT->numMessages() > 0 } {block name="before_message"}
    {block name="message"} {foreach from=$ENV.APPLICATION_OBJECT->getMessages() item="msg"}
  • {$msg|nl2br}
  • {/foreach}
{block name="after_message"} {/if} {if $ENV.APPLICATION_OBJECT->numErrors() > 0 } {block name="before_errors"}
{translate id="scripts.GLOBAL.HEADING_ERRORS"}Errors{/translate}
    {block name="error"} {foreach from=$ENV.APPLICATION_OBJECT->getErrors() item="error"}
  • {$error->getMessage()|nl2br}
  • {/foreach}
{block name="after_errors"} {/if} {if $ENV.prefs.show_table_tabs} {block name="before_table_tabs"} {define_slot name="table_tabs"} {actions_menu id="table_tabs" id_prefix="table-tabs-" class="contentViews" category="table_tabs" selected_action=$ENV.mode} {/define_slot} {block name="before_menus"} {define_slot name="menus"}{include file="Dataface_TableView_menus.html"}{/define_slot} {block name="after_menus"} {/if} {if $ENV.prefs.show_table_tabs}
{/if} {block name="before_main_section"} {define_slot name="main_section"} {if $history and !$ENV.APPLICATION.hide_history} {block name="before_recently_viewed"}
{translate id="scripts.GLOBAL.LABEL_RECENT_RECORDS"}Recent Records{/translate}:
{block name="after_recently_viewed"} {/if}
{block name="before_record_content"} {define_slot name="record_content"} {$body} {/define_slot} {block name="after_record_content"}
{/define_slot} {block name="after_main_section"} {if $ENV.prefs.show_table_tabs}
{/if} {/define_slot}
{/define_slot} {define_slot name="fineprint"} {block name="before_fineprint"} {include file="Dataface_Fineprint.html"} {block name="after_fineprint"} {/define_slot} {block name="before_global_footer"} {define_slot name="global_footer"}{include file="global_footer.html"}{/define_slot} {block name="after_global_footer"} {/define_slot} {else} {* We are only showing the main section on this round *} {* Block to be displayed before the main section of the page. *} {block name="before_main_section"} {* The main content of the page. *} {define_slot name="main_section"} {if $history and !$ENV.APPLICATION.hide_history} {*Block to be shown just before the 'recently viewed' records. *} {block name="before_recently_viewed"}
{translate id="scripts.GLOBAL.LABEL_RECENT_RECORDS"}Recent Records:{/translate}
{* Block to be shown just after the 'recently viewed' records menu. *} {block name="after_recently_viewed"} {/if}
{* Content to be shown before the record content in the Main Template. *} {block name="before_record_content"} {* Slot to fill in with record content. *} {define_slot name="record_content"} {$body} {/define_slot} {* Content to be shown just after record content in the Main Template. *} {block name="after_record_content"}
{/define_slot} {block name="after_main_section"} {/if} {* End if main_content_only*}