<panel class="backroom_advice_panel" save_current_state="true">
  <colour id="unread_advice_headline_colour" name="unread headline"/>
  <colour id="unread_label_text_colour" name="unread category"/>
  <colour id="read_label_text_colour" name="read category"/>
  <colour id="read_advice_headline_colour" name="read headline"/>
  <colour id="selected_advice_headline_colour" name="selected headline"/>
  <colour id="selected_label_text_colour" name="selected category"/>
  <string id="unread_item_appearance" value="" translate="false"/>
  <string id="read_item_appearance" value="table/custom/inbox/row" translate="false"/>
  <string id="unread_item_appearance" value="table/custom/inbox/row" translate="false"/>
  <string id="selected_item_appearance" value="table/custom/inbox/hilight/row" translate="false"/>

  <string id="unread_item_icon" value="icons/news/unread" translate="false"/>
  <string id="read_item_icon" value="icons/news/read" translate="false"/>
  <string id="selected_item_icon" value="icons/news/read" translate="false"/>

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

  <container class="titled_box" title="Backroom Advice[COMMENT: team screen section; panel for showing backroom advice]">
    <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
    <layout class="arrange_vertical_attachment" alignment="top, extend" offset="0"/>

    <!-- Hide/Show filters button -->
    <container embed_in_frame="true">
      <layout class="arrange_horizontal_attachment" alignment="right" embed_in_frame="true" gap="5" offset="0"/>
      <layout class="stick_to_sides_attachment" alignment="top" inset="2" layout_children="true" embed_in_frame="true"/>
      <layout class="stick_to_sides_attachment" alignment="top, right" embed_in_frame="true" inset="0"/>

      <layout class="fit_children_attachment" alignment="vertical" embed_in_frame="true"/>
      <layout class="fit_children_attachment" alignment="horizontal, fill" embed_in_frame="true"/>

      <widget class="embedded_action_button" id="sopt" text="Show Filters[COMMENT: backroom advice; button for showing advice filtering options]" auto_size="horizontal" embed_in_frame="true" click_event="sopt"/>
    </container>

    <!-- Filter bar -->
    <container id="opts" hidden="true" class="plain_box" appearance="boxes/toolbar/paper">
      <layout class="centre_in_parent_attachment" alignment="vertical" layout_children="true"/>
      <layout class="fit_children_attachment" alignment="vertical"/>
      <layout class="arrange_horizontal_attachment" alignment="left"/>

      <widget class="label" text="Show advice on:[COMMENT: backroom advice; label text followed by a list of areas of advice which can be toggled by the user]" spec="text, small" style="bold" alignment="left, centre_y" auto_size="all"/>
      <widget class="check_box" id="fman" click_event="filt" text="Man Management[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true"  auto_size="all"/>
      <widget class="check_box" id="frec" click_event="filt" text="Recruitment[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true"  auto_size="all"/>
      <widget class="check_box" id="fsqd" click_event="filt" text="Squad Management[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true"  auto_size="all"/>
      <widget class="check_box" id="ftac" click_event="filt" text="Tactical[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true"  auto_size="all"/>
      <widget class="check_box" id="ftrn" click_event="filt" text="Training[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true"  auto_size="all"/>
      <widget class="check_box" id="fyou" click_event="filt" text="Youth Development[COMMENT: backroom advice; advice category filter]" spec="text, small" value="true" auto_size="all"/>

      <widget class="label" text="By:[COMMENT: backroom advice; label text followed by a list of backroom staff who the user would like to give the backroom advice]" spec="text, small" style="bold" alignment="right, centre_y" auto_size="vertical" width="30"/>
      <widget class="popup_button" id="fstf" fixed="false" select_event="sfil" auto_size="vertical" width="200"/>
    </container>

    <!-- Main area -->
    <container>
      <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0"/>
      <layout class="arrange_horizontal_attachment" alignment="left, extend" offset="0"/>

      <!-- Advice list -->
      <container class="subsection_box" id="indb" appearance="boxes/subsection/inbox index" width="300">
        <layout class="stick_to_sides_attachment" alignment="all" layout_children="true"/>
        <widget class="table" id="btab" layout="-1" select_event="stad" mode="fill_rows, select_rows" fixed_size_rows="false" auto_size_rows="true">
          <!-- Contents dynamically generated in code -->
        </widget>
      </container>

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

        <!-- No unread advice container -->
        <widget class="text" id="noad" alignment="centre_x, centre_y" text="There is no unread advice currently available.[COMMENT: Backroom advice, Text for when the user has read all available advice]" hidden="true"/>

        <!-- Advice container-->
        <container id="avco">
          <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
          <layout class="arrange_vertical_attachment" alignment="top, extend"/>

          <!-- Top section with adviser portrait and stats -->
          <container class="bordered_box" height="80">
            <layout class="arrange_horizontal_attachment" layout="60, -1, -1, 170"/>
            <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true"/>

            <!-- Adviser portrait -->
            <container class="client_object_viewer_xml_panel" id="port" width="60">
              <layout class="stick_to_sides_attachment" alignment="all" layout_children="true" inset="0"/>

              <widget class="picture" id="prop" scale_picture="true" keep_aspect_ratio="true" image_alignment="true">
                <attachment class="test_setting_attachment" get_setting="show_portraits" default_value="true" set_property="hidn">
                  <list id="value">
                    <boolean value="false"/>
                  </list>
                </attachment>

                <record id="object_property">
                  <list id="get_properties">
                    <record>
                      <integer id="get_property" value="fcgn"/>
                      <!--Facegen data request-->
                    </record>
                    <record>
                      <integer id="get_property" value="Pfke" />
                      <!--Fake name request-->
                    </record>
                    <record>
                      <integer id="get_property" value="prpc"/>
                      <integer id="set_property" value="valu"/>
                    </record>
                  </list>
                </record>
              </widget>
            </container>

            <!-- Name and job -->
            <container>
              <layout class="arrange_vertical_attachment" alignment="top, extend"/>
              <layout class="centre_in_parent_attachment" alignment="vertical"/>
              <layout class="fit_children_attachment" alignment="vertical, fill"/>
              <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"/>

              <widget class="text" id="anam" spec="text, large" auto_size="all" style="semi_bold, embossed" colour="title"/>
              <widget class="label" id="ajob" colour="grey" auto_size="all"/>
            </container>

            <!-- Stat bar labels -->
            <container>
              <layout class="stick_to_sides_attachment" alignment="right" layout_children="true"  inset="0"/>
              <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true"  inset="0"/>

              <container>
                <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"  inset="0"/>
                <layout class="fit_children_attachment" alignment="horizontal"/>
                <layout class="stick_to_sides_attachment" alignment="right" layout_children="true"  inset="0"/>
                <layout class="arrange_vertical_attachment" layout="-1, -1" offset="0" gap="14"/>

                <widget class="label" id="aml1" alignment="left, bottom" auto_size="horizontal"/>
                <widget class="label" id="aml2" alignment="left, top" auto_size="horizontal"/>
              </container>
            </container>

            <!-- Stat bars -->
            <container>
              <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"  inset="0"/>
              <layout class="arrange_vertical_attachment" layout="-1, -1" offset="0" gap="6"/>

              <container>
                <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"  inset="0"/>
                <layout class="arrange_vertical_attachment" alignment="bottom" offset="0"/>

                <widget class="horizontal_percentage_bar" id="ams1" height="18"/>
              </container>
              <container>
                <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true"  inset="0"/>
                <layout class="arrange_vertical_attachment" alignment="top" offset="0"/>

                <widget class="horizontal_percentage_bar" id="ams2" height="18"/>
              </container>
            </container>
          </container>

          <!-- Lower section showing advice and bio-pic panel -->
          <container>
            <layout class="arrange_horizontal_attachment" layout="-1, 170" offset="0" gap="0"/>
            <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0"/>

            <container>
              <layout class="arrange_vertical_attachment" alignment="top, extend" offset="0"/>
              <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>

              <!-- Speech bubble -->
              <container class="plain_box" appearance="boxes/speech bubbles/inbox/paper" height="250">
                <layout class="arrange_vertical_attachment" alignment="bottom, extend" offset="1" gap="0"/>
                <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>

                <!-- Advice text -->
                <widget class="text" id="advc" alignment="left, top" >
                  <layout class="stick_to_sides_attachment" alignment="horizontal" inset="15"/>
                </widget>

                <!-- Advice buttons -->
                <container>
                  <layout class="fit_children_attachment" alignment="vertical, fill" offset="1"/>
                  <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="4"/>
                  <layout class="arrange_vertical_attachment" alignment="top" offset="0" gap="6"/>

                  <!-- Action buttons -->
                  <container>
                    <layout class="fit_children_attachment" alignment="vertical" offset="0"/>
                    <layout class="stick_to_sides_attachment" alignment="top" layout_children="true" inset="0"/>
                    <layout class="arrange_horizontal_attachment" alignment="right" offset="4"/>

                    <widget class="icon_button" id="acb1" hidden="true" auto_size="all" click_event="ab1a"/>
                    <widget class="icon_button" id="acb2" hidden="true" auto_size="all" click_event="ab2a"/>
                    <widget class="icon_button" id="acb3" hidden="true" auto_size="all" click_event="ab3a"/>
                  </container>

                  <container>
                    <layout class="fit_children_attachment" alignment="vertical" offset="0"/>
                    <layout class="stick_to_sides_attachment" alignment="bottom" layout_children="true" inset="0"/>
                    <layout class="arrange_horizontal_attachment" alignment="right" offset="0"/>

                    <!-- Popup button and 'fake' one used to indicate it's been actioned -->
                    <widget class="popup_button" id="alrb" hidden="true" auto_size="all" select_event="alra"/>
                    <widget class="icon_button" id="alrf" hidden="true" auto_size="all" />
                    
                    <widget class="icon_button" id="adpb" hidden="true" auto_size="all" click_event="adpa"/>
                    <widget class="icon_button" id="amqb" hidden="true" auto_size="all" click_event="amqa"/>
                    <!-- Link button -->
                    <widget class="action_button" id="srbt" hidden="true" auto_size="all" click_event="scre" appearance="button/link/button"/>
                    <!-- Dismiss advice button -->
                    <widget class="action_button" id="dmbt" hidden="true" auto_size="all" click_event="dmad"/>
                  </container>
                </container>
              </container>

              <container id="nurA">
                <layout class="arrange_horizontal_attachment" alignment="right" offset="10"/>
                <layout class="stick_to_sides_attachment" alignment="top" layout_children="true" inset="0"/>

                <widget class="action_button" id="rest" click_event="rest" auto_size="all" hidden="true" >
                  <string id="text" value="Debug: Reset Buttons" translate="false" />
                </widget>
                <widget class="action_button_blue" click_event="next" text="Next Unread Advice[COMMENT:backroom advice; button to go to next unread advice]" auto_size="all"/>
              </container>
            </container>

            <widget class="client_object_biopic_panel" id="cobp" image_alignment="left, top"/>
          </container>

        </container>
      </container>
    </container>
  </container>
</panel>
