from django.contrib import admin

from tabbed_admin import TabbedModelAdmin
from .models import TournamentPage

# Register your models here.


@admin.register(TournamentPage)
class BandAdmin(TabbedModelAdmin):
    model = TournamentPage

    list_display = ['name', 'link', 'published']

    tab_general = (
        (None, {
            'fields': ('name', 'published', 'header', 'footer')
        }),
    )

    tab_homepage = (
        (None, {
            'fields': ('homepage', 'homepage_buttons')
        }),
    )

    tab_schedule_and_results = (
        (None, {
            'fields': ('schedule_and_results', 'schedule_and_results_enabled', 'schedule_and_results_buttons')
        }),
    )

    tab_registration = (
        (None, {
            'fields': ('registration', 'registration_enabled', 'registration_buttons')
        }),
    )

    tab_rules = (
        (None, {
            'fields': ('rules', 'rules_enabled', 'rules_buttons')
        }),
    )

    tab_fee_and_prizes = (
        (None, {
            'fields': ('fee_and_prizes', 'fee_and_prizes_enabled', 'fee_and_prizes_buttons')
        }),
    )

    tab_accomodation = (
        (None, {
            'fields': ('accomodation', 'accomodation_enabled', 'accomodation_buttons')
        }),
    )

    tab_contact = (
        (None, {
            'fields': ('contact', 'contact_enabled', 'contact_buttons')
        }),
    )

    tabs = [
        ('Ogólne ustawienia', tab_general),
        ('Strona główna', tab_homepage),
        ('Harmonogram i wyniki', tab_schedule_and_results),
        ('Rejestracja', tab_registration),
        ('Regulamin', tab_rules),
        ('Wpisowe i nagrody', tab_fee_and_prizes),
        ('Noclegi', tab_accomodation),
        ('Kontakt', tab_contact),
    ]
