Commit 25813526 authored by Marc Duez's avatar Marc Duez

server : remove some old file

parent 8ebed2b1
{{('message' in globals())}}
{{extend 'layout_fluid.html'}}
{{if 'message' in globals():}}
<div class="span7">
<h3>{{=message}}</h3>
<table class="table">
<thead>
<tr><td> name </td>
<td> gender </td>
<td> birth </td>
<td> </td>
</tr>
</thead>
<tbody>
{{ query = None
c_id = ""}}
{{if "admin" in auth.user_groups.values():}}
{{query = db( db.patient.id==db.auth_permission.record_id ).select( orderby = db.patient.id) }}
{{else:}}
{{query = db(
( db.auth_permission.record_id==db.patient.id )
& ( db.auth_permission.table_name=="patient" )
& ( db.auth_permission.name=="read" )
& ( db.auth_permission.group_id.belongs(auth.user_groups) )
).select( orderby = db.patient.id)
}}
{{pass}}
{{for row in query :}}
{{if (c_id != row.patient.id) :
c_id = row.patient.id}}
<tr class="tabrow" onclick="window.location = '{{=URL(f='patient', args=[row.patient.id])}}' ">
<td> {{=row.patient.last_name + " " + row.patient.first_name }} </td>
<td> {{=row.patient.sex }} </td>
<td> {{=row.patient.birth }} </td>
<td> {{=row.patient.info }} </td>
</tr>
{{pass}}
plop
{{pass}}
</tbody>
</table>
{{=A(str(T('back')),_href=URL('index'),_class="btn")}}
{{=A(str(T('add patient')),_href=URL('add_patient_form'),_class="btn")}}
</div>
<div class="span5">
<div class="well well-small">
<h3>
info
</h3>
fenetre ajax / affichage info_patient ...
<br>TODO
<br>.
<br>.
<br>.
<br>.
</div>
{{=A(str(T('edit info (TODO)')),_href=URL('index'),_class="btn")}}
</div>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{('message' in globals())}}
{{extend 'layout.html'}}
{{if 'message' in globals():}}
<!--
/*
* jQuery File Upload Plugin Demo 9.0.0
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-->
<link rel="stylesheet" href="http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="{{=URL('static','jQuery-File-Upload/css/jquery.fileupload.css')}}">
<link rel="stylesheet" href="{{=URL('static','jQuery-File-Upload/css/jquery.fileupload-ui.css')}}">
{{
response.files.insert(0,URL('static','css/web2py.css'))
response.files.insert(1,URL('static','css/bootstrap.min.css'))
response.files.insert(2,URL('static','css/bootstrap-responsive.min.css'))
response.files.insert(3,URL('static','css/web2py_bootstrap.css'))
response.files.insert(4,URL('static','css/style.css'))
}}
<div class="container">
<br>
<h3>{{row = db(db.patient.id==request.args[0]).select()}}
add file for {{=row[0].first_name + " " + row[0].last_name }}
</h3>
<!-- The file upload form used as target for the file upload widget -->
<form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">
<!-- Redirect browsers with JavaScript disabled to the origin page -->
<noscript><input type="hidden" name="redirect" value="http://blueimp.github.io/jQuery-File-Upload/"></noscript>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-lg-7">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
<i class="glyphicon glyphicon-plus"></i>
<span>Add files...</span>
<input type="file" name="files[]" multiple>
</span>
<button type="submit" class="btn btn-primary start">
<i class="glyphicon glyphicon-upload"></i>
<span>Start upload</span>
</button>
<button type="reset" class="btn btn-warning cancel">
<i class="glyphicon glyphicon-ban-circle"></i>
<span>Cancel upload</span>
</button>
<button type="button" class="btn btn-danger delete">
<i class="glyphicon glyphicon-trash"></i>
<span>Delete</span>
</button>
<input type="checkbox" class="toggle">
<!-- The global file processing state -->
<span class="fileupload-process"></span>
</div>
<!-- The global progress state -->
<div class="col-lg-5 fileupload-progress fade">
<!-- The global progress bar -->
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
</div>
<!-- The extended global progress state -->
<div class="progress-extended">&nbsp;</div>
</div>
</div>
<!-- The table listing the files available for upload/download -->
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
</form>
<a class="btn" data-w2p_disable_with="default" href={{=URL(f='patient', args=[request.args[0]])}}>back</a>
</div>
<script id="template-upload" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-upload fade">
<input type="hidden" name="patient_id[]" value={{=request.args[0]}} required>
<td>
<p class="name">{%=file.name%}</p>
<strong class="error text-danger"></strong>
</td>
<td>
<label>sampling date:</br> <input type="text" class="date" name="date[]"></label>
</td>
<td>
<label> info :</br><input type="textarea" class="info" name="info[]"></label>
</td>
<td>
<p class="size">Processing...</p>
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
</td>
<td>
{% if (!i && !o.options.autoUpload) { %}
<button class="btn btn-primary start" disabled>
<i class="glyphicon glyphicon-upload"></i>
<span>Start</span>
</button>
{% } %}
{% if (!i) { %}
<button class="btn btn-warning cancel">
<i class="glyphicon glyphicon-ban-circle"></i>
<span>Cancel</span>
</button>
{% } %}
</td>
</tr>
{% } %}
</script>
<!-- The template to display files available for download -->
<script id="template-download" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-download fade">
<td>
<p class="name">
{% if (file.url) { %}
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
{% } else { %}
<span>{%=file.name%}</span>
{% } %}
</p>
{% if (file.error) { %}
<div><span class="label label-danger">Error</span> {%=file.error%}</div>
{% } %}
</td>
<td>
</td>
<td>
</td>
<td>
<span class="size">{%=o.formatFileSize(file.size)%}</span>
</td>
<td>
{% if (file.deleteUrl) { %}
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
<i class="glyphicon glyphicon-trash"></i>
<span>Delete</span>
</button>
<input type="checkbox" name="delete" value="1" class="toggle">
{% } else { %}
<button class="btn btn-warning cancel">
<i class="glyphicon glyphicon-ban-circle"></i>
<span>Cancel</span>
</button>
{% } %}
</td>
</tr>
{% } %}
</script>
<script>
</script>
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.js')}}"></script>
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
<script src="{{=URL('static','jQuery-File-Upload/js/vendor/jquery.ui.widget.js')}}"></script>
<!-- The Templates plugin is included to render the upload/download listings -->
<script src="http://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
<script src="http://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
<script src="{{=URL('static','jQuery-File-Upload/js/bootstrap.min.js')}}"></script>
<!-- blueimp Gallery script -->
<script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.iframe-transport.js')}}"></script>
<!-- The basic File Upload plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload.js')}}"></script>
<!-- The File Upload processing plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-process.js')}}"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-image.js')}}"></script>
<!-- The File Upload audio preview plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-audio.js')}}"></script>
<!-- The File Upload video preview plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-video.js')}}"></script>
<!-- The File Upload validation plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-validate.js')}}"></script>
<!-- The File Upload user interface plugin -->
<script src="{{=URL('static','jQuery-File-Upload/js/jquery.fileupload-ui.js')}}"></script>
<!-- The main application script -->
<script src="{{=URL('static','jQuery-File-Upload/js/main.js')}}"></script>
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
<!--[if (gte IE 8)&(lt IE 10)]>
<script src="js/cors/jquery.xdr-transport.js"></script>
<![endif]-->
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{
if request.args(0)=='login':
if not 'register' in auth.settings.actions_disabled:
form.add_button(T('Register'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn')
pass
if not 'request_reset_password' in auth.settings.actions_disabled:
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn')
pass
pass
=form
}}
</div>
<script language="javascript"><!--
jQuery("#web2py_user_form input:visible:enabled:first").focus();
{{if request.args(0)=='register':}}
web2py_validate_entropy(jQuery('#auth_user_password'),100);
{{elif request.args(0)=='change_password':}}
web2py_validate_entropy(jQuery('#no_table_new_password'),100);
{{pass}}
//--></script>
{{('message' in globals())}}
{{extend 'layout.html'}}
{{if 'message' in globals():}}
<h3>{{=message}}</h3>
<table class="table">
<tr><td> name </td>
<td> email </td>
<td> group
{{
c_id= ""
for row in db(
(db.auth_user.id==db.auth_membership.user_id)
& (db.auth_group.id==db.auth_membership.group_id)
).select(orderby=db.auth_user.id):}}
{{if (c_id != row.auth_user.id) :
c_id = row.auth_user.id}}
</td>
</tr>
<tr><td> {{=row.auth_user.last_name + " " + row.auth_user.first_name }} </td>
<td> {{=row.auth_user.email }} </td>
<td> {{=row.auth_group.role }}
{{else:}}
{{=row.auth_group.role }}
{{pass}}
{{pass}}
</td>
</tr>
</table>
{{if "admin" in auth.user_groups.values():}}
{{=A(str(T('add membership')),_href=URL('add_membership'),_class="btn")}}
{{pass}}
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment