{% comment %}
<!--
  Copyright (C) 2012 University of Dundee & Open Microscopy Environment.
  All rights reserved.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
{% endcomment %}

<style type="text/css">
.img_panel {
    <!--[if lte IE 8]>
        {% if size.width %} width: {{ size.width }}px;{% endif %}
    <![endif]-->
    {% if size.width %}
        max-width: {{ size.width }}px;
        max-height: {{ size.width }}px;
    {% endif %}
    border-width: 0px;
    margin: 5px;
}

.channel_name {
    font-size: 130%;
    text-align: center;
}
.image_label
    {
        position: relative;
        left: 100px;
        -moz-transform:rotate(-90deg); 
        -moz-transform-origin: center center;
        -webkit-transform: rotate(-90deg);
        -webkit-transform-origin: center center;
        -o-transform: rotate(-90deg);
        -o-transform-origin:  center center;
        filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
        
    }
.label_cell {
    position: relative;
}
</style>

<table style="margin-left:auto; margin-right:auto">
    <tr>
        
        {% for c in channels %}
            {% if c.active %} 
                <td class="channel_name" valign='bottom' style="vertical-align: bottom">
                    <span {% if split_grey %} style="color:#{{c.colour}}" {% endif %}>
                    {{c.name}}
                    </span>
                </td> 
            {% endif %}
        {% endfor %}
        <td class="channel_name">
            {% if merged_names %}
                {% for c in channels %}
                    {% if c.merged %}
                        <div style="color:#{{c.colour}}">{{ c.name }}</div>
                    {% endif %}
                {% endfor %}
            {% else %}
                Merged
            {% endif %}
        </td>
    </tr>
    {% for image in images %}
    <tr>
        {% for c in c_strs %}
        <td>
            <img class='img_panel' 
            src="{% url 'web_render_image' image.id image.z 0 %}?c={{c}}&p={{proj}}" />
        </td>
        {% endfor %}
    </tr>
    {% endfor %}
</table>