

def go_lab_reservation_formatter(v, c, lab, p):
    if lab.go_lab_reservation:
        klass = 'btn-danger'
        msg = gettext('Deactivate')
    else:
        klass = 'btn-success'
        msg = gettext('Activate')
    return Markup(('<form method=\'POST\' action=\'%(url)s\' style="text-align: center"> \n                <input type=\'hidden\' name=\'activate\' value=\'%(activate_value)s\'/>\n                <input type=\'hidden\' name=\'lab_id\' value=\'%(lab_id)s\'/>\n                <label> %(texto)s </label>\n                <br>\n                <input class=\'btn %(klass)s\' type=\'submit\' value="%(msg)s"></input>\n                </form>' % dict(url=url_for('.change_go_lab_reservation'), texto=gettext('Go-Lab Reservation'), activate_value=unicode(lab.go_lab_reservation).lower(), lab_id=lab.id, klass=klass, msg=msg)))

dataset/ETHPy150Open gateway4labs/labmanager/labmanager/views/admin.py go_lab_reservation_formatter/original