<commit_before>{% extends 'AdminBundle::layout.institution.html.twig' %}

{% set centerTerm = getClassLabel('institution_medical_center') %}
{% set centerLabel = centerTerm.singular | title %}
{% set centersLabel = centerTerm.plural | title %}

{% block content %}
    <div class="span9">
        {% include '::notice.admin.html.twig' %}

        
        {% embed 'HelperBundle:Widgets:section.html.twig' 
            with { 
                title: centersLabel,
                actions:  isSingleCenter ? [] : [{link: path('admin_institution_medicalCenter_add', {institutionId:institution.id}), label: 'Add ' ~ centerLabel, 'icon' : 'icon-plus' }]  
            }
        %}
        
        {% block sectionContent %}
            {% autoescape false %} {{ listFilters is defined ? listFilters : '' }} {% endautoescape %}
                {% if institutionMedicalCenters is not empty %}
                <table id="city-list" class="table table-bordered sortable-list">
                    <tr>
                       <th>Clinics</th>
                       <th>Description</th>
                       <th>Status</th>
                       <th>Actions</th>
                    </tr>
                    
                    {% for center in institutionMedicalCenters %}
                    <tr>
                        <td>{{ center.name }}</td>
                        <td style="width: 425px";>{{ center.description  | raw  }}</td>
                        <td>{{ get_medical_center_status_label(center) }}</td>
                        <td><a href="{{ path('admin_institution_medicalCenter_view', {imcId: center.id, institutionId: institution.id}) }}" class="pull-right view-center" style="font-size:13px;font-weight:normal;margin-left:5px;">
                                <i class="icon-share"></i><span>view</span>
                            </a>
                            <a href="{{ path('admin_institution_medicalCenter_edit', {imcId: center.id, institutionId: institution.id}) }}" class="pull-right edit-center-description" style="font-size:13px;font-weight:normal">
                                <i class="icon-edit"></i> <span>edit</span>
                            </a>
                        </td>
                    </tr>
                    {% endfor %}
            
                
                </table>
                {% else %}
                        <div class="alert alert-block"> {{ institution.name }} has no {{ centersLabel }} yet. </div>
                {% endif %}
        {% endblock %} 

        {% endembed %}
    </div>
{% endblock %}

{% block inlineJavascriptCode %}
<script src="{{ asset('bundles/admin/js/viewMedicalCenterManager.js') }}"></script>
<script type="text/javascript">
    $(function(){
        $(".collapse").collapse();
        
        $('.view-center').click(function(){
            window.location = $(this).attr('href');
            return false;
        });


        $('.edit-center-name').click(function(){
            if($(this).next().is(':visible')) {<commit_msg>Fixes #422 and Closes #422<commit_after>{% extends 'AdminBundle::layout.institution.html.twig' %}

{% set centerTerm = getClassLabel('institution_medical_center') %}
{% set centerLabel = centerTerm.singular | title %}
{% set centersLabel = centerTerm.plural | title %}

{% block content %}
    <div class="span9">
        {% include '::notice.admin.html.twig' %}

        
        {% embed 'HelperBundle:Widgets:section.html.twig' 
            with { 
                title: centersLabel,
                actions:  isSingleCenter ? [] : [{link: path('admin_institution_medicalCenter_add', {institutionId:institution.id}), label: 'Add ' ~ centerLabel, 'icon' : 'icon-plus' }]  
            }
        %}
        
        {% block sectionContent %}
            {% autoescape false %} {{ listFilters is defined ? listFilters : '' }} {% endautoescape %}
                {% if institutionMedicalCenters is not empty %}
                <table id="city-list" class="table table-bordered sortable-list">
                    <tr>
                       <th>Clinics</th>
                       <th>Description</th>
                       <th>Status</th>
                       <th>Actions</th>
                    </tr>
                    
                    {% for center in institutionMedicalCenters %}
                    <tr>
                        <td>{{ center.name }}</td>
                        <td style="width: 425px";>{{ center.description  | raw  }}</td>
                        <td>{{ get_medical_center_status_label(center) }}</td>
                        <td><a href="{{ path('admin_institution_medicalCenter_view', {imcId: center.id, institutionId: institution.id}) }}" class="pull-right view-center" style="font-size:13px;font-weight:normal;margin-left:5px;">
                                <i class="icon-share"></i><span>view</span>
                            </a>
                            <a href="{{ path('admin_institution_medicalCenter_edit', {imcId: center.id, institutionId: institution.id}) }}" class="pull-right edit-center-description" style="font-size:13px;font-weight:normal">
                                <i class="icon-edit"></i> <span>edit</span>
                            </a>
                        </td>
                    </tr>
                    {% endfor %}
            
                
                </table>
                {% else %}
                        <div class="alert alert-block"> {{ institution.name }} has no {{ centersLabel }} yet. </div>
                {% endif %}
         {% if pager.isPaginable %}
         {{ paginate(pager, 'admin_institution_manageCenters', app.request.query.all | merge(app.request.get('_route_params')) ) }}
        {% endif %}
        {% endblock %} 

        {% endembed %}
    </div>
{% endblock %}

{% block inlineJavascriptCode %}
<script src="{{ asset('bundles/admin/js/viewMedicalCenterManager.js') }}"></script>
<script type="text/javascript">
    $(function(){
        $(".collapse").collapse();
        
        $('.view-center').click(function(){
            window.location = $(this).attr('href');
            return false;
        });


        $('.edit-center-name').click(function(){
            if($(this).next().is(':visible')) {
{'fraction_non_alphanumeric': 0.15483973847871152, 'fraction_numerical': 0.0038271408068888536, 'mean_word_length': 1.6621392190152802, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6546731', 'n_tokens_mistral': 1800, 'n_tokens_neox': 1617, 'n_words': 291}