t:scales_for_gui_entry{
<td align='center' width='4%%'>
<b>
<a href='spy.ED.compute_group_profiles %(group)s 3 0.01 Sg'>
%(group)s</a></b>
</td>
<td>
<b><font color='%(colour)s'>
%(value)s
</font></b>
</td>
}

t:bad_refs_table_header{
<table cellpadding='3' cellspacing='0' width='100%%'>
    <b><font>
  <tr bgcolor="#444444">
    <td width='6%%' align='center'><font color='#444444'><b>ID</b></font></td>
    <td width='30%%' align='center'><font color='#dedede'><b>Scale</b></font></td>
    <td width='33%%' align='center'><font color='#dedede'><b>wR<sub>2</sub> (%.1f)</b></font></td>
    <td width='33%%' align='center'><font color='#efefef'><b>Action</td></b></font></td>
  </tr>
  </b></font>
</table>
}

t:bad_refs_group_header{
<table cellpadding='0' cellspacing='0' width='100%%'>
  <tr bgcolor="#555555">
    <td width='10%%' align='center'><font color="#ffffff"><b>#%(group)s</b></font></td>
    <td width='30%%' align='center' bgcolor="%(scale_colour)s"><font color="#ffffff"><b>%(scale).3f</b></font></td>
    <td width='30%%' align='center' bgcolor="%(wR_colour)s">
    <font color="#ffffff"><b>%(wR)s</b></font></td>
 
     $+
      html.Snippet("gui/snippets/gui-link-button",
      "value=Plot / Sg",
      "hint=Plot all refelctions in this group centered on 0",
      "height='20'",
      "width=100%%",
      "fgcolor='%(fgcolor)s'",
      "onclick=spy.ED.compute_group_profiles %(group)s 3 0.01 Sg")
    $-

    $+
      html.Snippet("gui/snippets/gui-link-button",
      "value=Plot / angle",
      "hint=Plot all refelctions in this group by angle",
      "height='20'",
      "width=100%%",
      "fgcolor='%(fgcolor)s'",
      "onclick=spy.ED.compute_group_profiles %(group)s 3 0.01 angle")
    $-

 
  </tr>
</table>
}


t:bad_refs_header{
<tr bgcolor="#cccccc">
  <td width='10%%' bgcolor="#cccccc"></td>
  <td width='20%%' align='center'><b>h k l</b></td>
  <td width='20%%' align='center'><b>Io</b></td>
  <td width='20%%' align='center'><b>D</b></td>
  <td width='20%%' align='center'></td>
</tr>
}

t:bad_refs_row{
<tr >
  <td width='10%%' bgcolor="#cccccc"></td>
  <td width='20%%' bgcolor="#dedede" align='center'>%4i%4i%4i</td>
  <td width='20%%' bgcolor="#efefef" align='center'>%.3e</td>
  <td width='20%%' bgcolor="#dedede" align='center'>%.3f</td>
  <td width='20%%' bgcolor="#efefef" align='center'>%s</td>
}

t:bad_refs_row_action{
$+
  html.Snippet(
    "gui/snippets/gui-link-button",
    "value=Omit",
    "hint=Omit this reflection",
    "width=50%%",
    "td1=",
    "td2=",
  "onclick=spy.ED.omit %(id)s %(h)s %(k)s %(l)s>>spy.ED.update_group_info_html"
  )
$-

$+
  html.Snippet(
    "gui/snippets/gui-link-button",
    "value=Plot",
    "hint=Plot this reflection profile together with the integration profile",
    "width=50%%",
    "td1=",
    "td2=",
    "onclick=spy.ED.get_profile_plot %(id)s %(h)s %(k)s %(l)s"
  )
$-

}

t:group_info_combined_header{
<table cellpadding='0' cellspacing='0' width='100%'>
  <font color='#dedede'>
  <tr bgcolor="#444444">
    <td width='10%%' align='center'><font color='#dedede'><b>ID</b></font></td>
    <td width='20%%' align='center'><font color='#dedede'><b>h k l</b></font></td>
    <td width='20%%' align='center'><font color='#dedede'><b>Io<sup>2</sup></b></font></td>
    <td width='20%%' align='center'><font color='#dedede'><b>Ic<sup>2</sup></b></font></td>
    <td width='20%%' align='center'><font color='#dedede'><b>D</b></font></td>
    <td width='10%%' align='center'><font color='#dedede'><b>Action</b></font></td>
  </tr>
  </font>
}

t:group_info_combined{
<table cellpadding='0' cellspacing='2' width='100%%'>
  <tr>
    <td width='10%%' align='center' bgcolor="#dddddd"><a href="spy.ED.compute_group_profiles %s 3 0.01 Sg">%i</a></td>
    <td width='20%%' align='center' bgcolor="#efefef">%4i%4i%4i</td>
    <td width='20%%' align='center' bgcolor="#dddddd">%.3e</td>
    <td width='20%%' align='center' bgcolor="#efefef">%.3e</td>
    <td width='20%%' align='center' bgcolor="#dddddd"><font color='%s'><b>%.3f</b></font></td>
    $+
      html.Snippet(
        "gui/snippets/gui-link-button",
        "value=Omit",
        "width=100%%",
        "onclick=%s>>spy.ED.update_group_info_html")
    $-
    $+
      html.Snippet("gui/snippets/gui-link-button",
      "value=Plot",
      "width=100%%",
      "onclick=spy.ED.get_profile_plot %s %s %s %s")
    $-
  </tr>
}

t:setup_dyn{
spy.set_refinement_program('olex2.refine')
html.update
html.ItemState ed_gui 1 
spy.ED.set_method('N-Beam')
}