Files @ 531ab818cc3d
Branch filter:

Location: kallithea/rhodecode/templates/admin/users/user_edit_ips.html

Bradley M. Kuhn
Add javascript for Object Code excanvas (flot) version herein included and use that instead of minified version.

I had a bit of trouble finding the upstream on excanvas, as the version from
Google, which appears to be the original source, seems unmaintained.

However, it appears the version we're carrying in Kallithea is indeed from
the excanvas era of flot.

$ (cd /tmp; \
svn -r 135 checkout http://flot.googlecode.com/svn/trunk/ flot )
$ cp /tmp/flot/excanvas.js rhodecode/public/js/excanvas.js

I also verified the sha256sum of the min file matched ours:

$ sha256sum /tmp/flot/excanvas.min.js rhodecode/public/js/excanvas.min.js
5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 /tmp/flot/excanvas.min.js
5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 rhodecode/public/js/excanvas.min.js
<div class="ips_wrap">
  <table class="noborder">
    %if c.default_user_ip_map and c.inherit_default_ips:
        %for ip in c.default_user_ip_map:
          <tr>
            <td><div class="ip">${ip.ip_addr}</div></td>
            <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
            <td>${h.literal(_('Inherited from %s') % h.link_to('*default*',h.url('admin_permissions_ips')))}</td>
          </tr>
        %endfor
    %endif

    %if c.user_ip_map:
        %for ip in c.user_ip_map:
          <tr>
            <td><div class="ip">${ip.ip_addr}</div></td>
            <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
            <td>
                ${h.form(url('edit_user_ips', id=c.user.user_id),method='delete')}
                    ${h.hidden('del_ip_id',ip.ip_id)}
                    <i class="icon-remove-sign" style="color:#FF4444"></i>
                    ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id,
                    class_="action_button", onclick="return  confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
                ${h.end_form()}
            </td>
          </tr>
        %endfor
    %endif
    %if not c.default_user_ip_map and not c.user_ip_map:
        <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr>
    %endif
  </table>
</div>

<div>
    ${h.form(url('edit_user_ips', id=c.user.user_id),method='put')}
    <div class="form">
        <!-- fields -->
        <div class="fields">
             <div class="field">
                <div class="label">
                    <label for="new_ip">${_('New ip address')}:</label>
                </div>
                <div class="input">
                    ${h.text('new_ip', class_='medium')}
                </div>
             </div>
            <div class="buttons">
              ${h.submit('save',_('Add'),class_="btn")}
              ${h.reset('reset',_('Reset'),class_="btn")}
            </div>
        </div>
    </div>
    ${h.end_form()}
</div>