<?xml version="1.0" encoding="UTF-8"?>

<panel>

  <layout class="stick_to_sides_attachment" alignment="all" layout_children="true"/>

  <container class="titled_box" id="nMat" title="Next Match" appearance="boxes/titled/home">
    <layout class="stick_to_sides_attachment" alignment="all" layout_children="true" inset="0"/>

    <!--container shown when there is a next match available-->
    <container id="nemc">

      <layout class="arrange_horizontal_attachment" alignment="left,extend" offset="-4" gap="0"/>
      <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0"/>

      <!--Panel for competition badge - can be hidden if there is no badge-->
      <container id="cbdg">
        <layout class="arrange_vertical_attachment" alignment="top" offset="0" gap="0"/>
        <layout class="centre_in_parent_attachment" alignment="horizontal" layout_children="true"/>

        <!--badge-->
        <widget class="picture" id="coba" image_alignment="left" scale_picture="true" keep_aspect_ratio="true"/>

      </container>

      <!--panel for next fixture and league table/fixtures-->
      <container>
        <layout class="arrange_horizontal_attachment" alignment="fill" offset="0" gap="0"/>
        <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="5"/>

        <!--Panel for next fixture details-->
        <container>
          <layout class="arrange_vertical_attachment" layout="130,-1" offset="0" gap="0"/>
          <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"/>

          <widget class="team_upcoming_fixture_badges_panel" id="tmbp"/>

          <widget class="team_upcoming_fixture_info_panel" id="tmip"/>

        </container>

        <container>

          <layout class="arrange_vertical_attachment" alignment="bottom, extend" offset="0" gap="5"/>
          <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"/>

          <!--container with league table/fixtures in-->
          <container class="subsection_box" appearance="boxes/plain/white">
            <layout class="stick_to_sides_attachment" alignment="all" layout_children="true"/>

            <!--hidden this until we get tabs (feature request for FM2011)-->
            <!--<container class="mini_fixture_list" id="mifi"/>-->
            <container class="manager_upcoming_fixtures_panel" id="mufp"/>
          </container>

          <!--button panel for fixtures/competition-->
          <container>
            <layout class="arrange_horizontal_attachment" alignment="right" offset="0" gap="10"/>
            <layout class="stick_to_sides_attachment" alignment="top" inset="0" layout_children="true"/>
            <layout class="fit_children_attachment" alignment="vertical" offset="0"/>

            <widget class="action_button" text="Competition[COMMENT:button leading to competition page]" id="comb" auto_size="horizontal" appearance="button/link/button"/>
            <widget class="action_button" id="fixb" auto_size="horizontal" appearance="button/link/button"/>
          </container>
        </container>

      </container>

    </container>

    <!--container shown when there is no next match-->
    <container id="nonm">

      <layout class="arrange_vertical_attachment" alignment="top" offset="0" gap="0"/>
      <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"/>

      <!--spacer-->
      <container height="10"/>

      <!--team badge(s)-->
      <container>
        <layout class="arrange_horizontal_attachment" alignment="left" offset="0" gap="0"/>
        <layout class="stick_to_sides_attachment" alignment="top" layout_children="true"/>
        <layout class="fit_children_attachment" alignment="all" priority="1"/>
        <layout class="centre_in_parent_attachment" alignment="horizontal"/>

        <widget class="picture" height="130" width="130" id="tepi" image_alignment="left" scale_picture="true" keep_aspect_ratio="true"/>
        <widget class="picture" height="130" width="130" id="napi" image_alignment="left" scale_picture="true" keep_aspect_ratio="true"/>
      </container>

      <!--explanatory text-->
      <widget class="text" text="You currently don't have any matches planned." alignment="centre" spec="text,large" style="semi_bold, embossed" auto_size="all">

      </widget>

      <!--text describing when the next season/competition starts-->
      <widget class="text" id="nmpl" auto_size="all" alignment="centre" size="8">

      </widget>

      <!--buttons to arrange a friendly-->
      <widget class="action_button" text="Arrange Club Friendly" id="arcf" auto_size="horizontal" appearance="button/link/button">
        <layout class="centre_in_parent_attachment" alignment="horizontal"/>
      </widget>
      <widget class="action_button" text="Arrange National Friendly" id="arnf" auto_size="horizontal" appearance="button/link/button">
        <layout class="centre_in_parent_attachment" alignment="horizontal"/>
      </widget>

    </container>

    <!--container shown when manager is unemployed-->
    <container id="unem">

      <layout class="arrange_vertical_attachment" alignment="top" offset="0" gap="0"/>
      <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"/>

      <!--spacer-->
      <container height="10"/>

      <!--manager logo-->
      <container>
        <layout class="arrange_horizontal_attachment" alignment="left"/>
        <layout class="stick_to_sides_attachment" alignment="top" layout_children="true"/>
        <layout class="fit_children_attachment" alignment="all" priority="1"/>
        <layout class="centre_in_parent_attachment" alignment="horizontal"/>

        <widget class="picture" height="130" width="130" id="mapi" image_alignment="left" scale_picture="true" keep_aspect_ratio="true">
        </widget>
      </container>

      <!--explanatory text-->
      <widget class="text" text="You are currently unemployed." alignment="centre" spec="large" auto_size="all" style="semi_bold, embossed"/>
      <widget class="text" text="You can look for available jobs in the Jobs section." alignment="centre" size="8" auto_size="all"/>

      <!--button to look for jobs-->
      <widget class="action_button" text="Job Centre" id="jobc" auto_size="horizontal" appearance="button/link/button">
        <layout class="centre_in_parent_attachment" alignment="horizontal"/>
      </widget>

    </container>

  </container>

</panel>
