Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python3 and Django2.2 upgrade] part 0 - Remove legacy views #677

Merged
merged 62 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c13d72d
Merge branch 'master' into kpi-2487-form-media
noliveleger May 21, 2020
8fb9226
Remove formpack exports and reports
noliveleger Jul 29, 2020
e926a07
Remove GoogleDoc exports
noliveleger Jul 29, 2020
0a6c5a8
Removed SAV and SAV zip exports
noliveleger Jul 29, 2020
725780c
Removed CSV zip exports
noliveleger Jul 29, 2020
bbeab63
Removed export menu and export data as HTML
noliveleger Jul 29, 2020
d5910e6
Clean-up project detail HTML template (export data)
noliveleger Jul 29, 2020
05f47cd
Removed background document section
noliveleger Jul 29, 2020
a1587e1
Removed Analyzer export
noliveleger Jul 30, 2020
daa525b
Removed python code related to form edit from UI (only)
noliveleger Jul 30, 2020
4dff8d5
Removed obsolete HTML code related to form edit in project detail
noliveleger Jul 30, 2020
9ae11fd
Removed obsolete tests related to forms edit from UI
noliveleger Jul 30, 2020
32e7d91
Updated CSS to avoid big gaps between buttons
noliveleger Jul 30, 2020
eba116d
Removed CRUD actions on background documents
noliveleger Jul 31, 2020
8eb8ed7
Removed user's profile settings
noliveleger Jul 31, 2020
603b180
fixed form media tests
noliveleger Jul 31, 2020
e5fe0f9
Removed user settings
noliveleger Jul 31, 2020
56768a6
Removed activity view
noliveleger Jul 31, 2020
ffe0747
WIP: Removed obsolete HTML templates
noliveleger Jul 31, 2020
f3e9a2a
Remove edit/delete options for UI, remove obsolete HTML templates
noliveleger Aug 5, 2020
d32d1a1
Removed obsolete code (django views) related to previously removed fe…
noliveleger Aug 5, 2020
637651e
Allow HTTP auth during tests
noliveleger Aug 5, 2020
4ce30ce
Removed form edit and form gallery tests
noliveleger Aug 5, 2020
d3bf370
Use API to upload XLS in tests instead of (removed) django view "prof…
noliveleger Aug 6, 2020
cf16bc8
Removed old django views "toggle_download" and "thank-you-submission"
noliveleger Aug 7, 2020
19e1537
Removed obsolete Django.forms and dropped support for CSV, Dropbox, G…
noliveleger Aug 7, 2020
9a85218
Updated API documentation for forms
noliveleger Aug 7, 2020
13e518f
Removed tests for CSV, Google Sheets, remote URLs
noliveleger Aug 7, 2020
77e2a1d
Added migrations to drop tables related to obsolete models
noliveleger Aug 7, 2020
8281dab
Removed registration feature
noliveleger Aug 10, 2020
9f617ac
Removed edit/enter data old Django views
noliveleger Aug 10, 2020
4b83a39
Refactored "test_form_permissions" to "test_premissions", removed obs…
noliveleger Aug 10, 2020
f3eeaa5
Merge branch 'kobokitten-remove-ui-CUD-actions' into kobokitten-remov…
noliveleger Aug 10, 2020
004e80a
Merge branch 'kobokitten-unicode' into kobokitten-remove-ui-CUD-actio…
noliveleger Aug 10, 2020
4817e4b
Removed obsolete utilities
noliveleger Aug 10, 2020
bf54251
Merge branch 'kobokitten-remove-ui-CUD-actions' into kobokitten-remov…
noliveleger Aug 10, 2020
ee1fc40
Removed "delete_data" old view and use API endpoint instead
noliveleger Aug 10, 2020
1b72ee4
Merge branch 'kobokitten-remove-ui-CUD-actions' into kobokitten-remov…
noliveleger Aug 10, 2020
356523e
Removed "enketo_preview" old view
noliveleger Aug 10, 2020
85d2b4a
Removed users list old view
noliveleger Aug 11, 2020
8009cdc
Merge branch 'kobokitten-remove-ui-CUD-actions' into kobokitten-remov…
noliveleger Aug 11, 2020
f46eb31
Updated API documentation for "api/v1/forms", removed obsolete code
noliveleger Aug 11, 2020
68dc905
Removed (forgotten) formpack legacy export views
noliveleger Aug 11, 2020
a075eda
Removed enketo nested endpoint from "api/v1/form"
noliveleger Aug 11, 2020
fd07aee
Remove formpack dependency
noliveleger Aug 17, 2020
116a18a
Removed replace XLSForm button from UI
noliveleger Aug 20, 2020
ced6fec
Removed old check for ziggy
duvld Sep 1, 2020
ce5005c
Merge pull request #646 from kobotoolbox/kitten-kpi-2770-uuid-query
noliveleger Sep 8, 2020
b0103f4
Merge branch 'master' into kpi-2487-form-media
noliveleger Nov 17, 2020
a6f8a96
Add a "from_kpi" field to MetaData model to differentiate files uploa…
noliveleger Nov 24, 2020
88c196e
Fixed: Cannot load manifest when remote URL does not contain an exten…
noliveleger Nov 24, 2020
3c12889
Merge branch '2488-kpi_add_delete_data_permission' into kobokitten-re…
noliveleger Dec 2, 2020
d02b758
Update instructions for legacy interface usage
noliveleger Dec 2, 2020
4e63901
Merge branch 'kobokitten-remove-ui-CUD-actions-unicode' of github.com…
noliveleger Dec 2, 2020
bd99a7e
Merge branch 'kpi-2487-form-media' into kobokitten-remove-ui-CUD-acti…
noliveleger Dec 2, 2020
82d33be
Merge branch 'master' into kobokitten-remove-ui-CUD-actions-unicode
noliveleger Dec 17, 2020
cc58f86
Fixed migrations conflict
noliveleger Dec 17, 2020
32851fc
Remove QR Code generator
noliveleger Mar 4, 2021
0a4ec2b
Code reformat
noliveleger Mar 4, 2021
2359362
Merge branch 'master' into kobocat2.0-step0-remove-deprecated-views
noliveleger Mar 4, 2021
b7c8dc9
Remove HTML response for submissions
noliveleger Mar 10, 2021
cb1f3fa
Apply requested changes for PR#677
noliveleger Mar 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kobocat-template/static/css/kobo-branding.css
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ section {
.single-project__header .container,
.projects-list__header .container,
.data-page__header .container {
max-width: 984px;
max-width: 960px;
}

.single-project__header .fa-caret-right,
Expand Down Expand Up @@ -681,4 +681,4 @@ i.fa-trash-o {
td.footable-first-column {
padding-right: 0px !important;
}
}
}
14 changes: 7 additions & 7 deletions kobocat-template/static/css/kobo-single-project.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,15 @@ button.single-project__button-delete {
}

.dashboard__left {
width: 72%;
width: 60%;
float: left;
margin-left: 1%;
}

.dashboard__right {
width: 25%;
float: left;
margin-left: -13%;
}

h2.dashboard__group-label {
Expand All @@ -205,9 +206,8 @@ h2.dashboard__group-label {
}

.dashboard__submissions {
width: 55%;
width: 33%;
float: left;
margin-right: 5%;
position: relative;
}

Expand Down Expand Up @@ -268,7 +268,7 @@ a.dashboard__button-download-data:hover span {
}

.dashboard__submissions a.dashboard__button {
width: 30%;
width: 60%;
}

a.dashboard__button-twoline span {
Expand Down Expand Up @@ -351,8 +351,8 @@ a.dashboard__formbutton-refresh {

.dashboard__download__drop {
position: absolute;
right: 22px;
bottom: -150px;
left: 0;
bottom: -128px;
width: 124px;
border: 1px solid #E7E8E9;
background: white;
Expand Down Expand Up @@ -629,4 +629,4 @@ span.poshytip {
.dashboard__download__drop {
bottom: -190px;
}
}
}
168 changes: 90 additions & 78 deletions kobocat-template/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,97 +1,102 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>{% block title %}{{ SITE_NAME }}{% endblock %}</title>
<meta name="description" content="{% block meta_description %}KoBoToolbox is a free and open source suite of tools for field data collection for use in challenging environments.{% endblock %}">
<meta name="description"
content="{% block meta_description %}KoBoToolbox is a free and open source suite of tools for field data collection for use in challenging environments.{% endblock %}">
<meta name="author" content="">
{% if GOOGLE_SITE_VERIFICATION %}
<meta name="google-site-verification" content="{{ GOOGLE_SITE_VERIFICATION }}" />
<meta name="google-site-verification" content="{{ GOOGLE_SITE_VERIFICATION }}"/>
{% endif %}

{% if csrf_token %}<meta name="csrf-token" content="{{csrf_token}}">{% endif %}
{% if csrf_token %}
<meta name="csrf-token" content="{{ csrf_token }}">{% endif %}

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Le styles -->
{% block styles %}

<link rel="icon" type="image/x-icon" href="{% static "images/favicon.ico" %}" />
<!-- iPhone + iPad icons -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{% static "images/apple-touch-icon-114x114.png" %}">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{% static "images/apple-touch-icon-72x72-precomposed.png" %}">
<link rel="apple-touch-icon-precomposed" href="{% static "img/apple-touch-icon-precomposed.png" %}">
<link rel="apple-touch-icon" href="{% static "images/apple-touch-icon.png" %}">

<link href="{% static "css/phaseout/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "css/screen.css?v=2809679b01" %}" rel="stylesheet">
<link href="{% static "css/ona-screen-overrides.css" %}" rel="stylesheet">
<link href="{% static "css/font-awesome.min.css" %}" rel="stylesheet">
<!--[if lte IE 8]>
<link rel="icon" type="image/x-icon" href="{% static "images/favicon.ico" %}"/>
<!-- iPhone + iPad icons -->
<link rel="apple-touch-icon-precomposed" sizes="114x114"
href="{% static "images/apple-touch-icon-114x114.png" %}">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
href="{% static "images/apple-touch-icon-72x72-precomposed.png" %}">
<link rel="apple-touch-icon-precomposed" href="{% static "img/apple-touch-icon-precomposed.png" %}">
<link rel="apple-touch-icon" href="{% static "images/apple-touch-icon.png" %}">

<link href="{% static "css/phaseout/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "css/screen.css?v=2809679b01" %}" rel="stylesheet">
<link href="{% static "css/ona-screen-overrides.css" %}" rel="stylesheet">
<link href="{% static "css/font-awesome.min.css" %}" rel="stylesheet">
<!--[if lte IE 8]>
<link href="{% static "css/font-awesome-ie7.css" %}" rel="stylesheet">
<![endif]-->
<link href="{% static "bootstrap/css/bootstrap-responsive.min.css" %}" rel="stylesheet">
<link href="{% static "bootstrap/css/bootstrap-responsive.min.css" %}" rel="stylesheet">

<link href="{% static "css/kobo-branding.css" %}" rel="stylesheet">
<link href="{% static "css/published_forms.css" %}" rel="stylesheet">
<link href="{% static "css/data_pages.css" %}" rel="stylesheet">
<link href="{% static "css/vex.css" %}" rel="stylesheet">
<link href="{% static "css/vex-theme-kobo.css" %}" rel="stylesheet">
<link href="{% static "css/kobo-branding.css" %}" rel="stylesheet">
<link href="{% static "css/published_forms.css" %}" rel="stylesheet">
<link href="{% static "css/data_pages.css" %}" rel="stylesheet">
<link href="{% static "css/vex.css" %}" rel="stylesheet">
<link href="{% static "css/vex-theme-kobo.css" %}" rel="stylesheet">

<link href="{% static "css/footable.css" %}" rel="stylesheet">
<link href="{% static "css/footable.css" %}" rel="stylesheet">
{% endblock %}
<!-- spot to insert stuff for google maps -->
{% block additional-headers %}{% endblock %}
</head>

{% block body %}
{% if not user.is_authenticated %}

<body>
<div class="legacy-warning">
<div class="container">
We no longer recommend using the legacy interface. Please access all our new features in the <a href="{{ koboform_url }}">new interface</a> (new map, table, reports, labeled data exports, etc.). If you have deployed your project directly in the legacy interface, there is no way to use these new features. <strong>This legacy interface will be removed shortly.</strong>
</div>
</div>

<header class="header-bar">
<div class="container__wide">
<span class="header-bar__top-logo pull-right"></span>
<a href="http://support.kobotoolbox.org/" class="header-bar__support pull-right" target="_blank" title="Visit our self-help pages or ask a support question (opens in new tab)">Support</a>
</div>
</header>

{% else %}

<body class='authenticated'>
{% include "topbar.html"%}

{% endif %}

{% block before-content %}{% endblock %}

<div class="container-fluid container__wide main {{ request.resolver_match.url_name }}">
{% block message %}
</head>

{% block body %}
{% if not user.is_authenticated %}

<body>
<div class="legacy-warning">
<div class="container">

We no longer recommend using the legacy interface. Please access all our new features in the <a
href="{{ koboform_url }}">new interface</a> (new map, table, reports, labeled data exports, etc.).
</div>
</div>

<header class="header-bar">
<div class="container__wide">
<span class="header-bar__top-logo pull-right"></span>
<a href="http://support.kobotoolbox.org/" class="header-bar__support pull-right" target="_blank"
title="Visit our self-help pages or ask a support question (opens in new tab)">Support</a>
</div>
</header>

{% else %}

<body class='authenticated'>
{% include "topbar.html" %}

{% endif %}

<div class="container-fluid container__wide main {{ request.resolver_match.url_name }}">
{% block message %}
{% if message or messages or message_list %}
{% include "message.html" %}
{% include "message.html" %}
{% endif %}
{% endblock %}
{% block content %}
{% endblock %}
{% block content %}
{% if template %}{% include template %}{% endif %}
{{ content|safe }}
{% endblock %}
</div>
{% endblock %}
</div>

{% include "footer.html" %}
{% include "footer.html" %}

{% block below-content %}{% endblock %}
{% block below-content %}{% endblock %}

{% block javascript %}
{% block javascript %}

<!-- Le javascript -->
<script type="text/javascript" src="{% url "django.views.i18n.javascript_catalog" %}"></script>
Expand All @@ -108,25 +113,32 @@
<!-- -->
<script src="{% static "js/kobo-branding.js" %}"></script>

{% endblock %}
{% endblock %}

{% block additional-javascript %}{% endblock %}
{% block additional-javascript %}{% endblock %}

{% block google-analytics %}
{% block google-analytics %}
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ GOOGLE_ANALYTICS_PROPERTY_ID }}', '{{ GOOGLE_ANALYTICS_DOMAIN }}');
ga('send', 'pageview');

</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
jnm marked this conversation as resolved.
Show resolved Hide resolved
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

ga('create', '{{ GOOGLE_ANALYTICS_PROPERTY_ID }}', '{{ GOOGLE_ANALYTICS_DOMAIN }}');
ga('send', 'pageview');

</script>
{% endif %}
{% endblock %}
{% endblock %}

</body>
{% endblock %}
</body>
{% endblock %}
</html>
3 changes: 1 addition & 2 deletions kobocat-template/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ <h1>{% blocktrans %}Publish a Form <small>Upload XLSForm</small>{% endblocktrans
</div>
<div class="span8">
<h3 class="short">
<a href="{% url "public_profile" content_user.username %}">{{ content_user.username }}</a>
{{ content_user.username }}
{% if profile.name %}
<span class="name">|&nbsp;{{ profile.name }}</span>
{% endif %}
</h3>
<span><a href="{% url "public_profile" content_user.username %}">{% trans "View Profile Page" %}</a></span>
</div>
</div>
<div class="row-fluid">
Expand Down
97 changes: 0 additions & 97 deletions kobocat-template/templates/data_view.html

This file was deleted.

Loading