Jump to content

Average attendance widget?


Mikeonhisboat
 Share

Recommended Posts

team_stats_summary

            <!-- Average attendance -->
            <container>
                <var name="stat_shared_layout" />

                <widget class="picture" file="icons/custom/team stats/stadium" image_alignment="centre" />
                <container>
                    <var name="stat_label_layout" />

                    <widget class="label" icon_enabled="false" alignment="left,bottom">
                        <translation id="text" translation_id="229804" type="use" value="Average Attendance" />
                    </widget>
                    <container>
                        <var name="stat_value_layout" />

                        <widget class="number_label" size="large" style="bold" auto_size="horizontal" alignment="left,top">
                            <record id="object_property" get_property="Tava" dont_set_object="true" />
                        </widget>
                        <widget class="formatted_label" size="large" colour="faded text">
                            <record id="object_property" get_property="ToAR" dont_set_object="true" />
                            <list id="format">
                                <record value="0" />
                                <record value="1">
                                    <translation id="format" translation_id="385423" type="use" value="- [%number#1-nth][COMMENT: FR 10252; manager home - player stats panel; stat value relative to other teams in the league]" />
                                </record>
                                <record default_value="true">
                                    <translation id="format" translation_id="385422" type="use" value="- [%number#1-nth] highest[COMMENT: FR 10252; manager home - player stats panel; stat value relative to other teams in the league]" />
                                </record>
                            </list>
                        </widget>
                    </container>
                </container>
            </container>

Link to post
Share on other sites

Thanks - now have a new chalenge - trying to create an average attendance table listing all clubs in a league. Similar to the injury table in competition overview/profile.

Below is the code for the injury table panel. I was hoping to be able to change this to instead display average attendance rather than number of injuries. Anyone know how? I've tried changing id="inju" (highlighted in red below near bttom of code) to id="tava" or id="ToAR" with no joy. 

 

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

    <!-- titled box -->
    <container class="main_box">
        <layout class="arrange_vertical_attachment" alignment="top,extend" offset="0" />
        <layout class="stick_to_sides_attachment" alignment="horizontal" apply_to_children="true" inset="0" />

        <container>
            <layout class="arrange_horizontal_attachment" alignment="left" offset="0" gap="5" />
            <layout class="stick_to_sides_attachment" alignment="top" inset="0" apply_to_children="true" />
            <layout class="fit_children_attachment" alignment="vertical" offset="0" />

            <widget class="link_button_title" id="inTl" section="csin">
                <translation id="text" translation_id="247965" type="use" value="Injury Table" />
            </widget>
        </container>

        <!-- main table -->
        <widget class="table" id="hptb" mode="fill_rows, stripe_rows" layout="-1, 60" auto_size_rows="true" fixed_size_rows="false" row_spacing="0">

            <list id="default_sort_column">
                <integer value="inju" />
                <integer value="club" />
            </list>

            <!-- headings -->
            <list id="headings">
                <record alignment="left,centre_y">
                    <translation id="text" translation_id="229408" type="use" value="Team" />
                </record>
                <record alignment="centre">
                    <translation id="text" translation_id="256674" type="use" value="Injuries[COMMENT: competition_injury_table; column header; 8 character maximum]" />
                </record>
            </list>

            <!-- column display properties -->
            <list id="column_table_properties">
                <record indx="0" id="club" left="4"/>
                <record indx="1" id="inju" sort_disabled="false" sort_ascending="false" />
            </list>

            <list id="column_widget_properties">
                <record indx="0" alignment="left,centre_y" />
                <record indx="1" alignment="centre" spec="text" />
            </list>
        </widget>

    </container>
</panel>

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...