paginacion y botones en reportes

parent 8da5fe05
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</td> </td>
<td>{{product.size}}</td> <td>{{product.size}}</td>
<td class="text-center"> <td class="text-center">
<a title="View Report" {% if product.progress == 100 %} <a title="View Report" {% if product.progress == 60 %}
href="{{ BASE_URL }}/reports/T15QZD_sclData/{{product.purchase_id}}" href="{{ BASE_URL }}/reports/T15QZD_sclData/{{product.purchase_id}}"
{% else %} {% else %}
href="#" href="#"
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul class="pagination"> <ul class="pagination">
{% if productList.has_previous %} {% if productList.has_previous %}
...@@ -283,8 +283,9 @@ ...@@ -283,8 +283,9 @@
{% block scripts %} {% block scripts %}
<script> <script>
function openmodal(info) { function openmodal(info) {
info2 = info.split(";");
$("#myModal").modal(); $("#myModal").modal();
$("#log_info").append(info); $("#log_info").append(info2);
} }
</script> </script>
{% endblock%} {% endblock%}
\ No newline at end of file
...@@ -96,8 +96,12 @@ def Reports(request): ...@@ -96,8 +96,12 @@ def Reports(request):
progress = 50 progress = 50
if 'Extracting SCL information...' in open(log_info).read(): if 'Extracting SCL information...' in open(log_info).read():
progress = 60 progress = 60
with open(log_info, 'r') as myfile: with open(log_info, 'r') as myfile:
log = myfile.read().replace('\n', '') log = myfile.read().replace('\n', '')
for p in json.loads(producto['productList']): for p in json.loads(producto['productList']):
size = size + float(p['info']['size'][:-3]) size = size + float(p['info']['size'][:-3])
if size > 1000: if size > 1000:
......
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