<div class="card card-primary h-100">
    <div class="card-header">
        <h5 class="card-title">{{ gT("Survey general settings")}}</h5>
        <a class="float-end btn btn-outline-secondary btn-xs pjax" data-bs-toggle="tooltip" title="{{gT('General survey settings')}}" href="{{createUrl('surveyAdministration/rendersidemenulink', {'subaction':'generalsettings', 'surveyid':surveyid})}}">
            <i class="ri-tools-line"></i>
        </a>
    </div>
    <ul class="list-group list-group-flush">
        <!-- Owner -->

        <li class="list-group-item p-0 border-0">
            <div class="ls-flex-row col-12">
               <div class="col-4 card-label">
                    {{gT("Owner:")}}
                </div>
                <div class="col-8 ls-card-grid__description">
                        {{ flattenText(oSurvey.aOptions['owner']['users_name'] ~ ' (' ~ oSurvey.aOptions['owner']['email'] ~ ')') }}
                </div>
            </div>
        </li>
        <!-- Administrator -->
        <li class="list-group-item p-0 border-0">
            <div class="ls-flex-row col-12">
               <div class="col-4 card-label">
                    {{gT("Administrator:")}}
                </div>
                <div class="col-8 ls-card-grid__description">
                        {{ flattenText(oSurvey.aOptions['admin'] ~ ' (' ~ oSurvey.aOptions['adminemail'] ~ ')') }}
                </div>
            </div>
        </li>
        <!-- Theme -->
        <li class="list-group-item p-0 border-0">
            <div class="ls-flex-row col-12">
               <div class="col-4 card-label">
                    {{ gT("Theme:") }}
                </div>
                <div class="col-8 ls-card-grid__description">

                    {% if templateModel is defined %}
                        {% if checkPermission('templates','read') %}
                            {% set sTemplateOptionsUrl = createUrl("themeOptions/updateSurvey", {'surveyid' : oSurvey.sid} ) %}
                            {% set sTemplateEditorUrl = createUrl("admin/themes/sa/view", {'templatename' : oSurvey.aOptions['template'] } ) %}
                            {{templateModel.title}} ( {{templateModel.name}} )
                            <a href='{{sTemplateOptionsUrl}}' title="{{ gT("Edit theme options")}}" class="btn btn-outline-secondary btn-xs float-end"><i class="ri-contrast-drop-line"></i></a>
                            <a href='{{sTemplateEditorUrl}}' title="{{ gT("Open theme editor in new window")}}" target="_blank" class="btn btn-outline-secondary btn-xs float-end"><i class="ri-pencil-line"></i></a>
                        {% else %}
                            {{oSurvey.aOptions['template']}}
                        {% endif %}
                    {% else %}
                        {% set errorMessage = sprintf( gT('Error: Theme "%s" is not installed.'), oSurvey.aOptions['template']) %}
                        {{errorMessage}}
                    {% endif %}
                </div>

            </div>
        </li>
    </ul>
</div>
