{if $us_major_version<15}
    <h2>{$i.work_packages_record}</h2>
{/if}
{if $working_users}
    <div id="work_packages_working_warning" class="warningsmall ui-corner-all" style="margin-left:0px; margin-right:0px; float: left;">{$working_users}</div>
{/if}

<style id="work_package_view_style_css" scoped></style>

<div id="work_packages_head">
    <form action="" method="post" class="ui-corner-all" style="clear:both;">
        <fieldset class="ui-widget-header ui-corner-all noborder">
            <div style="float:right; padding: 3px;">
                <div style="display: inline-block;">
                    {include file='r/select.tpl' name="history_entries" title="work_packages_history_entries"
                    list=$history_entries id='id' text='dateinfo' labelclass="label2" filter_extra="onchange='work_packages.history.load_data()'" mapdata="datestr"}

                    <span id="edit_history_info" class="dialog_make_text_btn ui-corner-all"
                        onclick="work_packages.history.open_edit_info();">
                            <span class="dialog_make_btn16 edit ui-corner-all" title="{$i.work_packages_edit_history_info}"></span>
                            {$i.work_packages_edit_history_info}
                    </span>  
                    <span id="delete_history_entry" class="dialog_make_text_btn ui-corner-all"
                        onclick="work_packages.history.delete_history_entry();">
                            <span class="dialog_make_btn16 delete ui-corner-all" title="{$i.work_packages_delete_history_entry}"></span>
                            {$i.work_packages_delete_history_entry}
                    </span>  
                    <span id="edit_first_archive" class="dialog_make_text_btn ui-corner-all"
                        onclick="work_packages.history.open_edit_first_archive();">
                            <span class="dialog_make_btn16 edit ui-corner-all" title="{$i.work_packages_edit_first_archive}"></span>
                            {$i.work_packages_edit_first_archive}
                    </span>  
                </div>
                <div style="display: inline-block;">
                    {include file='r/hidden.tpl' name="work_package_view_style" default=$view_style}
                    <span id="work_package_view_style3" onclick="work_packages.load_tree_nodes({$project_id}, 3);" class="dialog_make_text_btn ui-corner-all">{$i.work_packages_edit_table}</span>
                    <span id="work_package_view_style1" onclick="work_packages.load_tree_nodes({$project_id}, 1);" class="dialog_make_text_btn ui-corner-all">{$i.work_packages_organigram}</span>
                    <span id="work_package_view_style2" onclick="work_packages.load_tree_nodes({$project_id}, 2);" class="dialog_make_text_btn ui-corner-all">{$i.work_packages_list}</span>
                </div> 
            </div>
            <div id="work_packages_warning_offers" class="warningsmall ui-corner-all" style="float: left; margin: 0 3px; display:none;">
            </div>
            <div id="work_packages_warning" class="warningsmall ui-corner-all" style="float: left; margin: 0 3px; display:none;">
                {$i.work_packages_warning_auto_calc}
            </div>
        </fieldset>
    </form>
</div>
            
<div id="work_packages_content" class="work_package_tree" style="position:relative; overflow:auto; white-space: nowrap; padding: 0 5px 20px 0">
    {$i.basic_loading}
</div>

{include file='r_forms/editable_popform.tpl' id="work_packages"}
        {include file='Work_packages/edit_popform.tpl'}

        {if $have_hoai}
            <div id="work_package_show_hoai_info" class="warningsmall warningborder ui-corner-all">{$i.work_packages_add_hoai_right}</div>
            <div id="work_package_is_hoai" class="warningsmall warningborder ui-corner-all">{$i.work_packages_is_hoai}</div>
        {/if}
        <div class="warningsmall warningborder ui-corner-all">{$i.work_packages_add_branch_preset_text}</div>
    </div>
</form>
