<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
 width="470"
 height="420"
 label="Members &amp; Roles"
 layout="topleft"
 left="0"
 top="0"
 follows="all"
 name="roles_tab">

    <panel.string
     name="default_needs_apply_text">
        There are unsaved changes
    </panel.string>
    <panel.string
     name="want_apply_text">
        Do you want to save your changes?
    </panel.string>
    <panel.string
     name="help_text" />

    <!-- separates the tab panel from the options underneath -->

    <tab_container
     name="roles_tab_container"
     left="0"
     top="0"
     right="-1"
     height="188"
     halign="center"
     tab_position="top"
     follows="top|left|right"
     layout="topleft">

<!-- MEMBERS sub tab -->

        <panel
         name="members_sub_tab"
         label="Members"
         tool_tip="Members"
         help_topic="roles_members_tab"
         left="0"
         top="0"
         right="-1"
         height="188"
         class="panel_group_members_subtab"
         follows="all"
         layout="topleft">

            <panel.string
             name="help_text">
                You can add or remove Roles assigned to Members.
Select multiple Members by holding the Ctrl key and
clicking on their names.
            </panel.string>
            <panel.string
             name="donation_area">
                [AREA] m²
            </panel.string>
            <panel.string
             name="power_folder_icon" translate="false">
                Inv_FolderClosed
            </panel.string>
            <panel.string
             name="power_all_have_icon" translate="false">
                Checkbox_On
            </panel.string>
            <panel.string
             name="power_partial_icon" translate="false">
                Checkbox_Off
            </panel.string>

            <filter_editor
             layout="topleft"
             top="5"
             left="5"
             right="-5"
             height="22"
             search_button_visible="false"
             follows="left|top|right"
             label="Filter Members"
             name="filter_input" />

            <name_list
             name="member_list"
             left="1"
             top_pad="5"
             right="-1"
             height="129"
             column_padding="2"
             draw_heading="true"
             multi_select="true"
             short_names="false"
             follows="all"
             layout="topleft">

                <name_list.columns
                 label="Member"
                 name="name"
                 relative_width="0.50" />
                <name_list.columns
                 label="Donation"
                 name="donated"
                 relative_width="0.15" />
                <name_list.columns
                 label="Status"
                 name="online"
                 relative_width="0.18" />
                <name_list.columns
                 label="Title"
                 name="title"
                 relative_width="0.18" />
            </name_list>

            <button
             name="member_invite"
             label="Invite"
             left="3"
             top_pad="4"
             width="100"
             height="23"
             follows="bottom|left"
             layout="topleft" />

            <button
             name="member_eject"
             label="Eject"
             left_pad="4"
             width="100"
             height="23"
             follows="bottom|left"
             layout="topleft" />

            <button
             height="23"
             label="Ban Member(s)"
             follows="bottom|left"
             left_pad="4"
             name="member_ban"
             width="100"
             layout="topleft" />

            <button
             name="export_list"
             label="Export List"
             left_pad="4"
             width="100"
             height="23"
             follows="bottom|left"
             layout="topleft" />
        </panel>

<!-- ROLES sub tab -->

        <panel
         name="roles_sub_tab"
         label="Roles"
         tool_tip="Roles"
         help_topic="roles_roles_tab"
         left="0"
         top="0"
         right="-1"
         height="188"
         class="panel_group_roles_subtab"
         follows="all"
         layout="topleft">
           <!-- <button
             enabled="false"
             height="20"
             label="Show All"
             layout="topleft"
             top="-65"
             right="-5"
             name="show_all_button"
             width="100" />-->
            <panel.string
             name="help_text">
            Roles have a title and an allowed list of Abilities
that Members can perform. Members can belong to
one or more Roles. A group can have up to 10 Roles,
including the Everyone and Owner Roles.
            </panel.string>
            <panel.string
             name="cant_delete_role">
            The &apos;Everyone&apos; and &apos;Owners&apos; Roles are special and can't be deleted.
            </panel.string>
            <panel.string
             name="power_folder_icon" translate="false">
            Inv_FolderClosed
            </panel.string>
            <panel.string
             name="power_all_have_icon" translate="false">
            Checkbox_On
            </panel.string>
            <panel.string
             name="power_partial_icon" translate="false">
            Checkbox_Off
            </panel.string>

            <filter_editor
             layout="topleft"
             top="5"
             left="5"
             right="-5"
             height="22"
             search_button_visible="false"
             follows="left|top|right"
             label="Filter Roles"
             name="filter_input" />

            <scroll_list
             name="role_list"
             left="3"
             top_pad="5"
             right="-1"
             height="129"
             column_padding="0"
             draw_heading="true"
             draw_stripes="false"
             heading_height="23"
             search_column="1"
             follows="all"
             layout="topleft">

                <scroll_list.columns
                 label="Role"
                 name="name"
               relative_width="0.45"  />
                <scroll_list.columns
                 label="Title"
                 name="title"
               relative_width="0.45"  />
                <scroll_list.columns
                 label="#"
                 name="members"
               relative_width="0.15"  />
            </scroll_list>

            <button
             name="role_create"
             label="New Role"
             left="3"
             top_pad="4"
             width="100"
             height="23"
             follows="bottom|left"
             layout="topleft" />

            <button
             follows="bottom|left"
             height="23"
             label="Copy Role"
             layout="topleft"
             left_pad="4"
             name="role_copy"
             width="100" />

            <button
             name="role_delete"
             label="Delete Role"
             left_pad="4"
             width="100"
             height="23"
             follows="bottom|left"
             layout="topleft" />
        </panel>

<!-- ABILITIES sub tab -->

        <panel
         name="actions_sub_tab"
         label="Abilities"
         tool_tip="You can view an Ability&apos;s Description and which Roles and Members can execute the Ability."
         help_topic="roles_actions_tab"
         left="0"
         top="0"
         right="-1"
         height="188"
         class="panel_group_actions_subtab"
         follows="all"
         layout="topleft">

            <panel.string
             name="help_text">
                Abilities allow Members in Roles to do specific
things in this group. There&apos;s a broad variety of Abilities.
            </panel.string>
            <panel.string
             name="power_folder_icon" translate="false">
                Inv_FolderClosed
            </panel.string>
            <panel.string
             name="power_all_have_icon" translate="false">
                Checkbox_On
            </panel.string>
            <panel.string
             name="power_partial_icon" translate="false">
                Checkbox_Off
            </panel.string>

         <filter_editor
         layout="topleft"
         top="5"
         left="5"
         right="-5"
         height="22"
         search_button_visible="false"
         follows="left|top|right"
         label="Filter Abilities"
         name="filter_input" />

        <scroll_list
         name="action_list"
         tool_tip="Select an Ability to view more details"
         left="0"
         top_pad="5"
         right="-1"
         height="161"
         column_padding="0"
         draw_stripes="true"
         search_column="2"
         follows="all"
         layout="topleft">



            <scroll_list.columns
             label=""
             name="icon"
             width="2" />
            <scroll_list.columns
             label=""
             name="checkbox"
             width="20" />
            <scroll_list.columns
             label=""
             name="action"/>

        </scroll_list>
        </panel>

    <panel
     border="false"
     height="303"
     label="Banned Residents"
     layout="topleft"
     left="0"
     right="-1"
     help_topic="roles_banlist_tab"
     name="banlist_sub_tab"
     class="panel_group_banlist_subtab"
     tool_tip="View the banned residents from this group."
     width="310">
      <panel.string
       name="help_text">
        Any resident on the ban list will be unable to join the group.
      </panel.string>
      <panel.string
       name="ban_count_template">
        Ban count: [COUNT]/[LIMIT]
      </panel.string>

      <filter_editor
       layout="topleft"
       top="5"
       left="5"
       right="-5"
       height="22"
       search_button_visible="false"
       follows="left|top|right"
       label="Filter Ban List"
       name="filter_input" />

      <name_list
           column_padding="0"
           draw_heading="true"
           height="114"
           follows="left|top|right"
           layout="topleft"
           left="0"
           right="-1"
           multi_select="true"
           name="ban_list"
           short_names="false"
           sort_column="0"
           name_column="name"
           top_pad="5">
        <name_list.columns
         label="Resident"
         name="name"
         font.name="SANSSERIF_SMALL"
         font.style="NORMAL"
         relative_width="0.7" />
        <name_list.columns
         label="Date Banned"
         name="ban_date"
         relative_width="0.3" />
      </name_list>
      <button
        follows="top|left"
        height="23"
        label="Ban Resident(s)"
        layout="topleft"
        left="3"
        name="ban_create"
        tool_tip="Ban residents from your group"
        width="120" />
      <button
        follows="top|left"
        height="23"
        label="Remove Ban(s)"
        layout="topleft"
        left_pad="5"
        name="ban_delete"
        tool_tip="Unban selected residents from your group"
        width="120" />
      <button
        follows="top|left"
        height="23"
        width="23"
        image_overlay="Refresh_Off"
        layout="topleft"
        left_pad="5"
        name="ban_refresh"
        tool_tip="Refresh the ban list"
        />
      <text
        type="string"
        height="18"
        left_pad="5"
        follows="top|left|right"
        layout="topleft"
        name="ban_count"
        use_ellipses="true"
        right="-1">
      </text>
    </panel>
  </tab_container>

<!--    </layout_panel> -->

    <!-- UI elements that get hidden or shown, depending on the currently selected tab -->
    <!-- currently commented out due to a bug or misbehavior of <scroll_list> and <name_list> in conjunction with <layout_stack> and follows="all" -->
<!--
    <layout_panel
     height="100"
     min_height="50"
     right="-1"
     name="group_members_roles_layout_panel"
     user_resize="true"
     follows="all"
     layout="topleft">
-->
<!-- MEMBERS footer -->

    <panel
     name="members_footer"
     top="192"
     left="4"
     right="-2"
     height="224"
     background_visible="false"
     bg_alpha_color="FloaterUnfocusBorderColor"
     follows="all"
     visible="false"
     layout="topleft">

    <!-- currently commented out due to a bug or misbehavior of <scroll_list> and <name_list> in conjunction with <layout_stack> and follows="all" -->

<!--
    <layout_stack
     name="group_members_footer_layout_stack"
     top_pad="4"
     right="-1"
     height="100"
     orientation="horizontal"
     follows="all"
     layout="topleft">

    <layout_panel
     right="-1"
     name="group_roles_layout_panel"
     user_resize="true"
     follows="all"
     layout="topleft">

//-->

        <text
         name="assigned_roles_label"
         left="0"
         right="-1"
         top_pad="4"
         height="16"
         type="string"
         text_color="EmphasisColor"
         follows="left|top|right"
         layout="topleft">
        Assigned Roles
        </text>

        <scroll_list
         name="member_assigned_roles"
         top_pad="0"
         right="-1"
         height="93"
         draw_stripes="true"
         follows="top|left|right"
         layout="topleft">
            <scroll_list.columns
             label=""
             name="checkbox"
             width="20" />
            <scroll_list.columns
             label=""
             name="role"
             width="135" />
        </scroll_list>

<!--

    </layout_panel>

    <layout_panel
     right="-1"
     min_height="94"
     name="group_members_tab_layout_panel"
     user_resize="true"
     layout="topleft">

//-->
        <text
         type="string"
         top_pad="4"
         right="-1"
         height="16"
         follows="left|top|right"
         text_color="EmphasisColor"
         name="static2"
         layout="topleft">
        Allowed Abilities
        </text>

        <scroll_list
         tool_tip="For details of each allowed ability see the abilities tab"
         right="-1"
         top_pad="0"
         height="93"
         draw_stripes="true"
         name="member_allowed_actions"
         search_column="2"
         follows="all"
         layout="topleft">
            <scroll_list.columns
             label=""
             name="icon"
             width="2" />
            <scroll_list.columns
             label=""
             name="checkbox"
             width="20" />
            <scroll_list.columns
             label=""
             name="action"/>
        </scroll_list>
<!--
    </layout_panel>
    </layout_stack>
//-->
    </panel>

<!-- ROLES footer -->

    <panel
     name="roles_footer"
     top="192"
     left="0"
     right="-1"
     height="226"
     background_visible="false"
     bg_alpha_color="FloaterUnfocusBorderColor"
     mouse_opaque="false"
     visible="false"
     follows="all"
     layout="topleft">

        <text
         name="role_name_label"
         left="5"
         top_pad="3"
         width="70"
         height="16"
         type="string"
         follows="left|top"
         layout="topleft">
        Role Name
        </text>

        <line_editor
         name="role_name"
         left_pad="4"
         right="-1"
         height="20"
         type="string"
         layout="topleft"
         follows="left|top|right"
         max_length_bytes="20">
        </line_editor>

        <text
         name="role_title_label"
         top_pad="4"
         left="5"
         width="70"
         height="16"
         type="string"
         follows="left|top"
         layout="topleft">
        Role Title
        </text>

        <line_editor
         name="role_title"
         left_pad="4"
         right="-1"
         height="20"
         type="string"
         follows="left|top|right"
         max_length_bytes="20"
         layout="topleft">
        </line_editor>

        <check_box
         top_pad="4"
         height="16"
         label="Reveal members"
         right="-140"
         layout="topleft"
         name="role_visible_in_list"
         tool_tip="Sets whether members of this role are visible in the General tab to people outside of the group."
         width="16"
         follows="top|right"/>

        <text
         name="description_label"
         top_delta="0"
         left="5"
         right="-1"
         height="16"
         type="string"
         follows="left|top"
         layout="topleft">
        Description
        </text>

        <text_editor
         type="string"
         layout="topleft"
         follows="left|top|right"
         right="-1"
         max_length="295"
         height="37"
         name="role_description"
         top_pad="0"
         left="5"
         width="300"
         word_wrap="true">
        </text_editor>

<!--
    <layout_stack
     name="role_members_abilities_layout_stack"
     top_pad="4"
     right="-1"
     height="55"
     orientation="horizontal"
     follows="all"
     layout="topleft">

    <layout_panel
     right="-1"
     name="role_members_layout_panel"
     user_resize="true"
     follows="all"
     layout="topleft">

     we need to use <panel> for now
//-->
    <panel
     name="group_roles_layout_panel"
     left="5"
     top_pad="4"
     right="-1"
     height="85"
     follows="top|left|right"
     layout="topleft">

        <text
         name="assigned_members_label"
         left="0"
         top_pad="0"
         right="-1"
         height="16"
         type="string"
         follows="left|top|right"
         text_color="EmphasisColor"
         layout="topleft">
        Assigned Members
        </text>

        <name_list
         name="role_assigned_members"
         left="0"
         top_pad="0"
         right="-1"
         height="69"
         draw_stripes="true"
         multi_select="true"
         follows="all"
         layout="topleft" />

    </panel>

<!--
    </layout_panel>

    <layout_panel
     right="-1"
     name="role_members_layout_panel"
     user_resize="true"
     follows="all"
     layout="topleft">
//-->
    <panel
     name="group_roles_layout_panel2"
     top_pad="4"
     right="-1"
     height="36"
     follows="all"
     layout="topleft">

        <text
         name="allowed_abilities_label"
         left="0"
         top_pad="0"
         right="-1"
         height="16"
         type="string"
         text_color="EmphasisColor"
         follows="left|top|right"
         layout="topleft">
        Allowed Abilities
        </text>

        <scroll_list
         name="role_allowed_actions"
         tool_tip="For details of each allowed ability see the abilities tab"
         top_pad="0"
         right="-1"
         height="20"
         draw_stripes="true"
         search_column="2"
         follows="all"
         layout="topleft">

            <scroll_list.columns
             label=""
             name="icon"
             width="2" />
            <scroll_list.columns
             label=""
             name="checkbox"
             width="20" />
            <scroll_list.columns
             label=""
             name="action"/>
        </scroll_list>
<!--
    </layout_panel>
    </layout_stack>
//-->

    </panel>
    </panel>

<!-- ABILITIES footer -->

    <panel
     name="actions_footer"
     top="192"
     left="4"
     right="-4"
     height="226"
     background_visible="false"
     bg_alpha_color="FloaterUnfocusBorderColor"
     mouse_opaque="false"
     visible="false"
     follows="all"
     layout="topleft">

        <panel
         top="0"
         left="0"
         right="-1"
         height="60"
         border="true"
         bevel_style="in"
         follows="left|top|right"
         layout="topleft"
	 name="action_description_panel">

        <text_editor
         name="action_description"
         top="0"
         left="0"
         right="-1"
         height="60"
         halign="left"
         bg_readonly_color="Transparent"
         font="SansSerifSmall"
         type="string"
         enabled="false"
         max_length="512"
         word_wrap="true"
         follows="left|top|right"
         layout="topleft">
        This Ability is &apos;Eject Members from this Group&apos;. Only an Owner can eject another Owner.
        </text_editor>

    </panel>
<!--
        <layout_stack
         name="abilities_members_actions_layout_stack"
         top_pad="4"
         right="-1"
         height="116"
         orientation="horizontal"
         follows="top"
         layout="topleft">

        <layout_panel
         right="-1"
         name="abilities_members_layout_panel"
         user_resize="true"
         follows="top"
         layout="topleft">
//-->

        <text
         name="action_roles_label"
         left="0"
         top_pad="0"
         right="-1"
         height="16"
         type="string"
         text_color="EmphasisColor"
         follows="left|top|right"
         layout="topleft">
        Roles with this ability
        </text>

        <scroll_list
         name="action_roles"
         top_pad="0"
         right="-1"
         height="90"
         follows="left|top|right"
         layout="topleft" />
<!--
        </layout_panel>
        <layout_panel
         right="-1"
         name="abilities_actions_layout_panel"
         user_resize="true"
         follows="top"
         layout="topleft">
//-->

        <text
         name="action_members_label"
         top_pad="0"
         right="-1"
         height="16"
         type="string"
         text_color="EmphasisColor"
         follows="top|left|right"
         layout="topleft">
        Members with this ability
        </text>

        <name_list
         name="action_members"
         left="0"
         top_pad="0"
         right="-1"
         height="46"
         multi_select="true"
         follows="all"
         layout="topleft" />
<!--
        </layout_panel>
        </layout_stack>
//-->
    </panel>
<!--
	</layout_panel>
    </layout_stack>
//-->
</panel>
