mirror of
https://github.com/HaitiData/haitidata.git
synced 2026-10-26 17:35:17 +00:00
Update some templates to 2.6.3
This commit is contained in:
1 parent
cdd1e71cb7
commit
a5fb0c8a6f
139 files changed
+198
-6547
No files matched your search
@@ -155,7 +155,7 @@ UPLOADER = {
|
||||
'BACKEND': 'geonode.rest',
|
||||
'OPTIONS': {
|
||||
'TIME_ENABLED': False,
|
||||
'MOSAIC_ENABLED': False,
|
||||
'MOSAIC_ENABLED': True,
|
||||
'GEOGIG_ENABLED': False,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6947,7 +6947,7 @@ section#subheader {
|
||||
padding-top: 0;
|
||||
}
|
||||
section#subheader p {
|
||||
color: #b0bec5;
|
||||
color: #78909c;
|
||||
display: inline-block;
|
||||
}
|
||||
section#subheader .btn-group {
|
||||
|
||||
@@ -251,7 +251,7 @@ section#subheader {
|
||||
padding-top: 0;
|
||||
|
||||
p {
|
||||
color: @gray-light;
|
||||
color: @gray;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="description">
|
||||
<h3>
|
||||
{% if error_title %}
|
||||
{{ error_title }}
|
||||
{% else %}
|
||||
{% trans "Not Permitted" %}
|
||||
{% endif %}
|
||||
</h3>
|
||||
</div>
|
||||
<p>
|
||||
{% if error_message %}
|
||||
{{ error_message }}
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
You are not allowed to perform this operation.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if not request.user.is_anonymous %}
|
||||
{% blocktrans %}Please verify that you are logged in as the correct user.{%endblocktrans%}
|
||||
{% else %}
|
||||
{% blocktrans %}Please login or register and retry.{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="description"><h3>{% trans "Page Not Found" %}</h3></div>
|
||||
{% blocktrans %}
|
||||
The page you requested does not exist. Perhaps you are using an outdated bookmark?
|
||||
{% endblocktrans %}
|
||||
{% endblock %}
|
||||
@@ -1,309 +0,0 @@
|
||||
{% load i18n avatar_tags %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}{{ SITE_NAME }}{% endblock %}</title>
|
||||
{% block head %}
|
||||
{% if DEBUG_STATIC %}
|
||||
<link href="{{ STATIC_URL }}lib/css/jquery.dataTables.css" rel="stylesheet" />
|
||||
<link href="{{ STATIC_URL }}lib/css/select2.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/jquery-ui.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/bootstrap-datetimepicker.css" rel="stylesheet"/>
|
||||
{% else %}
|
||||
<link href="{{ STATIC_URL }}lib/css/assets.min.css" rel="stylesheet"/>
|
||||
{% endif %}
|
||||
<link href="{{ STATIC_URL }}geonode/css/ext-compatibility.css" rel="stylesheet" />
|
||||
<link href="{{ STATIC_URL }}geonode/css/base.css" rel="stylesheet" />
|
||||
<style type="text/css">[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}</style>
|
||||
{% block extra_head %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
<!--[if IE]>
|
||||
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<style>
|
||||
#ieflag{
|
||||
display: block !important;
|
||||
height: 150px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
|
||||
{% block header %}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{% url "home" %}">GeoNode</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% block tabs %}
|
||||
<li id="nav_layers">
|
||||
<a href="{% url "layer_browse" %}">{% trans "Layers" %}</a>
|
||||
</li>
|
||||
<li id="nav_maps">
|
||||
<a href="{% url "maps_browse" %}">{% trans "Maps" %}</a>
|
||||
</li>
|
||||
<li id="nav_documents">
|
||||
<a href="{% url "document_browse" %}">{% trans "Documents" %}</a>
|
||||
</li>
|
||||
{% block extra_tab %}
|
||||
{% endblock %}
|
||||
<li id="nav_people">
|
||||
<a href="{% url "profile_browse" %}">{% trans "People" %}</a>
|
||||
</li>
|
||||
<li id="nav_groups">
|
||||
<a href="{% url "group_list" %}">{% trans "Groups" %}</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
<form class="navbar-form" id="search" action="{% url "search" %}" >
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{% if HAYSTACK_SEARCH %}
|
||||
<input id="search_input" type="text" placeholder="Search" class="form-control" name="q">
|
||||
{% else %}
|
||||
<input id="search_input" type="text" placeholder="Search" class="form-control" name="title__icontains">
|
||||
{% endif %}
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if not user.is_authenticated and REGISTRATION_OPEN %}
|
||||
<li><a href="{% url "account_signup" %}">{% trans "Register" %}</a></li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#UserModal" role="button" aria-expanded="false">
|
||||
{% avatar user 30 %} {{ user.username }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#SigninModal" role="button" >
|
||||
{% trans "Sign in" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock header %}
|
||||
|
||||
<div class="alert alert-danger alert-dismissible" role="alert" id="ieflag" style="display:none">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h1>You are using an outdated browser that is not supported by GeoNode.</h1>
|
||||
<p>Please use a <strong>modern browser</strong> like Mozilla Firefox, Google Chrome or Safari.</p>
|
||||
</div>
|
||||
|
||||
<div id="wrap">
|
||||
{% block middle %}
|
||||
<div class="container">
|
||||
{% include "_status_message.html" %}
|
||||
{% include "_announcements.html" %}
|
||||
{% include "_messages.html" %}
|
||||
{% block body_outer %}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{% block body %}
|
||||
<div id="description">
|
||||
<h3>{% trans "There was a problem loading this page" %}</h3>
|
||||
</div>
|
||||
{% blocktrans %}
|
||||
Please contact your GeoNode administrator (he may have received an email automatically if he configured it properly).
|
||||
If you are the site administrator, enable debug mode to see the actual error and fix it or file an issue in <a href="http://github.com/GeoNode/geonode/issues">GeoNode's issue tracker</a>
|
||||
{% endblocktrans %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% block sidebar %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock middle %}
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{% trans "Powered by" %} <a href="http://geonode.org">{% trans "GeoNode" %}</a> <em>{% trans "version" %} {{ VERSION }}</em> |
|
||||
<a href="{% url "developer" %}">{% trans "Developers" %}</a> |
|
||||
<a href="{% url "about" %}">{% trans "About" %}</a>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="hidden">{% trans "Language" %}</label>
|
||||
{% if csrf_token != "NOTPROVIDED" %}
|
||||
{% get_current_language as LANGUAGE %}
|
||||
<form class="form-inline" action="/i18n/setlang/" method="post">
|
||||
{% csrf_token %}
|
||||
<select class="col-md-6 pull-right" name="language" onchange="javascript:form.submit()">
|
||||
{% for lang in LANGUAGES %}
|
||||
<option value="{{ lang.0 }}" {% ifequal LANGUAGE_CODE lang.0 %} selected="selected"{% endifequal %}>
|
||||
{{ lang.1 }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endblock footer %}
|
||||
|
||||
|
||||
<!-- Modal must stay outside the navbar -->
|
||||
{% if not user.is_authenticated %}
|
||||
<div class="modal fade" id="SigninModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Sign in</h4>
|
||||
</div>
|
||||
<form class="form-signin" role="form" action="{% url "account_login" %}?next={{ request.path }}" method="post">
|
||||
<div class="modal-body">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_username" class="sr-only">{% trans "Username" %}:</label>
|
||||
<input id="id_username" class="form-control" name="username" placeholder="{% trans "Username" %}" type="text" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_password" class="sr-only">{% trans "Password" %}:</label>
|
||||
<input id="id_password" class="form-control" name="password" placeholder="Password" type="password" />
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" /> {% trans "Remember Me" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary btn-block">{% trans "Sign in" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="modal fade" id="UserModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Menu" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="{% url "layer_upload" %}"><i class="fa fa-cloud-upload"></i> {% trans "Upload Layers" %}</a></li>
|
||||
<li class="modal-divider"></li>
|
||||
<li><a href="{{ user.get_absolute_url }}"><i class="fa fa-user"></i> {% trans "Profile" %}</a></li>
|
||||
<li><a href="{% url "recent-activity" %}"><i class="fa fa-fire"></i> {% trans "Recent Activity" %}</a></li>
|
||||
<li><a href="{% url "messages_inbox" %}"><i class="fa fa-inbox"></i> {% trans "Inbox" %}</a></li>
|
||||
{% if USE_NOTIFICATIONS %}
|
||||
<li><a href="{% url "notification_notice_settings" %}"><i class="fa fa-bell"></i> {% trans "Notifications" %}</a></li>
|
||||
{% endif %}
|
||||
{% if perms.announcements.can_manage %}
|
||||
<li><a href="{% url "announcements_list" %}"><i class="fa fa-bullhorn"></i> {% trans "Announcements" %}</a></li>
|
||||
{% endif %}
|
||||
{% if user.is_superuser %}
|
||||
<li><a href="{% url "services" %}"><i class="fa fa-globe"></i> {% trans "Remote Services" %}</a></li>
|
||||
<li><a href="{% url "account_invite_user" %}"><i class="fa fa-edit"></i> {% trans "Invite User" %}</a></li>
|
||||
<li class="modal-divider"></li>
|
||||
<li><a href="{{ GEOSERVER_BASE_URL }}"><i class="fa fa-gears"></i> {% trans "GeoServer" %}</a></li>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<li><a href="{% url "admin:index" %}"><i class="fa fa-cog"></i> {% trans "Admin" %}</a></li>
|
||||
{% endif %}
|
||||
{% block extra_user_menu %}
|
||||
{% endblock %}
|
||||
<li class="modal-divider"></li>
|
||||
<li><a title="Help" rel="tooltip" href="/help/"><i class="fa fa-question-circle"></i> {% trans "Help" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form action="{% url "account_logout" %}" id="logout_form" method="post">
|
||||
{% csrf_token %}
|
||||
<a class="btn btn-warning btn-block" href="javascript:{}" onclick="document.getElementById('logout_form').submit();">{% trans "Log out" %}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- End of Modal -->
|
||||
|
||||
{% if DEBUG_STATIC %}
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.min.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.dataTables.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.timeago.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.ajaxprogress.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.ajaxQueue.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery-ui.custom.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/jquery.raty.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/bootstrap.min.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/json2.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/select2.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/js/waypoints.js"></script>
|
||||
{% else %}
|
||||
<script src="{{ STATIC_URL }}lib/js/assets.min.js"></script>
|
||||
{% endif %}
|
||||
<script src="{{ STATIC_URL }}geonode/js/utils/utils.js"></script>
|
||||
<script src="{{ STATIC_URL }}geonode/js/base/base.js"></script>
|
||||
{% include 'autocomplete_light/static.html' %}
|
||||
<script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
|
||||
{% block extra_script %}{% endblock extra_script %}
|
||||
<script type="text/javascript">
|
||||
var autocomplete = $('#search_input').yourlabsAutocomplete({
|
||||
url: '{% url "autocomplete_light_autocomplete" "ResourceBaseAutocomplete" %}',
|
||||
choiceSelector: 'span',
|
||||
hideAfter: 200,
|
||||
minimumCharacters: 1,
|
||||
placeholder: '{% trans 'Type your search here ...' %}',
|
||||
appendAutocomplete: $('#search_input')
|
||||
});
|
||||
$('#search_input').bind('selectChoice', function(e, choice, autocomplete) {
|
||||
if(choice[0].children[0] == undefined) {
|
||||
$('#search_input').val(choice[0].innerHTML);
|
||||
$('#search').submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Workaround to fix the autocomplete box positions
|
||||
yourlabs.Autocomplete.prototype.fixPosition = function(html) {
|
||||
this.input.parents().filter(function() {
|
||||
return $(this).css('overflow') === 'hidden';
|
||||
}).first().css('overflow', 'visible');
|
||||
if(this.input.attr('name') !== 'resource-keywords'){
|
||||
this.box.insertAfter(this.input).css({top: 0, left: 0});
|
||||
}else{
|
||||
var pos = $.extend({}, this.input.position(), {
|
||||
height: this.input.outerHeight()
|
||||
});
|
||||
this.box.insertAfter(this.input).css({top: pos.top + pos.height, left: pos.left});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="{% url "lang" %}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +0,0 @@
|
||||
{% load i18n announcements_tags %}
|
||||
|
||||
{% announcements as site_wide_announcements %}
|
||||
{% if site_wide_announcements %}
|
||||
<div id="site_wide_announcements">
|
||||
{% for announcement in site_wide_announcements %}
|
||||
<div class="alert alert-block announcement {{ announcement.level_css }}">
|
||||
{% if announcement.dismissal_type > 1 %}
|
||||
<a type="button" class="close" data-dismiss="alert" data-dismiss-url="{% url "announcements_dismiss" announcement.pk %}" href="#">×</a>
|
||||
{% endif %}
|
||||
<h4><a href="{{ announcement.get_absolute_url }}">{{ announcement }}</a></h4>
|
||||
<p><small><em>{{ announcement.creation_date }}</em></small></p>
|
||||
<div>{{ announcement.content }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -1,25 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="modal fade" id="_bulk_permissions" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<form id="permission_form" accept-charset="UTF-8" method="post">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Set permissions on selected resources" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% include "_permissions.html" %}
|
||||
</div>
|
||||
<div class="alert hidden" id="bulk_perms_message">
|
||||
<p class="message">}</p>
|
||||
<p class="extra_content"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
|
||||
<button class="btn btn-primary" ng-click="bulk_perms_submit()" id="bulk_perms_submit">{% trans "Apply Changes" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,10 +0,0 @@
|
||||
{% if messages %}
|
||||
<div id="user_messages">
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-block announcement alert-warning">
|
||||
<a type="button" class="close" data-dismiss="alert" data-dismiss-url="#" href="#">×</a>
|
||||
<p{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -1,173 +0,0 @@
|
||||
{% load i18n %}
|
||||
<div class="panel-group" id="permissions-body">
|
||||
<!-- view layer -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse1">
|
||||
{% trans "Who can view it?" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse1" class="panel-collapse collapse in">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="checkbox" name="view_anonymous" id="perms_view_anyone" value="AnonymousUser" {% if DEFAULT_ANONYMOUS_VIEW_PERMISSION %}checked{% endif %}>
|
||||
{% trans "Anyone" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="view_resourcebase" id="view_resourcebase_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="view_resourcebase" id="view_resourcebase_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- download layer -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse2">
|
||||
{% trans "Who can download it?" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse2" class="panel-collapse collapse">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="checkbox" name="download_anonymous" id="perms_download_resourcebase_anyone" value="AnonymousUser" {% if DEFAULT_ANONYMOUS_DOWNLOAD_PERMISSION %}checked{% endif %}>
|
||||
{% trans "Anyone" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="download_resourcebase" id="download_resourcebase_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="download_resourcebase" id="download_resourcebase_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- change metadata -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse3">
|
||||
{% trans "Who can change metadata for it?" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse3" class="panel-collapse collapse">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="change_resourcebase_metadata" id="change_resourcebase_metadata_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="change_resourcebase_metadata" id="change_resourcebase_metadata_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if is_layer %}
|
||||
<!-- change layer data -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse4">
|
||||
{% trans "Who can edit data for this layer?" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse4" class="panel-collapse collapse">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="change_layer_data" id="change_layer_data_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="change_layer_data" id="change_layer_data_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- change layer style -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse5">
|
||||
{% trans "Who can edit styles for this layer?" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse5" class="panel-collapse collapse">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="change_layer_style" id="change_layer_style_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="change_layer_style" id="change_layer_style_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- manage layer -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse6">
|
||||
{% trans "Who can manage it? (update, delete, change permissions, publish/unpublish it)" %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse6" class="panel-collapse collapse">
|
||||
<div class="controls">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following users:" %}
|
||||
<input class="user-select" type="text" name="manage_resourcebase" id="manage_resourcebase_users" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
{% trans "The following groups:" %}
|
||||
<input class="group-select" type="text" name="manage_resourcebase" id="manage_resourcebase_groups" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,38 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="modal fade" id="_permissions" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<form id="permission_form" accept-charset="UTF-8" method="post" class="modal-form" action="{% url "resource_permissions" resource.id %}">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Set permissions for this resource" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% include "_permissions.html" %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn btn-default" data-dismiss="modal">{% trans "Cancel" %}</a>
|
||||
<a href="#" class="btn btn-primary" data-dismiss="modal" id="perms_submit">{% trans "Apply Changes" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="_permissions_feedbacks" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="exampleModalLabel">Message box</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
...
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,334 +0,0 @@
|
||||
{% load i18n %}
|
||||
<script type="text/javascript">
|
||||
|
||||
function permissionsString(form, type) {
|
||||
var permissions = {
|
||||
'users': {},
|
||||
'groups': {}
|
||||
}
|
||||
if (typeof form === 'string'){
|
||||
form = $(form);
|
||||
}
|
||||
var data = form.serializeObject();
|
||||
|
||||
/*
|
||||
* If there's the anonymous user then set it's view permission and pop it
|
||||
*/
|
||||
permissions['users']['AnonymousUser'] = [];
|
||||
if (data.hasOwnProperty('view_anonymous')) {
|
||||
permissions['users']['AnonymousUser'] = ['view_resourcebase'];
|
||||
delete data['view_anonymous'];
|
||||
}
|
||||
if (data.hasOwnProperty('download_anonymous')) {
|
||||
if (permissions['users']['AnonymousUser'] != undefined){
|
||||
permissions['users']['AnonymousUser'].push('download_resourcebase');
|
||||
} else {
|
||||
permissions['users']['AnonymousUser'] = ['download_resourcebase'];
|
||||
};
|
||||
delete data['download_anonymous'];
|
||||
}
|
||||
|
||||
/*
|
||||
* Cycle through permissions to map the form structure perm = ['user1',',user2'] to
|
||||
* the geonode user = ['perm1','perm2'], the same for groups
|
||||
*/
|
||||
|
||||
for(var perm in data){
|
||||
if(data[perm][0] !== ''){
|
||||
var perms_to_assign = [perm];
|
||||
if(perm=='manage_resourcebase'){
|
||||
perms_to_assign = ['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'];
|
||||
}
|
||||
for (var i=0;i<data[perm][0].split(',').length;i++){
|
||||
var user = data[perm][0].split(',')[i];
|
||||
for(var j=0;j< perms_to_assign.length;j++){
|
||||
if(permissions['users'].hasOwnProperty(user)){
|
||||
permissions['users'][user].push(perms_to_assign[j]);
|
||||
}else{
|
||||
permissions['users'][user] = [perms_to_assign[j]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(data[perm][1] !== ''){
|
||||
var perms_to_assign = [perm];
|
||||
if(perm=='manage_resourcebase'){
|
||||
perms_to_assign = ['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'];
|
||||
}
|
||||
for (var i=0;i<data[perm][1].split(',').length;i++){
|
||||
var group = data[perm][1].split(',')[i];
|
||||
for(var j=0;j< perms_to_assign.length;j++){
|
||||
if(permissions['groups'].hasOwnProperty(group)){
|
||||
permissions['groups'][group].push(perms_to_assign[j]);
|
||||
}else{
|
||||
permissions['groups'][group] = [perms_to_assign[j]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return permissions
|
||||
};
|
||||
|
||||
$(function() {
|
||||
|
||||
$('#permissions-body').ready(function(){
|
||||
{% if resource %}
|
||||
$.ajax(
|
||||
"{% url "resource_permissions" resource.id %}",
|
||||
{
|
||||
success: function(data){
|
||||
var users = {
|
||||
view_resourcebase: [],
|
||||
download_resourcebase: [],
|
||||
change_resourcebase_metadata: [],
|
||||
change_layer_data: [],
|
||||
change_layer_style: [],
|
||||
manage_resourcebase: [],
|
||||
};
|
||||
|
||||
// let's initialize the anyone flags to false, if there's the AnonymousUser
|
||||
// they will be chacked later
|
||||
$('#perms_view_anyone').prop('checked', false);
|
||||
$('#perms_download_resourcebase_anyone').prop('checked', false);
|
||||
|
||||
/*
|
||||
* Compile the users fields after receiving the current permissions status from the server
|
||||
*/
|
||||
var perms = $.parseJSON($.parseJSON(data).permissions);
|
||||
|
||||
var perms_users = perms.users;
|
||||
|
||||
/*
|
||||
* If there is the group anonymous then treas it as it is the AnonymousUser
|
||||
* since the server doesn't explicitly send the users that belongs to a group with permissions
|
||||
*/
|
||||
if (perms.groups.hasOwnProperty('anonymous')){
|
||||
perms_users.AnonymousUser = perms.groups.anonymous;
|
||||
}
|
||||
|
||||
for (var user in perms_users){
|
||||
var user_perms = perms_users[user];
|
||||
if (user === 'AnonymousUser'){
|
||||
if(user_perms.indexOf('view_resourcebase') > -1){
|
||||
$('#perms_view_anyone').prop('checked', true);
|
||||
}
|
||||
if(user_perms.indexOf('download_resourcebase') > -1){
|
||||
$('#perms_download_resourcebase_anyone').prop('checked', true);
|
||||
}
|
||||
}else{
|
||||
for (var i=0;i<user_perms.length;i++){
|
||||
if(['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'].indexOf(user_perms[i]) >= 0){
|
||||
if(users['manage_resourcebase'].indexOf(user)<0){
|
||||
users['manage_resourcebase'].push(user);
|
||||
}
|
||||
}else{
|
||||
if(users.hasOwnProperty(user_perms[i])){
|
||||
users[user_perms[i]].push(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If "anyone" is checked then don't show all the users in the view perms field
|
||||
// if (perms_users.hasOwnProperty('AnonymousUser')
|
||||
// && perms_users['AnonymousUser'].indexOf('view_resourcebase') > -1){
|
||||
// users.view_resourcebase=[]
|
||||
// };
|
||||
|
||||
// if (perms_users.hasOwnProperty('AnonymousUser')
|
||||
// && perms_users['AnonymousUser'].indexOf('download_resourcebase') > -1){
|
||||
// users.download_resourcebase=[]
|
||||
// };
|
||||
|
||||
for (var perm in users){
|
||||
if(['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'].indexOf(user_perms[i]) >= 0){
|
||||
if(users['manage_resourcebase'].indexOf(user)<0){
|
||||
users['manage_resourcebase'].push(user);
|
||||
}
|
||||
}else{
|
||||
if(users.hasOwnProperty(user_perms[i])){
|
||||
users[user_perms[i]].push(user);
|
||||
}
|
||||
}
|
||||
$('#' + perm + '_users').val(users[perm].join());
|
||||
}
|
||||
addSelectUsers();
|
||||
|
||||
/*
|
||||
* Compile the groups fields after receiving the current permissions status from the server
|
||||
*/
|
||||
var groups = {
|
||||
view_resourcebase: [],
|
||||
download_resourcebase: [],
|
||||
change_resourcebase_metadata: [],
|
||||
change_layer_data: [],
|
||||
change_layer_style: [],
|
||||
manage_resourcebase: []
|
||||
};
|
||||
var perms_groups = perms.groups;
|
||||
for (var group in perms_groups){
|
||||
if (group !== 'anonymous'){
|
||||
var group_perms = perms_groups[group];
|
||||
for (var i=0;i<group_perms.length;i++){
|
||||
if(['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'].indexOf(group_perms[i]) >= 0){
|
||||
if(groups['manage_resourcebase'].indexOf(group)<0){
|
||||
groups['manage_resourcebase'].push(group);
|
||||
}
|
||||
}else{
|
||||
if(groups.hasOwnProperty(group_perms[i])){
|
||||
groups[group_perms[i]].push(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var perm in groups){
|
||||
$('#' + perm + '_groups').val(groups[perm].join());
|
||||
}
|
||||
|
||||
addSelectGroups();
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
{% else %}
|
||||
addSelectUsers();
|
||||
addSelectGroups();
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function addSelectUsers(){
|
||||
$("input.user-select").select2({
|
||||
placeholder: '{% trans "Choose users..." %}',
|
||||
minimumInputLength: 1,
|
||||
multiple: true,
|
||||
width: 'copy',
|
||||
ajax: {
|
||||
url: "{% url "account_ajax_lookup" %}",
|
||||
dataType: "json",
|
||||
type: "POST",
|
||||
data: function (term, page) {
|
||||
return {
|
||||
query: term,
|
||||
};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.users};
|
||||
}
|
||||
},
|
||||
id: userID,
|
||||
formatResult: userFormatResult,
|
||||
formatSelection: userFormatSelection,
|
||||
initSelection: function(element, callback) {
|
||||
var data = [];
|
||||
var val = element.val().split(",");
|
||||
$(element.val().split(",")).each(function (index,value) {
|
||||
data.push({username: value});
|
||||
});
|
||||
callback(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSelectGroups(){
|
||||
$("input.group-select").select2({
|
||||
placeholder: '{% trans "Choose groups..." %}',
|
||||
minimumInputLength: 1,
|
||||
multiple: true,
|
||||
width: 'copy',
|
||||
ajax: {
|
||||
url: "{% url "account_ajax_lookup" %}",
|
||||
dataType: "json",
|
||||
type: "POST",
|
||||
data: function (term, page) {
|
||||
return {
|
||||
query: term,
|
||||
};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.groups};
|
||||
}
|
||||
},
|
||||
id: groupID,
|
||||
formatResult: groupFormatResult,
|
||||
formatSelection: groupFormatSelection,
|
||||
initSelection: function(element, callback) {
|
||||
var data = [];
|
||||
var val = element.val().split(",");
|
||||
$(element.val().split(",")).each(function (index,value) {
|
||||
data.push({name: value});
|
||||
});
|
||||
callback(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function userID(user) {
|
||||
return user.username;
|
||||
}
|
||||
|
||||
function groupID(group) {
|
||||
return group.name;
|
||||
}
|
||||
|
||||
function userFormatResult(user) {
|
||||
return user.username;
|
||||
}
|
||||
|
||||
function userFormatSelection(user) {
|
||||
return user.username;
|
||||
}
|
||||
|
||||
function groupFormatResult(group) {
|
||||
return group.title;
|
||||
}
|
||||
|
||||
function groupFormatSelection(group) {
|
||||
return group.name;
|
||||
}
|
||||
|
||||
|
||||
var perms_submit = function() {
|
||||
var form = $(this);
|
||||
var action = form.attr("action");
|
||||
|
||||
var permissions = permissionsString(form, 'base');
|
||||
$.ajax(
|
||||
{
|
||||
type: "POST",
|
||||
url: action,
|
||||
data: JSON.stringify(permissions),
|
||||
success: function(data) {
|
||||
$("#modal_perms").modal("hide");
|
||||
message = JSON.parse(data);
|
||||
title = "";
|
||||
body = message.message;
|
||||
if (message.success) {
|
||||
title = "OK";
|
||||
} else {
|
||||
title = "Warning";
|
||||
}
|
||||
$("#_permissions_feedbacks").find('.modal-title').text(title);
|
||||
$("#_permissions_feedbacks").find('.modal-body').text(body);
|
||||
$("#_permissions_feedbacks").modal("show");
|
||||
}
|
||||
}
|
||||
);
|
||||
return false;
|
||||
};
|
||||
|
||||
$("#perms_submit").click(function(){
|
||||
$("#permission_form").submit();
|
||||
});
|
||||
|
||||
{% if resource %}
|
||||
$("#permission_form").submit(perms_submit);
|
||||
{% endif %}
|
||||
|
||||
$("#_bulk_permissions").on('hidden.bs.modal', function (e) {
|
||||
$('#bulk_perms_message').addClass("hidden");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,5 +0,0 @@
|
||||
<div class="alert alert-warn" id="status-message" hidden="hidden">
|
||||
<a class="close" onclick="$('.alert').hide()">×</a>
|
||||
<strong><p id="status-message-text">Placeholder for status-message</p></strong>
|
||||
<p id="status-message-text-body">Placeholder for status-message-body</p>
|
||||
</div>
|
||||
@@ -1,14 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block title %} {% trans "About HaitiData" %} — {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
<h2>{% trans "About HaitiData" %}</h2>
|
||||
</div>
|
||||
<p>Le but de ce site est de faciliter l’accès libre à de l’information, des données et des connaissances géospatiales, sur les désastres naturels et sur la vulnérabilité et le risque en Haïti, ainsi que d’encourager leur partage et leur utilisation.</p>
|
||||
<p>Les données géospatiales peuvent être utilisées à plusieurs fins : l’établissement de données de base, l’élaboration d’évaluations des risques, la planification, la surveillance de projets et le suivi de leur avancement. L’accès à de l’information de haute qualité est critique pour les planificateurs, les décideurs et autres intervenants impliqués dans la reconstruction d’Haïti. Ce site vise à faciliter un support plus efficace à la réhabilitation, le redressement et le développement durable à long terme du pays.</p>
|
||||
<p>Suite au tremblement de terre du 12 janvier 2010, une quantité substantielle de données géospatiales a été créée, permettant d’évaluer l’intensité du séisme, la probabilité d’inondations, les risques associés aux glissements de terrain et aux tsunamis ainsi que les dommages, de façon globale. L’énormité du besoin actuel en assistance matérielle, en support pour le renforcement de la structure de gouvernance ainsi que la quantité innombrable d’organisations locales et internationales se joignant dans l’assistance aux processus de reconstruction et de développement, posent également un défi considérable à la capacité du gouvernement et des autres mandataires à se coordonner, afin que le peuple d’Haïti en bénéficie. Ce site souhaite aider à informer les décideurs à tous les niveaux et dans tous les secteurs, dans l’immédiat ainsi que dans la planification de l’avenir, incluant la gestion du risque dérivé des hazard naturels.</p>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,21 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Account Pending Approval" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Account Pending Approval" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="href="{{ success_url }}">
|
||||
<i class="fa fa-angle-left" title="Go Back"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="href="{{ success_url }}">
|
||||
{% trans "Go Back" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>{% blocktrans %}We have sent the administrators a notice to approve your account associated with <b>{{ email }}</b>. If the account is approved, you will receive a confirmation notice.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
@@ -1,23 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Confirm your email address" %}{% endblock %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Confirm your email address" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Confirm your email address" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="href="{{ success_url }}">
|
||||
<i class="fa fa-angle-left" title="Go Back"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="href="{{ success_url }}">
|
||||
{% trans "Go Back" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>{% blocktrans %}We have sent you an email to <b>{{ email }}</b> for verification. Follow the link provided to finalize the signup process.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
@@ -1,23 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Log in" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Log in" %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<form role="form" method="POST" action="{% url "account_login" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{{ form|as_bootstrap }}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
<p><a href="{% url "forgot_username" %}">{% trans "Forgot your username?" %}</a></p>
|
||||
<p><a href="{% url "account_password_reset" %}">{% trans "Forgot your password?" %}</a></p>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Log in" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Log Out" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Log Out" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="javascript:history.back()">
|
||||
<i class="fa fa-angle-left" title="Back"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="javascript:history.back()">
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form method="POST" action="{% url "account_logout" %}" class="form-horizontal">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
<h3>{% trans "Are you sure you want to log out?" %}</h3>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Log out" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
{% load account_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Password change" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Password change" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="{{ user.get_absolute_url }}">
|
||||
<i class="fa fa-angle-left" title="Profile"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="{{ user.get_absolute_url }}">
|
||||
{% trans "User Profile" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% user_display request.user as user_display %}
|
||||
|
||||
{% block body %}
|
||||
<form method="POST" action="">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{ form|as_bootstrap }}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Change my password" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,31 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
{% load account_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Password reset" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Password reset" %}{% endblock %}
|
||||
|
||||
|
||||
{% user_display request.user as user_display %}
|
||||
|
||||
{% block body %}
|
||||
<h3>{% trans "Enter your email address below, and we'll send you an email allowing you to reset it." %}</h3>
|
||||
<form method="POST" action="">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Reset my password" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<p class="grid-spacer">{% blocktrans %}If you have any trouble resetting your password, contact us at <a href="mailto:{{ THEME_ACCOUNT_CONTACT_EMAIL }}">{{ THEME_ACCOUNT_CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
{% block extra_body %}
|
||||
<script>
|
||||
$("#id_email").focus();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,49 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Sign up" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Sign up" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="{{ success_url }}">
|
||||
<i class="fa fa-angle-left" title="Go Back"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="{{ success_url }}">
|
||||
{% trans "Go Back" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if REGISTRATION_OPEN %}
|
||||
<form id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" class="form-horizontal"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{ form|as_bootstrap }}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Sign up" %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>{% trans "Sorry, registrations are not open at this time." %}</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include "account/_signup_sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#id_username').focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends 'site_base.html' %}
|
||||
{% load activity_tags social_tags i18n %}
|
||||
|
||||
{% block extra_head %}
|
||||
{{ block.super }}{% endblock %}
|
||||
|
||||
{% block title %}{% ifequal request.user actor %}{% trans "My Activity feed" %}{% else %}{{ actor }}'s {% trans "Activity Feed" %}{% endifequal %}{% endblock %}
|
||||
{% block content_title %}{% ifequal request.user actor %}{% trans "My Activity feed" %}{% else %}{{ actor }}'s {% trans "Activity Feed" %}{% endifequal %}{% endblock %}
|
||||
|
||||
{% comment %}
|
||||
{% block navlinks %}
|
||||
<li><a href="{% url "actstream_object_feed" content_type_id=ctype.pk object_id=actor.pk %}">RSS</a></li>
|
||||
<li><a href="{% url "actstream_object_feed_atom" content_type_id=ctype.pk object_id=actor.pk %}">ATOM</a></li>
|
||||
{% endblock %}
|
||||
{% endcomment %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<h2>{% trans "Activity Feed for" %} {{ actor }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="no-style-list">
|
||||
{% for action in action_list %}
|
||||
{% activity_item action %}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions yet" %}</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,27 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grp-group">
|
||||
<h2>
|
||||
Are you sure you want to run the selected {{ objects_name }}?
|
||||
</h2>
|
||||
{% for cancellable_backup in cancellable_backups %}
|
||||
<ul class="grp-nested-list">{{ cancellable_backup.name }}</ul>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<div id="submit" class="grp-module grp-submit-row grp-fixed-footer">
|
||||
{% for cancellable_backup in cancellable_backups %}
|
||||
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ cancellable_backup.id }}" />
|
||||
{% endfor %}
|
||||
<input type="hidden" name="action" value="{{ action_exec }}" />
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
<a href="." class="grp-button grp-cancel-link">Cancel</a>
|
||||
<input type="submit" value="Yes, I'm sure" class="grp-button grp-default" />
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}{{ title }} | {{ site_title|default:_('GeoNode site admin') }}{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('GeoNode administration') }}</a></h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
<script src="{{ STATIC_URL }}lib/js/assets.min.js"></script>
|
||||
{% include 'autocomplete_light/static.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,37 +0,0 @@
|
||||
{% extends "announcements/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Announcements" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Delete Announcement" %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="{% url "announcements_list" %}">
|
||||
<i class="fa fa-align-justify" title="List"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="{% url "announcements_list" %}">
|
||||
{% trans "Announcements" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}announcements{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% url "announcements_delete" pk=announcement.pk as post_url %}
|
||||
<p class="lead">
|
||||
{% trans "Are you sure you want to delete this announcement?" %}
|
||||
</p>
|
||||
<p><b>{{ announcement.title }}</b></p>
|
||||
<p><em>{{ announcement.content }}</em></p>
|
||||
|
||||
<form action="{{ post_url }}" method="POST" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
<div class="form-actions">
|
||||
<a href="{% url "announcements_list" %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
<button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,17 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% blocktrans %}Announcements : {{ announcement }}{% endblocktrans %} {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<h2>{{ announcement.title }} ({{ announcement.level_label }})</h2>
|
||||
</div>
|
||||
<p>{{ announcement.creation_date }}</p>
|
||||
<div class="col-md-10">
|
||||
<blockquote>
|
||||
<p>{{ announcement.content }}</p>
|
||||
<small>{{ announcement.creator }}</small>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,4 +0,0 @@
|
||||
<span class="div" data-value="{{choice.pk}}" style="cursor:pointer;font-size:14px;" onclick="window.location.href='{{choice.detail_url}}'">
|
||||
{{ choice }}
|
||||
</span>
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n avatar_tags %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Add Avatar" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Add Avatar" %}{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{% avatar user 240 %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% if not avatars %}
|
||||
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
|
||||
{{ upload_avatar_form.as_p }}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{% csrf_token %}
|
||||
<p><input type="submit" class="btn btn-primary btn-block" value="{% trans "Upload New Image" %}" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<a class="btn btn-default btn-block" href="{% url "profile_edit" user.username %}">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<style>
|
||||
ul.errorlist {color: red; font-weight:700; list-style: none; margin-left: -40px;}
|
||||
input#id_avatar {width: 360px;}
|
||||
.btn {margin-top: 0.5em; margin-bottom: 0.5em;}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,56 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n avatar_tags %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Change Avatar" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Change Avatar" %}{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{% avatar user 240 %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% if not avatars %}
|
||||
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
|
||||
{% else %}
|
||||
<form method="POST" action="{% url 'avatar_change' %}">
|
||||
<ul class="list-unstyled">
|
||||
{{ primary_avatar_form.as_ul }}
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{% csrf_token %}
|
||||
<p><input type="submit" class="btn btn-primary btn-block" value="{% trans "Choose new Default" %}" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<hr/>
|
||||
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
|
||||
{{ upload_avatar_form.as_p }}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{% csrf_token %}
|
||||
<p><input type="submit" class="btn btn-primary btn-block" value="{% trans "Upload New Image" %}" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<a class="btn btn-danger btn-block" href="{% url 'avatar_delete' %}">{% trans "Delete Your Avatar" %}</a><br />
|
||||
<a class="btn btn-default btn-block" href="{% url "profile_edit" user.username %}">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<style>
|
||||
ul#id_choice {list-style: none; margin-left: -40px;}
|
||||
ul#id_choice li {display: inline;}
|
||||
input#id_avatar {width: 360px;}
|
||||
.btn {margin-top: 0.5em; margin-bottom: 0.5em;}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,39 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n avatar_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Delete Avatars" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Delete Avatars" %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>{% trans "Please select the avatars that you would like to delete." %}</p>
|
||||
{% if not avatars %}
|
||||
{% url 'avatar_change' as avatar_change_url %}
|
||||
<p>{% blocktrans %}You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<form method="POST" action="{% url 'avatar_delete' %}">
|
||||
<ul class="list-unstyled">
|
||||
{{ delete_avatar_form.as_ul }}
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn btn-danger btn-block" value="{% trans "Delete Avatars" %}" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<a class="btn btn-default btn-block" href="{% url "profile_edit" user.username %}">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<style>
|
||||
ul#id_choices {list-style: none; margin-left: -40px;}
|
||||
ul#id_choices li {display: inline;}
|
||||
.btn {margin-top: 0.5em; margin-bottom: 0.5em;}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,23 +0,0 @@
|
||||
{% load i18n %}
|
||||
<li class="list-group-item">
|
||||
<h4>{% trans "About" %}</h4>
|
||||
{% if resource.owner == resource.poc and resource.owner == resource.metadata_author %}
|
||||
<p>{% trans "Owner, Point of Contact, Metadata Author" %}</p>
|
||||
{% with resource.owner as profile %}
|
||||
{% include "people/_profile_about_item.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<p>{% trans "Owner" %}</p>
|
||||
{% with resource.owner as profile %}
|
||||
{% include "people/_profile_about_item.html" %}
|
||||
{% endwith %}
|
||||
<p>{% trans "Point of Contact" %}</p>
|
||||
{% with resource.poc as profile %}
|
||||
{% include "people/_profile_about_item.html" %}
|
||||
{% endwith %}
|
||||
<p>{% trans "Metadata Author" %}</p>
|
||||
{% with resource.metadata_author as profile %}
|
||||
{% include "people/_profile_about_item.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</li>
|
||||
@@ -1,173 +0,0 @@
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
{% if resource.title %}
|
||||
<dt>{% trans "Title" %}</dt>
|
||||
<dd itemprop="name">{{ resource.title|truncatechars:80 }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.srid and SRID_DETAIL == 'above' %}
|
||||
<dt>{% trans "SRID" %}</dt>
|
||||
<dd>{{ resource.srid }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'above' and resource.license %}
|
||||
<dt>{% trans "License" %}</dt>
|
||||
<dd itemprop="license">{{ resource.license.name_long }} <a href="#license-more-above" data-toggle="collapse" data-target=".license-more-above"><i class="fa fa-info-circle"></i></a></dd>
|
||||
{% endif %}
|
||||
<dd class="license-more-above collapse">
|
||||
{% for bullet in resource.license.description_bullets %}
|
||||
{{ bullet }}<br/><br/>
|
||||
{% endfor %}
|
||||
{% if resource.license.url %}
|
||||
+ For more info see <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
{% if resource.abstract %}
|
||||
<dt>{% trans "Abstract" %}</dt>
|
||||
<dd itemprop="description">{{ resource.abstract|escape|urlize|linebreaks|safe }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.date %}
|
||||
<dt>{% trans resource.date_type|title %} {% trans "Date" %}</dt>
|
||||
{% if resource.date_type == 'creation' %}
|
||||
<dd itemprop="dateCreated" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
|
||||
{% elif resource.date_type == 'publication' %}
|
||||
<dd itemprop="datePublished" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
|
||||
{% else %}
|
||||
<dd itemprop="dateModified" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if resource.display_type %}
|
||||
<dt>{% trans "Type" %}</dt>
|
||||
<dd>{{ resource.display_type }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.keywords.count > 0 %}
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd itemprop="keywords">
|
||||
{% for keyword in resource.keywords.all %}
|
||||
<a itemscope itemtype="http://schema.org/Text" href="{% url "search" %}?keywords__slug__in={{ keyword.slug }}" >
|
||||
{{ keyword.name }}
|
||||
</a>
|
||||
{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.category %}
|
||||
<dt>{% trans "Category" %}</dt>
|
||||
<dd><a href="{% url "search" %}?category__identifier__in={{ resource.category.identifier }}">{{ resource.category }}</a> {% if resource.category.description %}<a href="#category-more" data-toggle="collapse" data-target=".category-more"><i class="fa fa-info-circle"></i></a>{% endif %}</dd>
|
||||
{% if resource.category.description %}
|
||||
<dd class="category-more collapse">
|
||||
{{ resource.category.description }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if resource.regions.all %}
|
||||
<dt>{% trans "Regions" %}</dt>
|
||||
<dd itemprop="keywords">
|
||||
{% for region in resource.regions.all %}
|
||||
<a itemscope itemtype="http://schema.org/Text" href="{% url "search" %}?regions__name__in={{ region.name }}">
|
||||
{{ region.name }}
|
||||
</a>
|
||||
{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.owner %}
|
||||
<dt>{% trans "Owner" %}</dt>
|
||||
<dd><a itemprop="author" href="{{ resource.owner.get_absolute_url }}">{{ resource.owner.username }}</a></dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.poc.user %}
|
||||
<dt>{% trans "Point of Contact" %}</dt>
|
||||
<dd><a href="{{ resource.poc.user.get_absolute_url }}">{{ resource.poc.user.username }}</a></dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt><a href="#more" data-toggle="collapse" data-target=".more">{% trans "More info" %}</a></dt>
|
||||
<dd>-</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<div class="more collapse">
|
||||
|
||||
{% if resource.srid and SRID_DETAIL == 'below' %}
|
||||
<dt>{% trans "SRID" %}</dt>
|
||||
<dd>{{ resource.srid }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'below' and resource.license %}
|
||||
<dt>{% trans "License" %}</dt>
|
||||
<dd>{{ resource.license.name_long }} <a href="#license-more-below" data-toggle="collapse" data-target=".license-more-below"><i class="fa fa-info-circle"></i></a></dd>
|
||||
<dd class="license-more-below collapse">
|
||||
{% for bullet in resource.license.description_bullets %}
|
||||
{{ bullet }}<br/><br/>
|
||||
{% endfor %}
|
||||
{% if resource.license.url %}
|
||||
+ For more info see <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.maintenance_frequency %}
|
||||
<dt>{% trans "Maintenance Frequency" %}</dt>
|
||||
<dd>{{ resource.maintenance_frequency_title }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.restriction_code_type or resource.constraints_other %}
|
||||
<dt>{% trans "Restrictions" %}</dt>
|
||||
<dd>{% if resource.constraints_other %}
|
||||
{{ resource.constraints_other }}
|
||||
{% else %}
|
||||
{{ resource.restriction_code_type }}
|
||||
{% endif %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.edition %}
|
||||
<dt>{% trans "Edition" %}</dt>
|
||||
<dd>{{ resource.edition}}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.purpose %}
|
||||
<dt>{% trans "Purpose" %}</dt>
|
||||
<dd>{{ resource.purpose|escape|urlize|linebreaks|safe|truncatechars:160 }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.language %}
|
||||
<dt>{% trans "Language" %}</dt>
|
||||
<dd>{{ resource.language_title }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.temporal_extent_start and resource.temporal_extent_end %}
|
||||
<dt>{% trans "Temporal Extent" %}</dt>
|
||||
<dd>{{ resource.temporal_extent_start }} - {{ resource.temporal_extent_end }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.data_quality_statement %}
|
||||
<dt>{% trans "Data Quality" %}</dt>
|
||||
<dd>{{ resource.data_quality_statement }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.supplemental_information %}
|
||||
<dt>{% trans "Supplemental Information" %}</dt>
|
||||
<dd>{{ resource.supplemental_information|truncatechars:160|escape|urlize|linebreaks|safe }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.spatial_representation_type %}
|
||||
<dt>{% trans "Spatial Representation Type" %}</dt>
|
||||
<dd>{{ resource.spatial_representation_type }}</dd>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</dl>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,7 +0,0 @@
|
||||
<meta property="og:title" content="{{ resource.title }}" />
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}" />
|
||||
<meta property="og:url" content="http://{{ SITE_DOMAIN }}{{ resource.detail_url }}" />
|
||||
<meta property="og:description" content="{{ resource.class_name }} on {{ SITE_NAME }} by {{ resource.owner.get_full_name | default:resource.owner.username }}" />
|
||||
<meta name="og:image" content="{{ resource.thumbnail_url }}" />
|
||||
<meta name="og:image:width" content="200" />
|
||||
<meta name="og:image:height" content="150" />
|
||||
@@ -1,7 +0,0 @@
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="{{ TWITTER_SITE }}" />
|
||||
<!-- Twitter truncates twitter:title to 70 characters. -->
|
||||
<meta name="twitter:title" content="{{ resource.title|truncatechars:70 }}" />
|
||||
<!-- Twitter truncates twitter:description at the word to 200 characters. -->
|
||||
<meta name="twitter:description" content="{{ resource.class_name }} on {{ SITE_NAME }} by {{ resource.owner.get_full_name | default:resource.owner.username }}" />
|
||||
<meta name="twitter:image" content="{{ resource.thumbnail_url }}" />
|
||||
@@ -1,10 +0,0 @@
|
||||
{% extends "base/_resourcebase_info_panel.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
<article itemscope itemtype="http://schema.org/Dataset" class="description tab-pane active" id="info">
|
||||
{% block article_content %}
|
||||
{% block content %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</article>
|
||||
@@ -1,177 +0,0 @@
|
||||
{% load i18n %}
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ resource.title }}</title>
|
||||
{% block head %}
|
||||
{% if DEBUG_STATIC %}
|
||||
<link href="{{ STATIC_URL }}lib/css/jquery.dataTables.css" rel="stylesheet" />
|
||||
<link href="{{ STATIC_URL }}lib/css/select2.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/jquery-ui.css" rel="stylesheet"/>
|
||||
<link href="{{ STATIC_URL }}lib/css/bootstrap-datetimepicker.css" rel="stylesheet"/>
|
||||
{% else %}
|
||||
<link href="{{ STATIC_URL }}lib/css/assets.min.css" rel="stylesheet"/>
|
||||
{% endif %}
|
||||
<link href="{{ STATIC_URL }}geonode/css/ext-compatibility.css" rel="stylesheet" />
|
||||
<link href="{{ STATIC_URL }}geonode/css/base.css" rel="stylesheet" />
|
||||
<style type="text/css">[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}</style>
|
||||
<style>
|
||||
dl dd{ margin-left:20px; }
|
||||
dl dt {margin-top:10px;}
|
||||
ul.nop {list-style-type: none;}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body style="background-color:white;">
|
||||
{% block body_outer %}
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock body_outer %}
|
||||
<div id="wrap">
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<div class="row">
|
||||
<div >
|
||||
<h4 >Resource Metadata</h4>
|
||||
<h2 class="page-title">{{ resource.title }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<dl>
|
||||
<dt>Thumbnail</dt>
|
||||
<dd><img class='items-list thumb' style="border: 1px solid #ccc;margin-top:10px;" src='{{resource.thumbnail_url}}' alt="{{ resource.title }}"></dd>
|
||||
|
||||
<dt>Resource ID</dt>
|
||||
<dd>{{resource.uuid}}</dd>
|
||||
|
||||
<dt>{% trans "Title" %}</dt>
|
||||
<dd>{{resource.title}}</dd>
|
||||
|
||||
<dt>{% trans "Date" %}</dt>
|
||||
<dd>{{resource.date}}, {% trans resource.date_type|title %} </dd>
|
||||
|
||||
<dt>{% trans "Abstract" %}</dt>
|
||||
<dd>{{resource.abstract}}</dd>
|
||||
|
||||
<dt>{% trans "Edition" %}</dt>
|
||||
{% if resource.edition %}
|
||||
<dd>{{resource.edition}}</dd>
|
||||
{% else %}
|
||||
<dd> -- </dd>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<dt>{% trans "Owner" %}</dt>
|
||||
<dd>{{resource.owner}}</dd>
|
||||
|
||||
<dt>{% trans "Point of Contact" %}</dt>
|
||||
<dd>{{extra_res_md.poc_last_name}}</dd>
|
||||
<dd><a href="mailto:{{extra_res_md.poc_email}}"><i class="fa fa-envelope"></i>{{extra_res_md.poc_email}}</a></dd>
|
||||
|
||||
|
||||
<dt>{% trans "Purpose" %}</dt>
|
||||
{% if resource.purpose %}
|
||||
<dd>{{resource.purpose}}</dd>
|
||||
{% else %}
|
||||
<dd> -- </dd>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<dt>{% trans "Maintenance Frequency" %}</dt>
|
||||
<dd>{{resource.maintenance_frequency}}</dd>
|
||||
|
||||
<dt>{% trans "Type" %} </dt>
|
||||
<dd>{{extra_res_md.sprt_identifier}}</dd>
|
||||
|
||||
<dt>{% trans "Restrictions" %}</dt>
|
||||
<dd>{{resource.restriction_code_type}}</dd>
|
||||
<dd>{{resource.constraints_other}}</dd>
|
||||
|
||||
<dt>{% trans "License" %}</dt>
|
||||
<dd>{{resource.license}}</dd>
|
||||
|
||||
<dt>{% trans "Language" %} </dt>
|
||||
<dd>{{resource.language}}</dd>
|
||||
|
||||
<dt>{% trans "Temporal Extent" %}</dt>
|
||||
<dt>Start </dt>
|
||||
{% if resource.temporal_extent_start %}
|
||||
<dd> {{resource.temporal_extent_start}} </dd>
|
||||
{% else %}
|
||||
<dd> -- </dd>
|
||||
{% endif %}
|
||||
<dt>End </dt>
|
||||
{% if resource.temporal_extent_end %}
|
||||
<dd> {{resource.temporal_extent_end}} </dd>
|
||||
{% else %}
|
||||
<dd> -- </dd>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<dt>{% trans "Supplemental Information" %}</dt>
|
||||
<dd>{{resource.supplemental_information}}</dd>
|
||||
|
||||
<dt>{% trans "Data Quality" %} </dt>
|
||||
{% if resource.data_quality_statement %}
|
||||
<dd>{{resource.data_quality_statement}}</dd>
|
||||
{% else %}
|
||||
<dd> -- </dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>Extent</dt>
|
||||
<dd>
|
||||
<ul class="nop">
|
||||
<li>long min: {{resource.bbox_x0}}</li>
|
||||
<li>long max: {{resource.bbox_x1}}</li>
|
||||
<li>lat min: {{resource.bbox_y0}}</li>
|
||||
<li>lat max: {{resource.bbox_y1}}</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Spatial Reference System Identifier</dt>
|
||||
<dd>{{resource.srid}}</dd>
|
||||
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd>{{extra_res_md.keywords}}</dd>
|
||||
|
||||
<dt>{% trans "Category" %}</dt>
|
||||
<dd>{{resource.category}}</dd>
|
||||
|
||||
{% if resource.regions.all %}
|
||||
<dt>{% trans "Regions" %}</dt>
|
||||
<dd>
|
||||
{% for region in resource.regions.all %}
|
||||
{{ region.name }}
|
||||
{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if "layer" in request.META.HTTP_REFERER|stringformat:"s" %}
|
||||
<dt>Attributes</dt>
|
||||
<dd>
|
||||
<table id="attr_table" class="table table-striped table-bordered table-condensed" style="margin-top:10px;font-size:14px;">
|
||||
</table>
|
||||
</dd>
|
||||
<script type="text/javascript">
|
||||
var content="{{extra_res_md.atrributes}}";
|
||||
content = content.replace(/\</gi,"<").replace(/\>/gi,">");
|
||||
var headertab="<thead><tr><th style='width:25%'>Attribute name</th><th>Label</th><th>Description</th></tr></thead>";
|
||||
document.getElementById("attr_table").innerHTML=headertab+content;
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,104 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block title %}{{ block.super }} {% trans "Information for Developers" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Information for Developers" %}{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
<h2>{% trans "Information for Developers" %}</h2>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">{% trans "Useful information for developers interested in GeoNode." %}</p>
|
||||
{% blocktrans %}
|
||||
<p><a href="http://geonode.org/">GeoNode</a> is an open service built on open source software. We encourage you to build new applications using the components and resources it provides. This page is a starting point for developers interesting in taking full advantage of GeoNode. It also includes links to the project's source code so anyone can build and customize their own GeoNode. </p>
|
||||
|
||||
<h3>GeoNode Software</h3>
|
||||
|
||||
<p>All the code that runs GeoNode is open source. The code is available at <a href="http://github.com/GeoNode/geonode">http://github.com/GeoNode/geonode/</a>. The issue tracker for the project is at <a href="http://github.com/GeoNode/geonode/issues">http://github.com/GeoNode/geonode/issues</a>.</p>
|
||||
|
||||
<p>GeoNode is built using several open source projects, each with its own community. If you are interested in contributing new features to the GeoNode, we encourage you to do so by contributing to one of the projects on which it is built:</p>
|
||||
<ul>
|
||||
<li><a href="http://geoext.org">GeoExt</a> - The JavaScript toolkit for rich web mapping applications</li>
|
||||
<li><a href="http://geoserver.org">GeoServer</a> - Standards based server for geospatial information</li>
|
||||
<li><a href="http://geowebcache.org">GeoWebCache</a> - Cache engine for WMS Tiles</li><li><a href="http://openlayers.org">OpenLayers</a> - Pure JavaScript library powering the maps of GeoExt</li>
|
||||
<li><a href="http://pycsw.org">pycsw</a> - CSW, OpenSearch and OAI-PMH metadata catalogue server</li>
|
||||
</ul>
|
||||
|
||||
<h3>What are OGC Services?</h3>
|
||||
<p>The data in this application is served using open standards endorsed by the <a href="http://opengeospatial.org/">Open Geospatial Consortium</a>; in particular, WMS (Web Map Service) is used for accessing maps, WFS (Web Feature Service) is used for accessing vector data, and WCS (Web Coverage Service) is used for accessing raster data. WMC (Web Map Context Documents) is used for sharing maps. You can use these services in your own applications using libraries such as OpenLayers, GeoTools, and OGR (all of which are open-source software and available at zero cost).</p>
|
||||
|
||||
<h3>What is GeoWebCache?</h3>
|
||||
<p>GeoWebCache provides mapping tiles that are compatible with a number of mapping engines, including Google Maps, Bing Maps and OpenLayers. All the data hosted by GeoNode is also available through GeoWebCache. GeoWebCache improves on WMS by caching data and providing more responsive maps.</p>
|
||||
|
||||
<h3>CSW Example Code</h3>
|
||||
<p>To interact with GeoNode's CSW you can use any CSW client (QGIS MetaSearch, GRASS, etc.). The following example illustrates a simple invocation using the OWSLib Python package:</p>
|
||||
<p><code>from owslib.csw import CatalogueServiceWeb</code></p>
|
||||
<p><code>from owslib.fes import PropertyIsLike</code></p>
|
||||
<p><code>csw = CatalogueServiceWeb('{{ CATALOGUE_BASE_URL }}')</code></p>
|
||||
<p><code>anytext = PropertyIsLike('csw:AnyText', 'birds')')</code></p>
|
||||
<p><code>csw.getrecords2(constraints=[anytext])</code></p>
|
||||
<p><code>print csw.results</code></p>
|
||||
<p><code>print csw.records</code></p>
|
||||
|
||||
<h3>OpenLayers Example Code</h3>
|
||||
|
||||
<p>To include a GeoNode map layer in an OpenLayers map, first find the name for that layer. This is found in the layer's <code>name</code> field (not <code>title</code>) of the layer list. For this example, we will use the Nicaraguan political boundaries background layer, whose name is <code>risk:nicaragua_admin</code>. Then, create an instance of OpenLayers.Layer.WMS:</p>
|
||||
<p><code>var geonodeLayer = new OpenLayers.Layer.WMS("GeoNode Risk Data", "http://demo.geonode.org/geoserver/wms",{ layers: "risk:nicaragua_admin" });</code></p>
|
||||
|
||||
<h3>Google Maps Example Code</h3>
|
||||
<p>To include a GeoNode map layer in a Google Map, include the layer namein the URL template.</p>
|
||||
<p><code>var tilelayer = new GTileLayer(null, null, null, {tileUrlTemplate: 'http://demo.geonode.org/geoserver/gwc/service/gmaps?layers=risk:nicaragua_admin&zoom={Z}&x={X}&y={Y}', isPng:true, opacity:0.5 } );</code></p>
|
||||
|
||||
<h3>Shapefile/GeoJSON/GML Output</h3>
|
||||
<p>To get data from the GeoNode web services use the WFS protocol. For example, to get the full Nicaraguan admin boundaries use:</p>
|
||||
<p><code>http://demo.geonode.org/geoserver/wfs?request=GetFeature&typeName=risk:nicaragua_admin&outputformat=SHAPE-ZIP</code></p>
|
||||
<p>Changing output format to <code>json</code>, <code>GML2</code>, <code>GML3</code>, or <code>csv</code> will get data in those formats. The WFS protocol also can handle more precise queries, specifying a bounding box or various spatial and non-spatial filters based on the attributes of the data.</p>
|
||||
|
||||
<h3>GeoTools Example Code</h3>
|
||||
<p>Create a DataStore and extract a FeatureType from it, then run a Query. It is all documented on the wiki at <code>http://geotools.org/</code>.</p>
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<h3>{% trans "GeoNode's Web Services" %}</h3>
|
||||
<p>{% trans "GeoNode's Web Services are available from the following URLs:" %}</p>
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<td><strong>{% trans "Dynamic tiles via WMS:" %}</strong></td>
|
||||
<td><a href="{{GEOSERVER_BASE_URL}}ows?service=WMS&version=1.1.1&request=GetCapabilities">WMS 1.1.1</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Vector data via WFS:" %}</strong></td>
|
||||
<td><a href="{{GEOSERVER_BASE_URL}}ows?service=WFS&version=1.1.0&request=GetCapabilities">WFS 1.1.0</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Raster data via WCS:" %}</strong></td>
|
||||
<td><a href="{{GEOSERVER_BASE_URL}}ows?service=WCS&version=1.1.1&request=GetCapabilities">WCS 1.1.1</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Metadata search via CSW:" %}</strong></td>
|
||||
<td><a href="{{CATALOGUE_BASE_URL}}?service=CSW&version=2.0.2&request=GetCapabilities">CSW 2.0.2</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Metadata search via OpenSearch:" %}</strong></td>
|
||||
<td><a href="{{CATALOGUE_BASE_URL}}?mode=opensearch&service=CSW&version=2.0.2&request=GetCapabilities">OpenSearch 1.0</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Metadata search via OAI-PMH:" %}</strong></td>
|
||||
<td><a href="{{CATALOGUE_BASE_URL}}?mode=oaipmh&verb=Identify">OAI-PMH 2.0</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Open Data:" %}</strong></td>
|
||||
<td><a href="{{SITEURL}}/data.json">data.json</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Cached tiles via WMTS:" %}</strong></td>
|
||||
<td><a href="{{GEOSERVER_BASE_URL}}gwc/service/wmts?service=WMTS&version=1.0.0&request=GetCapabilities">WMTS 1.0.0</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1 +0,0 @@
|
||||
<p>{{ comment }}</p>
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %} {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}documents{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock body_outer %}
|
||||
@@ -1,90 +0,0 @@
|
||||
{% extends "documents/document_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ document.typename }} — {{ block.super }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% include "geonode/ext_header.html" %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}data{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
<a href="{% url "document_browse" %}" class="btn btn-primary pull-right">{% trans "Explore Documents" %}</a>
|
||||
<h2 class="page-title">{% trans "Edit Metadata" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
{% trans "Editing details for" %} {{ document.title }}
|
||||
</p>
|
||||
<form class="form-horizontal" action="{% url "document_metadata" document.id %}" method="POST">
|
||||
{% if document_form.errors or category_form.errors or author_form.errors or poc.errors %}
|
||||
<p class="bg-danger">{% blocktrans %}Error updating metadata. Please check the following fields: {% endblocktrans %}</p>
|
||||
<ul class="bg-danger">
|
||||
{% if author_form.errors %}
|
||||
<li>{% trans "Metadata Author" %}</li>
|
||||
{{ author_form.errors }}
|
||||
{% endif %}
|
||||
{% if poc_form.errors %}
|
||||
<li>{% trans "Point of Contact" %}</li>
|
||||
{{ poc_form.errors }}
|
||||
{% endif %}
|
||||
{% for field in document_form %}
|
||||
{% if field.errors %}
|
||||
<li>{{ field.label }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if category_form.errors %}
|
||||
<li>{{ category_form.errors.as_ul }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
<div class="form-controls">
|
||||
{{ document_form|as_bootstrap }}
|
||||
</div>
|
||||
<fieldset class="form-controls modal-forms modal hide fade" id="poc_form" >
|
||||
<h2>{% trans "Point of Contact" %}</h2>
|
||||
{{ poc_form|as_bootstrap }}
|
||||
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
||||
</fieldset>
|
||||
<fieldset class="form-controls modal-forms modal hide fade" id="metadata_form">
|
||||
<h2>{% trans "Metadata Provider" %}</h2>
|
||||
{{ author_form|as_bootstrap }}
|
||||
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
||||
</fieldset>
|
||||
<fieldset id="category_form">
|
||||
<label class="control-label required-field">{% trans "Category" %}</label><br/>
|
||||
{% autoescape off %}
|
||||
<div style="clear:both;padding-left:175px;">
|
||||
{% for choice in category_form.category_choice_field.field.choices %}
|
||||
<div style="width:50%;float:left;padding-bottom:5px;">
|
||||
<input type="radio" name="category_choice_field" value="{{ choice.0 }}"
|
||||
{% ifequal category_form.initial choice.0 %}
|
||||
checked="checked"
|
||||
{% endifequal %}>
|
||||
{{ choice.1 }}
|
||||
</input>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endautoescape %}
|
||||
</fieldset>
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
{% include 'metadata_form_js.html' %}
|
||||
{% endblock %}
|
||||
@@ -1 +0,0 @@
|
||||
{% extends "metadata_detail.html" %}
|
||||
@@ -1,26 +0,0 @@
|
||||
{% extends "documents/document_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Deleting" %} {{ document.title }} — {{ block.super }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<h2 class="page-title">{% trans "Remove Document" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
{% blocktrans with document.title as document_title %}
|
||||
Are you sure you want to remove <a href="{{ document.get_absolute_url }}">{{ document_title }}</a>?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form action="{% url "document_remove" document.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="{% trans "Yes, I am sure" %}" class="btn btn-danger" />
|
||||
<a href="{{ document.get_absolute_url }}" class="btn btn-default">{% trans "No, don't remove it" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,34 +0,0 @@
|
||||
{% extends "documents/document_upload_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans "Replace Document" %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}documents replace{% endblock body_class %}
|
||||
|
||||
{% block head %}
|
||||
{% include "geonode/app_header.html" %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="block">
|
||||
<div class="col-md-8">
|
||||
<h2 class="page-title">{% trans "Replace " %}{{ document.title }}</h2>
|
||||
<div id="upload_form">
|
||||
<form method="post" enctype="multipart/form-data" action="{% url "document_replace" document.id %}">
|
||||
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" />
|
||||
{{ form.errors }}
|
||||
{% if document.doc_file %}
|
||||
{{ form.doc_file }}
|
||||
{% elif document.doc_url %}
|
||||
{{ form.doc_url }}
|
||||
{% endif %}
|
||||
<section>
|
||||
<button id="clear-button" type="reset" class="btn btn-default">{% trans "Clear" %}</button>
|
||||
<button id="upload-button" type="submit" class="btn btn-danger" value="Update">{% trans "Replace Document" %}</button>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,8 +0,0 @@
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
@@ -1,4 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
@@ -1,30 +0,0 @@
|
||||
{% verbatim %}
|
||||
<article ng-repeat="group in results" ng-cloak class="ng-cloak">
|
||||
<div class="col-xs-12 col-sm-6 col-lg-4 group-container">
|
||||
<div class="col-xs-12 group-avatar">
|
||||
<div class="col-xs-4 group-image">
|
||||
<a ng-if="group.logo" href="{{ group.detail_url }}" ><img ng-if="group.logo" ng-src="{{ group.logo }}" alt="{{ group.title }}" class="group-logo" /></a>
|
||||
</div>
|
||||
<div class="col-xs-8 group-details">
|
||||
<h5><a href="{{ group.detail_url }}">{{ group.title }}</a></h5>
|
||||
<!-- <a href="mailto:{{ group.email }}" ng-if="group.email != ''"><i class="fa fa-envelope-o"></i></a> -->
|
||||
<p><small>{{ group.description | limitTo: 100 }}{{ group.description.length > 100 ? '...' : ''}}</small></p>
|
||||
</div>
|
||||
<div class="col-xs-12 group-items">
|
||||
<ul class="list-inline">
|
||||
<li>
|
||||
<a href="{{ group.detail_url }}">
|
||||
<strong>{{ group.member_count }}</strong>
|
||||
<ng-pluralize count="group.member_count" when="{'1': 'Member', 'other': 'Members'}"></ng-pluralize>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ group.detail_url }}">
|
||||
<strong>{{ group.manager_count }}</strong>
|
||||
<ng-pluralize count="group.manager_count" when="{'1': 'Manager', 'other': 'Managers'}"></ng-pluralize>
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endverbatim %}
|
||||
@@ -1,10 +0,0 @@
|
||||
{% load avatar_tags %}
|
||||
<meta property="og:title" content="{{ object.title|default:object.slug|truncatechars:70 }}" />
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}" />
|
||||
<meta property="og:url" content="http{% if request.is_secure %}s{% endif %}://{{ SITE_DOMAIN }}{{ object.get_absolute_url }}" />
|
||||
<meta property="og:description" content="Group {{ object.title|default:object.slug }} on {{ SITE_NAME }}" />
|
||||
<!-- Need to create thumbnails for group logos since there are size restrictions
|
||||
<meta name="og:image" content="" />
|
||||
<meta name="og:image:width" content="200" />
|
||||
<meta name="og:image:height" content="200" />
|
||||
-->
|
||||
@@ -1,9 +0,0 @@
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="{{ TWITTER_SITE }}" />
|
||||
<!-- Twitter truncates twitter:title to 70 characters. -->
|
||||
<meta name="twitter:title" content="{{ object.title|default:object.slug|truncatechars:70 }}" />
|
||||
<!-- Twitter truncates twitter:description at the word to 200 characters. -->
|
||||
<meta name="twitter:description" content="Group {{ object.title|default:object.slug }} on {{ SITE_NAME }}" />
|
||||
<!-- Need to create thumbnails for group logos since there are size restrictions
|
||||
<meta name="twitter:image" content="" />
|
||||
-->
|
||||
@@ -1,70 +0,0 @@
|
||||
{% extends 'site_base.html' %}
|
||||
{% load activity_tags social_tags i18n %}
|
||||
|
||||
{% block extra_head %}
|
||||
{{ block.super }}{% endblock %}
|
||||
|
||||
{% block title %}{% trans "Activity Feed for" %} {{ group.title }}{% endblock %}
|
||||
{% block content_title %}{% trans "Activity Feed for" %} {{ group.title }}{% endblock %}
|
||||
|
||||
{% comment %}
|
||||
{% block navlinks %}
|
||||
<li><a href="{% url "actstream_object_feed" content_type_id=ctype.pk object_id=actor.pk %}">RSS</a></li>
|
||||
<li><a href="{% url "actstream_object_feed_atom" content_type_id=ctype.pk object_id=actor.pk %}">ATOM</a></li>
|
||||
{% endblock %}
|
||||
{% endcomment %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
<h2 class="page-title">{% trans "Activity Feed for" %} <a href="{% url "group_detail" group.slug %}">{{ group.title }}</a></h2>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#all" data-toggle="tab"><i class=""></i>{% trans "All" %}</a></li>
|
||||
<li><a href="#layers" data-toggle="tab"><i class="fa fa-square-o rotate-45"></i> {% trans "Layers" %}</a></li>
|
||||
<li><a href="#maps" data-toggle="tab"><i class="fa fa-map-marker"></i> {% trans "Maps" %}</a></li>
|
||||
<li><a href="#comments" data-toggle="tab"><i class="fa fa-comment-o"></i> {% trans "Comments" %}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<article id="all" class="tab-pane active">
|
||||
<ul class="no-style-list">
|
||||
{% for action in action_list %}
|
||||
{% activity_item action %}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions yet" %}</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
<article id="layers" class="tab-pane">
|
||||
<ul class="no-style-list">
|
||||
{% for action in action_list_layers %}
|
||||
{% activity_item action %}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions yet" %}</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
<article id="maps" class="tab-pane">
|
||||
<ul class="no-style-list">
|
||||
{% for action in action_list_maps %}
|
||||
{% activity_item action %}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions yet" %}</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
<article id="comments" class="tab-pane">
|
||||
<ul class="no-style-list">
|
||||
{% for action in action_list_comments %}
|
||||
{% activity_item action %}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions yet" %}</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
@@ -1,3 +0,0 @@
|
||||
You have been invited to join the group "{{ group.title }}" at {{ domain }}.
|
||||
|
||||
http://{{ domain }}/groups/group/{{ group.slug }}/invite/{{ invite.token }}
|
||||
@@ -1 +0,0 @@
|
||||
Invitation to join the group "{{ group.title }}" at {{ domain }}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %} {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}groups explore{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock body_outer %}
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "groups/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div class="onecol">
|
||||
|
||||
<h2> {% trans "Members" %} </h2>
|
||||
<div id="assets"></div>
|
||||
|
||||
<h2>{% trans "Membership Request" %}</h2>
|
||||
<p>You have been invited to join the group {{ object.title }}. Would you like to join?
|
||||
<form class="uniForm" method="POST" action="">
|
||||
{% csrf_token %}
|
||||
<button type="submit" value="decline" name="decline">{% trans "Don't Join" %}</button>
|
||||
<button type="submit" value="accept" name="accept">{% trans "Join Group" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -2,11 +2,14 @@
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Update Group Members" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Update Group Members" %}{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-8">
|
||||
<h2 class="page-header">{% trans "Edit Members for" %} <a href="{% url "group_detail" group.slug %}">{{ group.title }}</a></h2>
|
||||
<h2 class="page-title">{% trans "Members" %}</h2>
|
||||
<h3>{% trans "Members" %}</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="nav nav-tabs">
|
||||
@@ -96,13 +99,13 @@
|
||||
</article>
|
||||
</div>
|
||||
{% if member_form %}
|
||||
<h2>{% trans "Add members" %}</h2>
|
||||
<h3>{% trans "Add members" %}</h3>
|
||||
<form class="uniForm" method="POST" action="{% url "group_members_add" group.slug %}">
|
||||
{% csrf_token %}
|
||||
<div id="member_form_container">
|
||||
{{ member_form|as_bootstrap }}<br/><br/>
|
||||
</div>
|
||||
<input type="submit" value="Add Group Members" class="btn btn-success"/>
|
||||
<input type="submit" value="Add Group Members" class="btn btn-primary"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{% extends "groups/group_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ group.title }} — {{ block.super }}{% endblock %}
|
||||
{% block body_class %}groups remove{% endblock %}
|
||||
{% block title %}{{ block.super }} {% trans "Remove Group" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Remove Group" %}{% endblock %}
|
||||
|
||||
{% block body_class %}groups{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "groups/group_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block sidebar %}
|
||||
<div class="col-md-2">
|
||||
<h2>{% trans "Remove Maps/Data from Group" %}</h2>
|
||||
<form method="POST" action="">
|
||||
{% csrf_token %}
|
||||
<ul>
|
||||
{{ map_form.as_ul }}
|
||||
</ul>
|
||||
<ul>
|
||||
{{ layer_form.as_ul }}
|
||||
</ul>
|
||||
<input type="submit" value="{% trans "Remove selected maps/data" %}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -2,8 +2,10 @@
|
||||
{% load bootstrap_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Create Group" %}{% endblock %}
|
||||
{% block body_class %}groups update{% endblock %}
|
||||
{% block title %}{{ block.super }} {% trans "Update Group" %}{% endblock %}
|
||||
{% block page-title %}{% trans "Update Group" %}{% endblock %}
|
||||
|
||||
{% block body_class %}groups{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="block">
|
||||
@@ -30,5 +32,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,77 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block title %}{{ block.super }} {% trans "User Guide" %}{% endblock %}
|
||||
{% block page-title %}{% trans "User Guide" %}{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
<h2>{% trans "GeoNode Help" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">{% trans "This page provides helpful information about how to use the GeoNode. You can use the sidebar links to navigate to what you want to know." %}</p>
|
||||
|
||||
{% blocktrans %}
|
||||
<p>The GeoNode provides access to data sets and a map editing application allows users to browse existing maps and contribute their own.</p>
|
||||
|
||||
<h4 id="browsing-data">Browsing Layers</h4>
|
||||
<p>The <a href="/layers">Layers</a> tab allows you to browse data uploaded to this GeoNode.</p>
|
||||
<p>All data can be downloaded in a variety of formats, for use in other applications.</p>
|
||||
|
||||
<h4 id="developer-access">Developer Access</h4>
|
||||
<p>The <a href="/developer"> Developer</a> page is the place for developers to get started building applications against the GeoNode. It includes instructions on using the web services, links to the source code of the GeoNode, and information about the open source projects used to create it.</p>
|
||||
|
||||
<h4 id="browsing-maps">Browsing Maps</h4>
|
||||
<p>The GeoNode allows users to create and share maps with one another.</p>
|
||||
<p>The <a href="/maps">Maps</a> tab is a gateway to map exploration on GeoNode. From here you can <strong>search for a map</strong> or <strong>create a map</strong>, which will open the <a href="/maps/new">Map Composer</a>.</p>
|
||||
<h5>Google Earth Mode</h5>
|
||||
<p>Any map viewed in the interactive map editor can be seen in 3D mode with the Google Earth plugin. To switch to 3D mode select the Google Earth globe logo, the rightmost button on top toolbar. If you do not have the Google Earth plugin installed you will be prompted to install it.</p>
|
||||
|
||||
<h4 id="creating-a-map">Creating a Map</h4>
|
||||
<p>To create a new map go to the <a href="/maps">Contributed Maps</a> tab and click the <a href="/maps/new">create your own map</a> link.</p>
|
||||
<p>This will take you to the <a href="/maps/new">Map Composer</a> with a base layer loaded.</p>
|
||||
<p>To add data layers from the GeoNode click on the green plus button located below the layers tab on the left hand side of the screen. This will open a dialog listing all the layers available on the GeoNode.</p>
|
||||
<p>To add layers to your map select them and hit the <strong>Add Layers</strong> button. When finished you may hit <strong>Done</strong> to close the dialog and go back to the map.</p>
|
||||
|
||||
<h5>Reordering and Removing Layers</h5>
|
||||
<p>Change the display order of the layers listed in the data tab by simply dragging and dropping their names. The order in the map will be updated to reflect that. To turn a layer's visibility off simply uncheck it, and to remove it entirely select it and hit the red minus button.</p>
|
||||
|
||||
<h5>Saving your map</h5>
|
||||
<p>Once a suitable set of layers and zoom level has been found it's time to save it so others can see it. Click the Save button--the left most icon on the top toolbar, an image of a map with a disk--on the top menu and fill out the title and abstract of the map.</p>
|
||||
|
||||
<h4 id="exporting-a-map">Publishing a Map</h4>
|
||||
<p>Any map from the GeoNode can be embedded for use in another site or blog. To publish a map:</p>
|
||||
<ol>
|
||||
<li>Select the from the list of maps on the community or map page and then hit the 'Publish map' button.</li>
|
||||
<li>Choose your desired height and width for the widget in the wizard.</li>
|
||||
<li>Copy the HTML snippet provided in the wizard to any HTML page or iFrame-supporting blog post.</li>
|
||||
</ol>
|
||||
<p>This will put an interactive widget showing you map in your web page or blog post.</p>
|
||||
<p>Note that the <a href="/maps/new">Map Composer</a> also has a button to publish the map. Just be sure to save the map before publishing if there are changes that you want others to see. It publishes the last saved version, not the last viewed version.</p>
|
||||
|
||||
<h4 id="remixing-a-map">Remixing a Map</h4>
|
||||
<p>Any map available can serve as a starting point for a new map.</p>
|
||||
<ol>
|
||||
<li>Open the map in the Map Composer.</li>
|
||||
<li>Add and remove layers as you like.</li>
|
||||
<li>Pan and zoom to highlight the area of interest.</li>
|
||||
<li><strong>IMPORTANT:</strong> Update the title, abstract, contact info and tags to reflect the new map.</li>
|
||||
<li>Save the map.</li>
|
||||
</ol>
|
||||
<p>You will be able to see your new map when you search for it from the <a href="/maps">Maps</a> tab.</p>
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item"><h3>{% trans "Sections" %}</h3></li>
|
||||
<li class="list-group-item"><a href="#browsing-data">{% trans "Browsing Layers" %}</a></li>
|
||||
<li class="list-group-item"><a href="#developer-access">{% trans "Developer Access" %}</a></li>
|
||||
<li class="list-group-item"><a href="#browsing-maps">{% trans "Browsing Maps" %}</a></li>
|
||||
<li class="list-group-item"><a href="#creating-a-map">{% trans "Creating a Map" %}</a></li>
|
||||
<li class="list-group-item"><a href="#exporting-a-map">{% trans "Exporting a Map" %}</a></li>
|
||||
<li class="list-group-item"><a href="#remixing-a-map">{% trans "Remixing a Map" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,85 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% load base_tags %}
|
||||
|
||||
{% block title %} {% trans "Welcome!" %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}home{% endblock %}
|
||||
|
||||
{% block middle %}
|
||||
{{ block.super }}
|
||||
{% block hero %}
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<h1>{% trans "Welcome" %}</h1>
|
||||
<p>{% blocktrans %}GeoNode is an open source platform for sharing geospatial data and maps.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}If you have any questions about the software or service, join our <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users">mailing list</a>.{% endblocktrans %}</p>
|
||||
<span>{% trans 'Need help?' %} <a href="http://docs.geonode.org/en/latest/tutorials/users/quickstart/index.html">{% trans 'Getting Started' %}</a></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block mainbody %}
|
||||
<div class="container">
|
||||
<div class="row home-facets">
|
||||
{% with facet_type='home' %}
|
||||
{% facets as facets %}
|
||||
<div class="col-md-4">
|
||||
<p><a href="{% url "layer_browse" %}"><i class="fa fa-square-o fa-5x rotate-45"></i></a></p>
|
||||
<h2><a href="{% url "layer_browse" %}">{{ facets.layer|default:_("No") }} {% blocktrans count counter=facets.layer %}Layer{% plural %}Layers{% endblocktrans %}</a></h2>
|
||||
<p>{% trans "Click to search for geospatial data published by other users, organizations and public sources. Download data in standard formats." %}</p>
|
||||
{% if user.is_authenticated %}
|
||||
<p class="text-center"><a class="btn btn-default" href="{% url "layer_upload" %}" role="button">{% trans "Add layers" %} »</a></p>
|
||||
{% else %}
|
||||
<p class="text-center"><a class="btn btn-default" href="{% url "layer_browse" %}" role="button">{% trans "Explore layers" %} »</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p><a href="{% url "maps_browse" %}"><i class="fa fa-map-marker fa-5x"></i></a></p>
|
||||
<h2><a href="{% url "maps_browse" %}">{{ facets.map|default:_("No") }} {% blocktrans count counter=facets.map %}Map{% plural %}Maps{% endblocktrans %}</a></h2>
|
||||
<p>{% trans "Data is available for browsing, aggregating and styling to generate maps which can be shared publicly or restricted to specific users only." %}</p>
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="btn btn-default" href="{% url "new_map" %}" role="button">{% trans "Create maps" %} »</a></p>
|
||||
{% else %}
|
||||
<p><a class="btn btn-default" href="{% url "maps_browse" %}" role="button">{% trans "Explore maps" %} »</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p><a href="{% url "profile_browse" %}"><i class="fa fa-user fa-5x"></i></a></p>
|
||||
<h2><a href="{% url "profile_browse" %}">{{ facets.user|default:_("No") }} {% blocktrans count counter=facets.user %}User{% plural %}Users{% endblocktrans %}</a></h2>
|
||||
<p>{% trans "GeoNode allows registered users to easily upload geospatial data in several formats including shapefile and GeoTiff." %}</p>
|
||||
<p><a class="btn btn-default" href="{% url "profile_browse" %}" role="button">{% trans "See users" %} »</a></p>
|
||||
</div>
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
{% verbatim %}
|
||||
<div ng-app="featured">
|
||||
<div ng-repeat="item in featured">
|
||||
<!--{{ item.title }}-->
|
||||
</div>
|
||||
</div>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
{% if DEBUG_STATIC %}
|
||||
<script src="{{ STATIC_URL }}lib/js/angular.js"></script>
|
||||
{% endif %}
|
||||
<script type="text/javascript">
|
||||
FEATURED_URL = '{% url 'api_dispatch_list' api_name='api' resource_name='featured' %}'
|
||||
'use strict';
|
||||
(function(){
|
||||
var module = angular.module('featured', []);
|
||||
module.run(function($http, $rootScope){
|
||||
$http.get(FEATURED_URL).success(function(data){
|
||||
$rootScope.featured = data.objects;
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
{% endblock extra_script %}
|
||||
@@ -1,242 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
if (window.GeoExt && GeoExt.Lang) {
|
||||
GeoExt.Lang.set("{{ LANGUAGE_CODE }}");
|
||||
}
|
||||
|
||||
if (window.GeoNode && GeoNode.plugins && GeoNode.plugins.Save) {
|
||||
Ext.apply(GeoNode.plugins.Save.prototype, {
|
||||
metadataFormCancelText : gettext("Cancel"),
|
||||
metadataFormSaveAsCopyText : gettext("Save as Copy"),
|
||||
metaDataHeader: gettext("About this Map"),
|
||||
metaDataMapAbstract: gettext("Abstract"),
|
||||
metadataFormSaveText : gettext("Save"),
|
||||
metaDataMapTitle: gettext("Title")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoNode && GeoNode.plugins && GeoNode.plugins.XHRTrouble) {
|
||||
Ext.apply(GeoNode.plugins.XHRTrouble.prototype, {
|
||||
connErrorTitleText: gettext("Connection Error"),
|
||||
connErrorText: gettext("The server returned an error"),
|
||||
connErrorDetailsText: gettext("Details...")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoExplorer) {
|
||||
Ext.apply(GeoExplorer.prototype, {
|
||||
addLayersButtonText: gettext("Add Layers"),
|
||||
areaActionText: gettext("Area"),
|
||||
backgroundContainerText: gettext("Background"),
|
||||
capGridAddLayersText: gettext("Add Layers"),
|
||||
capGridDoneText: gettext("Done"),
|
||||
capGridText: gettext("Available Layers"),
|
||||
exportDialogMessage: '<p>Your map is ready to be published to the web! </p>' + '<p> Simply copy the following HTML to embed the map in your website: </p>',
|
||||
heightLabel: gettext("Height"),
|
||||
infoButtonText: gettext("Get Feature Info"),
|
||||
largeSizeLabel: gettext("Large"),
|
||||
layerAdditionLabel: gettext("or add a new server."),
|
||||
layerContainerText: gettext("Map Layers"),
|
||||
layerSelectionLabel: gettext("View available data from:"),
|
||||
layersContainerText: gettext("Data"),
|
||||
layersPanelText: gettext("Layers"),
|
||||
legendPanelText: gettext("Legend"),
|
||||
lengthActionText: gettext("Length"),
|
||||
loadingMapMessage: gettext("Loading Map..."),
|
||||
mapSizeLabel: gettext("Map Size"),
|
||||
measureSplitText: gettext("Measure"),
|
||||
metaDataMapContact: gettext("Contact"),
|
||||
metaDataMapId: gettext("Permalink"),
|
||||
miniSizeLabel: gettext("Mini"),
|
||||
navActionTipText: gettext("Pan Map"),
|
||||
navNextAction: gettext("Zoom to Next Extent"),
|
||||
navPreviousActionText: gettext("Zoom to Previous Extent"),
|
||||
noPermalinkText: gettext("This map has not yet been saved."),
|
||||
permalinkLabel: gettext("Permalink"),
|
||||
premiumSizeLabel: gettext("Premium"),
|
||||
printTipText: gettext("Print Map"),
|
||||
printWindowTitleText: gettext("Print Preview"),
|
||||
propertiesText: gettext("Properties"),
|
||||
publishActionText: gettext("Publish Map"),
|
||||
removeLayerActionText: gettext("Remove Layer"),
|
||||
removeLayerActionTipText: gettext("Remove Layer"),
|
||||
saveFailMessage: gettext("Sorry, your map could not be saved."),
|
||||
saveFailTitle: gettext("Error While Saving"),
|
||||
saveMapText: gettext("Save Map"),
|
||||
saveNotAuthorizedMessage: gettext("You must be logged in to save this map."),
|
||||
smallSizeLabel: gettext("Small"),
|
||||
sourceLoadFailureMessage: gettext("Error contacting server.\n Please check the url and try again."),
|
||||
layerPropertiesText: gettext('Layer Properties'),
|
||||
layerPropertiesTipText: gettext('Change layer format and style'),
|
||||
layerStylesText: gettext('Edit Styles'),
|
||||
layerStylesTipText: gettext('Edit layer styles'),
|
||||
switchTo3DActionText: gettext("Switch to Google Earth 3D Viewer"),
|
||||
unknownMapMessage: gettext("The map that you are trying to load does not exist. Creating a new map instead."),
|
||||
unknownMapTitle: gettext("Unknown Map"),
|
||||
widthLabel: gettext("Width"),
|
||||
zoomInActionText: gettext("Zoom In"),
|
||||
zoomOutActionText: gettext("Zoom Out"),
|
||||
zoomSelectorText: gettext("Zoom level"),
|
||||
zoomSliderTipText: gettext("Zoom Level"),
|
||||
zoomToLayerExtentText: gettext("Zoom to Layer Extent"),
|
||||
zoomVisibleButtonText: gettext("Zoom to Visible Extent")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.Embed) {
|
||||
Ext.apply(Embed.prototype, {
|
||||
zoomLevelText: gettext("Zoom Level {zoom}")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoNode && GeoNode.MapGrid) {
|
||||
Ext.apply(GeoNode.MapGrid.prototype, {
|
||||
createMapText : gettext("Create Map"),
|
||||
exportMapText: gettext("Export Map"),
|
||||
mapAbstractLabelText: gettext("Abstract"),
|
||||
mapContactLabelText: gettext("Contact"),
|
||||
mapGridText : gettext("Map"),
|
||||
mapLinkLabelText: gettext("View this Map"),
|
||||
mapTitleLabelText: gettext("Title"),
|
||||
openMapText : gettext("Open Map")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoExplorer && GeoExplorer.CapabilitiesGrid) {
|
||||
Ext.apply(GeoExplorer.CapabilitiesGrid.prototype, {
|
||||
nameHeaderText : gettext("Name"),
|
||||
queryableHeaderText : gettext("Queryable"),
|
||||
titleHeaderText : gettext("Title")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoNode && GeoNode.ConfigManager) {
|
||||
Ext.apply(GeoNode.ConfigManager.prototype, {
|
||||
backgroundDisabledText : gettext("No background")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.gxp && gxp.EmbedMapDialog) {
|
||||
Ext.apply(gxp.EmbedMapDialog.prototype, {
|
||||
heightLabel: gettext("Height"),
|
||||
largeSizeLabel: gettext("Large"),
|
||||
mapSizeLabel: gettext("Map Size"),
|
||||
miniSizeLabel: gettext("Mini"),
|
||||
premiumSizeLabel: gettext("Premium"),
|
||||
publishActionText: gettext("Publish Map"),
|
||||
publishMessage: gettext('Your map is ready to be published to the web! Simply copy the following HTML to embed the map in your website:'),
|
||||
smallSizeLabel: gettext("Small"),
|
||||
widthLabel: gettext("Width")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (window.GeoExplorer && GeoExplorer.CapabilitiesRowExpander) {
|
||||
Ext.apply(GeoExplorer.CapabilitiesRowExpander.prototype, {
|
||||
abstractText: gettext("Abstract:"),
|
||||
attributionEmptyText: gettext("No attribution information is provided for this layer."),
|
||||
attributionText: gettext("Provided by:"),
|
||||
downloadText : gettext("Download:"),
|
||||
keywordEmptyText: gettext("No keywords are listed for this layer."),
|
||||
keywordText: gettext("Keywords:"),
|
||||
metadataEmptyText: gettext("No metadata URLs are defined for this layer."),
|
||||
metadataText: gettext("Metadata Links:")
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoExt && GeoExt.ux && GeoExt.ux.PrintPreview) {
|
||||
Ext.apply(GeoExt.ux.PrintPreview.prototype, {
|
||||
paperSizeText: gettext("Paper size:"),
|
||||
resolutionText: gettext("Resolution:"),
|
||||
printText: gettext("Print"),
|
||||
emptyTitleText: gettext("Enter map title here."),
|
||||
includeLegendText: gettext("Include legend?"),
|
||||
emptyCommentText: gettext("Enter comments here."),
|
||||
creatingPdfText: gettext("Creating PDF...")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (window.GeoNode && GeoNode.MapSearchTable) {
|
||||
Ext.apply(GeoNode.MapSearchTable.prototype, {
|
||||
titleHeaderText: gettext('Title'),
|
||||
contactHeaderText: gettext("Contact"),
|
||||
lastModifiedHeaderText: gettext("Last Modified"),
|
||||
mapAbstractLabelText: gettext("Abstract"),
|
||||
mapLinkLabelText: gettext("View this Map"),
|
||||
previousText: gettext('Prev'),
|
||||
nextText: gettext('Next'),
|
||||
ofText: gettext('of'),
|
||||
noResultsText: gettext('Your search did not match any items.'),
|
||||
searchLabelText: gettext('Search Maps'),
|
||||
searchButtonText: gettext('Search'),
|
||||
showingText: gettext('Showing'),
|
||||
loadingText: gettext('Loading'),
|
||||
permalinkText: gettext('permalink')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (window.GeoNode && GeoNode.SearchTable) {
|
||||
Ext.apply(GeoNode.SearchTable.prototype, {
|
||||
selectHeaderText: gettext('Select'),
|
||||
nameHeaderText: gettext('Name'),
|
||||
titleHeaderText: gettext('Title'),
|
||||
selectText: gettext('Select:'),
|
||||
selectAllText: gettext('All'),
|
||||
selectNoneText: gettext('None'),
|
||||
previousText: gettext('Prev'),
|
||||
nextText: gettext('Next'),
|
||||
ofText: gettext('of'),
|
||||
noResultsText: gettext('Your search did not match any items.'),
|
||||
searchButtonText: gettext('Search'),
|
||||
showingText: gettext('Showing'),
|
||||
loadingText: gettext("Loading..."),
|
||||
permalinkText: gettext('permalink'),
|
||||
unviewableTooltip: gettext('You do not have permission to view this data'),
|
||||
remoteTooltip: gettext('This data is stored on a remote server')
|
||||
});
|
||||
}
|
||||
if (window.GeoNode && GeoNode.SearchTableRowExpander) {
|
||||
Ext.apply(GeoNode.SearchTableRowExpander.prototype, {
|
||||
abstractText: gettext("Abstract:"),
|
||||
abstractEmptyText: gettext('No abstract is provided for this layer.'),
|
||||
attributionEmptyText: gettext("No attribution information is provided for this layer."),
|
||||
attributionText: gettext("Provided by:"),
|
||||
downloadText : gettext("Download:"),
|
||||
downloadEmptyText: gettext("No download URLs are definied for this layer."),
|
||||
keywordEmptyText: gettext("No keywords are listed for this layer."),
|
||||
keywordText: gettext("Keywords:"),
|
||||
metadataEmptyText: gettext("No metadata URLs are defined for this layer."),
|
||||
metadataText: gettext("Metadata Links:"),
|
||||
dataDetailText: 'Click here for more information about this layer.'
|
||||
});
|
||||
}
|
||||
if (window.GeoNode && GeoNode.DataCart) {
|
||||
Ext.apply(GeoNode.DataCart.prototype, {
|
||||
selectedLayersText: gettext('Selected Layers'),
|
||||
emptySelectionText: gettext('No Layers Selected'),
|
||||
titleText: gettext('Title'),
|
||||
clearSelectedButtonText: gettext('Clear Selected'),
|
||||
clearAllButtonText: gettext('Clear All')
|
||||
});
|
||||
}
|
||||
|
||||
if (window.GeoNode && GeoNode.DataCartOps) {
|
||||
Ext.apply(GeoNode.DataCartOps.prototype, {
|
||||
failureText: gettext('Operation Failed'),
|
||||
noLayersText: gettext('No layers are currently selected.')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (window.GeoNode && GeoNode.BatchDownloadWidget) {
|
||||
Ext.apply(GeoNode.BatchDownloadWidget.prototype, {
|
||||
downloadingText: gettext('Downloading...'),
|
||||
cancelText: gettext('Cancel'),
|
||||
windowMessageText: gettext('Please wait')
|
||||
});
|
||||
}
|
||||
|
||||
{% block extra_lang %}
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %} {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}layers{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock body_outer %}
|
||||
@@ -1,22 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans "Home" %}</a> › {% trans "Change point of contact" %}</div>{% endblock %}
|
||||
|
||||
{% block title %}{% trans 'Change point of contact' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans "Assign a new point of contact to the layers below:" %}</h3>
|
||||
{% for layer in layers %}
|
||||
<li>{{ layer }}</li>
|
||||
{% endfor %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<p><input type="submit" value="{% trans "Submit" %}" /></p>
|
||||
</form>
|
||||
<ul>
|
||||
|
||||
{% endblock %}
|
||||
</ul>
|
||||
@@ -282,8 +282,8 @@
|
||||
{% if resource.storeType != "remoteStore" %}
|
||||
<li class="list-group-item">
|
||||
{% if links or links_download %}
|
||||
<button class="btn btn-primary btn-md btn-block" data-toggle="modal" data-target="#download-layer">{% trans "Download Layer" %}</button>
|
||||
{% else %}
|
||||
<button class="btn btn-primary btn-md btn-block" data-toggle="modal" data-target="#download-layer">{% trans "Download Layer" %}</button>
|
||||
{% else %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<button class="btn btn-primary btn-md btn-block" id="request-download">{% trans "Request Download" %}</button>
|
||||
{% endif %}
|
||||
@@ -344,6 +344,12 @@
|
||||
{% get_obj_perms request.user for resource.layer as "layer_perms" %}
|
||||
{% endif %}
|
||||
|
||||
<li class="list-group-item">
|
||||
<a href="{% url "layer_metadata_detail" resource.typename %}">
|
||||
<button class="btn btn-primary btn-md btn-block">{% trans "Metadata Detail" %}</button>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if "change_resourcebase_metadata" in perms_list or "change_resourcebase" in perms_list or "delete_resourcebase" in perms_list or "change_layer_style" in layer_perms %}
|
||||
<li class="list-group-item">
|
||||
<button class="btn btn-primary btn-md btn-block" data-toggle="modal" data-target="#edit-layer">{% trans "Edit Layer" %}</button>
|
||||
@@ -488,6 +494,7 @@
|
||||
</li>
|
||||
|
||||
<!-- Charts section -->
|
||||
{% if resource.service_type != "WCS" %}
|
||||
<li class="list-group-item">
|
||||
<h4>{% trans "Charts using this layer" %}</h4>
|
||||
{% if resource.maps %}
|
||||
@@ -505,75 +512,74 @@
|
||||
<li class="list-group-item" id="create-chart">
|
||||
<h4>{% trans "Create a chart using this layer" %}</h4>
|
||||
<p>{% trans "Click the button below to generate a new chart based on this layer, choosing a quantity and a category field." %}</p>
|
||||
<button class="btn btn-primary btn-md btn-block" data-toggle="collapse" data-target="#form" onclick="updateLinkAndTitle();">Create a chart</button>
|
||||
<div id="form" class="collapse">
|
||||
<form name="f" method="post" class="form-horizontal" onchange="updateLinkAndTitle();" action="/chart/add/{{ resource.id }}/">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<input id="id_layer" name="layer" value="{{ resource.id }}" type="hidden">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_category">Category:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_category" name="category" >
|
||||
{% for attribute in resource.attributes %}
|
||||
<option value={{ attribute.attribute }}>{{ attribute.attribute }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_quantity">Quantity:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_quantity" name="quantity">
|
||||
{% for attribute in resource.attributes %}
|
||||
{% if 'gml:' not in attribute.attribute_type and 'string' not in attribute.attribute_type%}
|
||||
<option value={{ attribute.attribute }}>{{ attribute.attribute }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_type">Type:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_type" name="type">
|
||||
<option value="0" selected="selected">Bar chart</option>
|
||||
<option value="1">Pie chart</option>
|
||||
<option value="2">Donut chart</option>
|
||||
<option value="3">Line chart</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_aggr_type">Aggregation:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_aggr_type" name="aggr_type">
|
||||
<option value="0">Sum</option>
|
||||
<option value="1">Mean</option>
|
||||
<option value="2">Category count</option>
|
||||
<option value="3">Max</option>
|
||||
<option value="4">Min</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_title">Title:</label>
|
||||
<div class="col-md-8">
|
||||
<input id="id_title" maxlength="128" name="title" type="text" class="form-control" >
|
||||
<p style="font-size: small; margin:0">Suggested title:</p>
|
||||
<p id="title" style="font-size: small; margin:0">Testo di prova</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_abstract">Abstract:</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="form-control" cols="40" id="id_abstract" name="abstract" rows="5"></textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#chart_popup" onclick="get_chart_popup()">Preview</button>
|
||||
<button type="submit" class="btn btn-primary btn-block" onclick="title_eval();">Save</button>
|
||||
<button class="btn btn-primary btn-md btn-block" data-toggle="collapse" data-target="#form" onclick="updateLinkAndTitle();">Create a chart</button>
|
||||
<div id="form" class="collapse">
|
||||
<form name="f" method="post" class="form-horizontal" onchange="updateLinkAndTitle();" action="/chart/add/{{ resource.id }}/">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<input id="id_layer" name="layer" value="{{ resource.id }}" type="hidden">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_category">Category:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_category" name="category" >
|
||||
{% for attribute in resource.attributes %}
|
||||
<option value={{ attribute.attribute }}>{{ attribute.attribute }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_quantity">Quantity:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_quantity" name="quantity">
|
||||
{% for attribute in resource.attributes %}
|
||||
{% if 'gml:' not in attribute.attribute_type and 'string' not in attribute.attribute_type%}
|
||||
<option value={{ attribute.attribute }}>{{ attribute.attribute }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_type">Type:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_type" name="type">
|
||||
<option value="0" selected="selected">Bar chart</option>
|
||||
<option value="1">Pie chart</option>
|
||||
<option value="2">Donut chart</option>
|
||||
<option value="3">Line chart</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_aggr_type">Aggregation:</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="id_aggr_type" name="aggr_type">
|
||||
<option value="0">Sum</option>
|
||||
<option value="1">Mean</option>
|
||||
<option value="2">Category count</option>
|
||||
<option value="3">Max</option>
|
||||
<option value="4">Min</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_title">Title:</label>
|
||||
<div class="col-md-8">
|
||||
<input id="id_title" maxlength="128" name="title" type="text" class="form-control" >
|
||||
<p style="font-size: small; margin:0">Suggested title:</p>
|
||||
<p id="title" style="font-size: small; margin:0">Testo di prova</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="id_abstract">Abstract:</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="form-control" cols="40" id="id_abstract" name="abstract" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#chart_popup" onclick="get_chart_popup()">Preview</button>
|
||||
<button type="submit" class="btn btn-primary btn-block" onclick="title_eval();">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
@@ -610,62 +616,60 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var typename = "{{ resource.typename }}";
|
||||
var lyr;
|
||||
var category;
|
||||
var quantity;
|
||||
var agg;
|
||||
var chart_type;
|
||||
var csv_url;
|
||||
var suggestedTitle = "";
|
||||
<script>
|
||||
var typename = "{{ resource.typename }}";
|
||||
var lyr;
|
||||
var category;
|
||||
var quantity;
|
||||
var agg;
|
||||
var chart_type;
|
||||
var csv_url;
|
||||
var suggestedTitle = "";
|
||||
|
||||
function update_link(){
|
||||
csv_url = '/table?lyrname=' + typename;
|
||||
category = document.f.category.value;
|
||||
csv_url = csv_url + '&category=' + category;
|
||||
quantity = document.f.quantity.value;
|
||||
csv_url = csv_url + '&quantity=' + quantity;
|
||||
agg = document.f.aggr_type.value;
|
||||
chart_type = document.f.type.value;
|
||||
return;
|
||||
}
|
||||
|
||||
function attachAbstract(){
|
||||
var abstractText = document.getElementById("id_abstract").value;
|
||||
document.getElementById('abstract').innerHTML = abstractText;
|
||||
}
|
||||
|
||||
|
||||
function update_link(){
|
||||
csv_url = '/table?lyrname=' + typename;
|
||||
category = document.f.category.value;
|
||||
csv_url = csv_url + '&category=' + category;
|
||||
quantity = document.f.quantity.value;
|
||||
csv_url = csv_url + '&quantity=' + quantity;
|
||||
agg = document.f.aggr_type.value;
|
||||
chart_type = document.f.type.value;
|
||||
return;
|
||||
}
|
||||
|
||||
function attachAbstract(){
|
||||
var abstractText = document.getElementById("id_abstract").value;
|
||||
document.getElementById('abstract').innerHTML = abstractText;
|
||||
}
|
||||
function chart_title(){
|
||||
if (agg == dict_title_agg[2]){
|
||||
suggestedTitle = dict_title_agg[agg] + " of elements for " + category;
|
||||
} else {
|
||||
var title = dict_title_agg[agg]
|
||||
suggestedTitle = title + " of " + quantity + " for " + category;
|
||||
}
|
||||
document.getElementById("title").innerHTML = suggestedTitle;
|
||||
return suggestedTitle;
|
||||
};
|
||||
|
||||
|
||||
function chart_title(){
|
||||
if (agg == dict_title_agg[2]){
|
||||
suggestedTitle = dict_title_agg[agg] + " of elements for " + category;
|
||||
} else {
|
||||
var title = dict_title_agg[agg]
|
||||
suggestedTitle = title + " of " + quantity + " for " + category;
|
||||
}
|
||||
document.getElementById("title").innerHTML = suggestedTitle;
|
||||
return suggestedTitle;
|
||||
};
|
||||
function title_eval(){
|
||||
if (document.getElementById("id_title").textLength == 0){
|
||||
document.getElementById("id_title").value = suggestedTitle;
|
||||
}
|
||||
}
|
||||
|
||||
function updateLinkAndTitle(){
|
||||
update_link();
|
||||
chart_title();
|
||||
attachAbstract();
|
||||
}
|
||||
|
||||
function title_eval(){
|
||||
if (document.getElementById("id_title").textLength == 0){
|
||||
document.getElementById("id_title").value = suggestedTitle;
|
||||
}
|
||||
}
|
||||
|
||||
function updateLinkAndTitle(){
|
||||
update_link();
|
||||
chart_title();
|
||||
attachAbstract();
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if documents.count > 0 %}
|
||||
<li class="list-group-item">
|
||||
@@ -749,10 +753,6 @@ function updateLinkAndTitle(){
|
||||
{% include 'request_download.html' %}
|
||||
{% include 'layers/download_clip.html' %}
|
||||
<script type="text/javascript">
|
||||
|
||||
var layerMap = layerMap || null;
|
||||
var editableLayers = editableLayers || null;
|
||||
|
||||
$("#comment_submit_btn").click(function(event) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
{% include "geonode/ext_header.html" %}
|
||||
{% include "geonode/app_header.html" %}
|
||||
{% include "geonode/geo_header.html" %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/utils/thumbnail.js"></script>
|
||||
<script type="text/javascript">
|
||||
{% autoescape off %}
|
||||
var app;
|
||||
Ext.onReady(function() {
|
||||
GeoExt.Lang.set("{{ LANGUAGE_CODE }}");
|
||||
var config = {
|
||||
tools: [{
|
||||
ptype: "gxp_wmsgetfeatureinfo",
|
||||
format: "grid",
|
||||
actionTarget: "main.tbar",
|
||||
outputConfig: {width: 400, height: 200, panIn: false}
|
||||
}],
|
||||
{% if PROXY_URL %}
|
||||
proxy: '{{ PROXY_URL }}',
|
||||
{% endif %}
|
||||
{% if 'access_token' in request.session %}
|
||||
localGeoServerBaseUrl: "{{GEOSERVER_BASE_URL}}?access_token={{request.session.access_token}}",
|
||||
{% else %}
|
||||
localGeoServerBaseUrl: "{{GEOSERVER_BASE_URL}}",
|
||||
{% endif %}
|
||||
authorizedRoles: "{{ user.is_authenticated|yesno:"ROLE_ADMINISTRATOR,ROLE_ANONYMOUS" }}",
|
||||
|
||||
/* The URL to a REST map configuration service. This service
|
||||
* provides listing and, with an authenticated user, saving of
|
||||
* maps on the server for sharing and editing.
|
||||
*/
|
||||
rest: "/maps/",
|
||||
{% if MAPFISH_PRINT_ENABLED %}
|
||||
printService: "{{GEOSERVER_BASE_URL}}pdf/",
|
||||
{% else %}
|
||||
printService: "",
|
||||
{% endif %}
|
||||
|
||||
portalConfig: {
|
||||
renderTo: "preview_map",
|
||||
height: 600
|
||||
},
|
||||
|
||||
listeners: {
|
||||
"ready": function() {
|
||||
var map = app.mapPanel.map;
|
||||
var layer = app.map.layers.slice(-1)[0];
|
||||
|
||||
// FIXME(Ariel): Zoom to extent until #1795 is fixed.
|
||||
//map.zoomToExtent(layer.maxExtent, false)
|
||||
|
||||
var bbox = layer.bbox;
|
||||
if (bbox != undefined)
|
||||
{
|
||||
if (!Array.isArray(bbox) && Object.keys(layer.srs) in bbox) {
|
||||
bbox = bbox[Object.keys(layer.srs)].bbox;
|
||||
}
|
||||
|
||||
var extent = OpenLayers.Bounds.fromArray(bbox);
|
||||
var zoomToData = function()
|
||||
{
|
||||
map.zoomToExtent(extent, false);
|
||||
app.mapPanel.center = map.center;
|
||||
app.mapPanel.zoom = map.zoom;
|
||||
map.events.unregister('changebaselayer', null, zoomToData);
|
||||
};
|
||||
map.events.register('changebaselayer',null,zoomToData);
|
||||
if(map.baseLayer){
|
||||
map.zoomToExtent(extent, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
"beforeunload": function() {
|
||||
if (modified) {
|
||||
styleEditor.show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
config = Ext.apply(config, {{ viewer|safe }});
|
||||
|
||||
//
|
||||
// Extrapolating the granules times
|
||||
//
|
||||
var is_mosaic = "{{resource.is_mosaic}}" == "True" ? true : false;
|
||||
if(is_mosaic){
|
||||
var resource_name = "{{resource.name}}";
|
||||
|
||||
var granules_features = {% if all_granules %} {{all_granules.features}} {% else %} [] {% endif %};
|
||||
|
||||
var time_list = [];
|
||||
for(var i=0; i<granules_features.length; i++){
|
||||
var feature = granules_features[i];
|
||||
|
||||
if(feature.properties.time){
|
||||
var date = new Date(feature.properties.time);
|
||||
var time = date.toISOString();
|
||||
|
||||
if(time){
|
||||
time_list.push(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Setting the time dimension accordingly to the granule time list
|
||||
//
|
||||
var layers = config.map.layers;
|
||||
for(var layer in layers){
|
||||
l = layers[layer];
|
||||
if(!l.background && l.name && l.name.indexOf(resource_name) != -1){
|
||||
l.dimensions = {
|
||||
time:{
|
||||
"name":"time",
|
||||
"units":"ISO8601",
|
||||
"unitsymbol":null,
|
||||
"nearestVal":false,
|
||||
"multipleVal":false,
|
||||
"current":false,
|
||||
"default":"current",
|
||||
"values": time_list // granule time list
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app = new GeoExplorer.Viewer(config);
|
||||
|
||||
for (var key in app.tools) {
|
||||
var tool = app.tools[key];
|
||||
if (tool.ptype == 'gxp_styler') {
|
||||
tool.rasterStyling = true;
|
||||
};
|
||||
};
|
||||
|
||||
// change style displayed in map
|
||||
Ext.get(Ext.DomQuery.select("input[@name='style']")).on("click", function(evt, elem) {
|
||||
app.selectedLayer.getLayer().mergeNewParams({
|
||||
"STYLES": elem.id,
|
||||
"_dc": Math.random()
|
||||
});
|
||||
});
|
||||
|
||||
Ext.get(Ext.DomQuery.select(".style-edit")).on("click", function(evt, elem) {
|
||||
for (var key in app.tools) {
|
||||
var tool = app.tools[key];
|
||||
if (tool.ptype == 'gxp_styler') {
|
||||
tool.actions[0].execute();
|
||||
};
|
||||
}
|
||||
});
|
||||
Ext.Ajax.on('requestcomplete', function(req, cippa, opts){
|
||||
if(opts.method == 'PUT'){
|
||||
$('#legend_icon').attr('src', $('#legend_icon').attr('src')+'&'+Math.random());
|
||||
}
|
||||
}, this);
|
||||
});
|
||||
|
||||
{% endautoescape %}
|
||||
</script>
|
||||
@@ -1,40 +0,0 @@
|
||||
{% extends "layers/layer_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ layer.typename }} — {{ block.super }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<a href="{% url "layer_browse" %}" class="btn btn-primary pull-right">{% trans "Explore Layers" %}</a>
|
||||
<h2 class="page-title">{% trans "Remove Mosaic Granules" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
{% blocktrans with layer.typename as layer_title %}
|
||||
Are you sure you want to remove Granule {{ granule_id }} of the Mosaic <a href="{{ layer.get_absolute_url }}">{{ layer_title }}</a>?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form action="{% url "layer_granule_remove" granule_id layer.service_typename %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ layer.service_typename }}" />
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="{% trans "Yes, I am sure" %}" class="btn btn-danger" />
|
||||
<a href="{{ layer.get_absolute_url }}" class="btn btn-default">{% trans "No, don't remove it" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% if layer.maps %}
|
||||
<div class="col-md-4">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">{% trans "This action affects the following maps:" %}</li>
|
||||
{% for map_layer in layer.maps %}
|
||||
<li><a href="{{ map_layer.map.get_absolute_url }}">{{ map_layer.map.title }}</a></li>
|
||||
{% empty %}
|
||||
<li>{% trans "No maps are using this layer" %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,79 +0,0 @@
|
||||
{% load leaflet_tags %}
|
||||
|
||||
{% leaflet_js %}
|
||||
{% leaflet_css %}
|
||||
|
||||
<style>
|
||||
.leaflet-container { /* all maps */
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function (event) {
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
|
||||
var OpenMapSurfer_Roads = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', {
|
||||
maxZoom: 20,
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
var base_maps = {
|
||||
"OpenMapSurfer_Roads": OpenMapSurfer_Roads,
|
||||
'OpenStreetMap': osm
|
||||
};
|
||||
|
||||
var overlay_layer = {};
|
||||
|
||||
var map = L.map('preview_map');
|
||||
map.addLayer(OpenMapSurfer_Roads);
|
||||
|
||||
{% if resource.bbox_string %}
|
||||
zoom_to_box(map, [{{ resource.bbox_string }}]);
|
||||
{% endif %}
|
||||
|
||||
{% if resource.get_tiles_url %}
|
||||
tile_layer = L.tileLayer("{{ resource.get_tiles_url|safe }}",
|
||||
{
|
||||
'opacity': 0.8
|
||||
});
|
||||
{% elif resource.ptype == "gxp_wmscsource" %}
|
||||
tile_layer = L.tileLayer.wms('{{ resource.ows_url|safe }}', {
|
||||
layers: '{{ resource.typename }}',
|
||||
format: 'image/png',
|
||||
transparent: true,
|
||||
'opacity': 0.8
|
||||
});
|
||||
{% elif resource.ptype == "gxp_arcrestsource" %}
|
||||
tile_layer = L.esri.dynamicMapLayer('{{ resource.ows_url|safe }}', {
|
||||
layers: '{{ resource.typename }}',
|
||||
format: 'png',
|
||||
transparent: true,
|
||||
'opacity': 0.8
|
||||
});
|
||||
|
||||
{% endif %}
|
||||
|
||||
if (tile_layer != null) {
|
||||
overlay_layer["{{ resource.title }}"] = tile_layer;
|
||||
map.addLayer(tile_layer);
|
||||
}
|
||||
layerControl = L.control.layers(
|
||||
base_maps, overlay_layer
|
||||
).addTo(map);
|
||||
|
||||
if (L.control.hasOwnProperty('fullscreen')) {
|
||||
L.control.fullscreen().addTo(map);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
function zoom_to_box(map, bbox) {
|
||||
var bounds = [
|
||||
[bbox[1], bbox[0]],
|
||||
[bbox[3], bbox[2]]
|
||||
];
|
||||
map.fitBounds(bounds);
|
||||
}
|
||||
</script>
|
||||
@@ -18,7 +18,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}layers{% endblock %}
|
||||
{% block body_class %}layers explore{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% with include_type_filter='true' %}
|
||||
@@ -34,6 +34,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
{{ block.super }}
|
||||
{% if GEONODE_SECURITY_ENABLED %}
|
||||
{% include "_permissions_form_js.html" %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{% extends "layers/layer_leaflet_map.html" %}
|
||||
@@ -1,133 +0,0 @@
|
||||
{% extends "layers/layer_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {% trans "Edit Metadata" %} | {{ layer.typename }}{% endblock %}
|
||||
{% block page-title %}{% trans "Edit Metadata" %}{% endblock %}
|
||||
|
||||
{% block body_class %}metadata{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="row">
|
||||
<a href="{% url "layer_browse" %}" class="btn btn-primary pull-right">{% trans "Explore Layers" %}</a>
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
{% blocktrans with layer.typename as layer_title %}
|
||||
Editing details for {{ layer_title }}
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form id="layer_metadata_update" class="form-horizontal" action="{% url "layer_metadata" layer.service_typename %}" method="POST">
|
||||
{% if layer.metadata_uploaded_preserve %}
|
||||
<p class="bg-warning">{% blocktrans %}Note: this layer's orginal metadata was populated and preserved by importing a metadata XML file.
|
||||
This metadata cannot be edited.{% endblocktrans %}</p>
|
||||
{% elif layer.metadata_uploaded %}
|
||||
<p class="bg-warning">{% blocktrans %}Note: this layer's orginal metadata was populated by importing a metadata XML file.
|
||||
GeoNode's metadata import supports a subset of ISO, FGDC, and Dublin Core metadata elements.
|
||||
Some of your original metadata may have been lost.{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if layer_form.errors or attribute_form.errors or category_form.errors or author_form.errors or poc.errors %}
|
||||
<p class="bg-danger">{% blocktrans %}Error updating metadata. Please check the following fields: {% endblocktrans %}</p>
|
||||
<ul class="bg-danger">
|
||||
{% if author_form.errors %}
|
||||
<li>{% trans "Metadata Author" %}</li>
|
||||
{{ author_form.errors }}
|
||||
{% endif %}
|
||||
{% if poc_form.errors %}
|
||||
<li>{% trans "Point of Contact" %}</li>
|
||||
{{ poc_form.errors }}
|
||||
{% endif %}
|
||||
{% for field in layer_form %}
|
||||
{% if field.errors %}
|
||||
<li>{{ field.label }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not attribute_form.is_valid %}
|
||||
<li>{% trans "Attributes" %}</li>
|
||||
{% for field in attribute_form %}
|
||||
{% if field.errors %}
|
||||
<li>{{ field.errors }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if category_form.errors %}
|
||||
<li>{{ category_form.errors.as_ul }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if not layer.metadata_uploaded_preserve %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% csrf_token %}
|
||||
<div class="col-md-6 form-controls">
|
||||
{{ layer_form|as_bootstrap }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label class="control-label required-field">{% trans "Category" %}</label>
|
||||
<fieldset id="category_form">
|
||||
{% autoescape off %}
|
||||
{% for choice in category_form.category_choice_field.field.choices %}
|
||||
<div class="radio col-md-6">
|
||||
<input type="radio" name="category_choice_field" value="{{ choice.0 }}"
|
||||
{% ifequal category_form.initial choice.0 %} checked="checked" {% endifequal %}>
|
||||
{{ choice.1 }}
|
||||
</input>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endautoescape %}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-md-12 grid-spacer">
|
||||
<h5>{% trans "Attributes" %}</h5>
|
||||
{{ attribute_form.management_form }}
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
<tr>
|
||||
<th>{% trans "Attribute" %}</th>
|
||||
<th>{% trans "Label" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
<th>{% trans "Display Order" %}</th>
|
||||
</tr>
|
||||
{% for form in attribute_form.forms %}
|
||||
{% if form.attribute %}
|
||||
<tr>
|
||||
<td><div style="display:none">{{form.id}}</div>{{form.attribute}}</td>
|
||||
<td>{{form.attribute_label}}</td>
|
||||
<td>{{form.description}}</td>
|
||||
<td>{{form.display_order}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<fieldset class="form-controls modal-forms modal hide fade" id="poc_form" >
|
||||
<h2>{% trans "Point of Contact" %}</h2>
|
||||
{{ poc_form|as_bootstrap }}
|
||||
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
||||
</fieldset>
|
||||
<fieldset class="form-controls modal-forms modal hide fade" id="metadata_form">
|
||||
<h2>{% trans "Metadata Provider" %}</h2>
|
||||
{{ author_form|as_bootstrap }}
|
||||
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
||||
</fieldset>
|
||||
|
||||
{% if not layer.metadata_uploaded_preserve %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
{% include 'metadata_form_js.html' %}
|
||||
{% endblock %}
|
||||
@@ -1 +0,0 @@
|
||||
{% extends "metadata_detail.html" %}
|
||||
@@ -1,69 +0,0 @@
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v3.17.1/build/ol.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
|
||||
document.getElementById('preview_map').setAttribute("style", "height:600px");
|
||||
|
||||
{% if resource.bbox_string %}
|
||||
var bbox = [{{ resource.bbox_string }}];
|
||||
{% else %}
|
||||
var bbox = null;
|
||||
{% endif %}
|
||||
|
||||
source = null;
|
||||
{% if resource.get_tiles_url %}
|
||||
source = new ol.source.XYZ({
|
||||
url: '{{ resource.get_tiles_url|safe }}'
|
||||
});
|
||||
|
||||
{% elif resource.ptype == 'gxp_wmscsource' %}
|
||||
source = new ol.source.TileWMS({
|
||||
url: '{{ resource.ows_url|safe }}',
|
||||
params: {'LAYERS': '{{ resource.typename }}'}
|
||||
});
|
||||
|
||||
{% elif resource.ptype == 'gxp_arcrestsource' %}
|
||||
source = new ol.source.TileArcGISRest({
|
||||
url: '{{ resource.ows_url|safe }}',
|
||||
params: {'LAYERS': '{{ resource.typename }}'}
|
||||
});
|
||||
|
||||
{% endif %}
|
||||
|
||||
var crs = '{{ crs }}'
|
||||
|
||||
if (crs != 'EPSG:4326') {
|
||||
crs = 'EPSG:3857';
|
||||
}
|
||||
if (source != null) {
|
||||
var layers = [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.OSM()
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
source: source
|
||||
})
|
||||
];
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: layers,
|
||||
target: 'preview_map',
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
zoom: 2,
|
||||
projection: crs
|
||||
})
|
||||
});
|
||||
|
||||
if (bbox != null) {
|
||||
if (crs != 'EPSG:4326') {
|
||||
bbox = ol.proj.transformExtent(bbox, 'EPSG:4326', 'EPSG:3857');
|
||||
}
|
||||
map.getView().fit(bbox, map.getSize());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,40 +0,0 @@
|
||||
{% extends "layers/layer_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ layer.typename }} — {{ block.super }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<a href="{% url "layer_browse" %}" class="btn btn-primary pull-right">{% trans "Explore Layers" %}</a>
|
||||
<h2 class="page-title">{% trans "Remove Layers" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
{% blocktrans with layer.typename as layer_title %}
|
||||
Are you sure you want to remove <a href="{{ layer.get_absolute_url }}">{{ layer_title }}</a>?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form action="{% url "layer_remove" layer.service_typename %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ layer.service_typename }}" />
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="{% trans "Yes, I am sure" %}" class="btn btn-danger" />
|
||||
<a href="{{ layer.get_absolute_url }}" class="btn btn-default">{% trans "No, don't remove it" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% if layer.maps %}
|
||||
<div class="col-md-4">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">{% trans "This action affects the following maps:" %}</li>
|
||||
{% for map_layer in layer.maps %}
|
||||
<li><a href="{{ map_layer.map.get_absolute_url }}">{{ map_layer.map.title }}</a></li>
|
||||
{% empty %}
|
||||
<li>{% trans "No maps are using this layer" %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,125 +0,0 @@
|
||||
{% extends "upload/layer_upload_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %} {% trans "Replace Layer" %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}data data-list upload{% endblock %}
|
||||
|
||||
{% block extra_head %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="col-md-8">
|
||||
<p class="lead">{% trans "Replace Layer: " %}<a href="{{ layer.get_absolute_url }}">{{ layer.title }}</a></p>
|
||||
|
||||
{% if incomplete %}
|
||||
<section class="widget" id="incomplete-download-list">
|
||||
<h3>{% trans "Incomplete Uploads" %}</h3>
|
||||
<p>{% trans "You have the following incomplete uploads" %}:</p>
|
||||
{% for u in incomplete %}
|
||||
<div class="clearfix uip" id="incomplete-{{ u.import_id }}">
|
||||
<div class="pull-left">{{ u.name }}, {% trans "last updated on" %} {{ u.date }}</div>
|
||||
<div class="upload_actions pull-right">
|
||||
<a class="btn btn-mini" href="#" id="resume-{{ u.import_id }}">{% trans "Resume" %}</a>
|
||||
<a class="btn btn-mini" href="#" id="delete-{{ u.import_id }}"><i class="fa fa-trash-o"></i> {% trans "Delete" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<div id="confirm-delete" class="hide alert alert-warn" style="padding:10px; margin: 10px 0;">
|
||||
{% trans "Are you sure you want to delete this upload?" %}
|
||||
<div style="margin: 5px 0">
|
||||
<a href="#y" class="btn btn-danger">{% trans "Delete" %}</a>
|
||||
<a href="#n" class="btn">{% trans "Cancel" %}</a>
|
||||
</div>
|
||||
<a href="#yy" style="font-weight:normal">{% trans "Delete, and don't ask me again." %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% block additional_info %}{% endblock %}
|
||||
|
||||
{% if errors %}
|
||||
<div id="errors">
|
||||
{% for error in errors %}
|
||||
<div>{{ error }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<section id="drop-zone">
|
||||
<h3><i class="fa fa-cloud-upload"></i><br />{% trans "Drop files here" %}</h3>
|
||||
</section>
|
||||
|
||||
<p>{% trans " or select them one by one:" %}</p>
|
||||
|
||||
<form id="file-uploader" method="post" enctype="multipart/form-data">
|
||||
<input class="btn" id="file-input" type="file" multiple>
|
||||
</form>
|
||||
|
||||
<section class="widget">
|
||||
<ul id="global-errors"></ul>
|
||||
<h4>{% trans "Files to be uploaded" %}</h4>
|
||||
<div id="file-queue"></div>
|
||||
</section>
|
||||
|
||||
<section class="charset">
|
||||
<p>{% trans "Select the charset or leave default" %}</p>
|
||||
<select id="charset">
|
||||
{% for charset in charsets %}
|
||||
{% if charset.0 == 'UTF-8' %}
|
||||
<option selected='selected' value={{ charset.0 }}>{{ charset.1 }}</option>
|
||||
{% else %}
|
||||
<option value={{ charset.0 }}>{{ charset.1 }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<a href="#" id="clear-button" class="btn btn-default">{% trans "Clear" %}</a>
|
||||
<a href="#" id="upload-button" class="btn btn-danger">{% trans "Replace Layer" %}</a>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
{% if GEONODE_SECURITY_ENABLED %}
|
||||
<div class="col-md-4">
|
||||
<h3>{% trans "Permissions" %}</h3>
|
||||
<form id="permission_form">
|
||||
{% include "_permissions.html" %}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
<script data-main="{% static 'geonode/js/upload/main' %}"
|
||||
src="{% static 'lib/js/require.js' %}">
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
{% autoescape off %}
|
||||
|
||||
csrf_token = "{{ csrf_token }}",
|
||||
form_target = "{% url "layer_replace" layer.service_typename %}",
|
||||
geogig_enabled = {{ GEOGIG_ENABLED|lower }},
|
||||
time_enabled = {{ TIME_ENABLED|lower }},
|
||||
mosaic_enabled = {{ MOSAIC_ENABLED|lower }},
|
||||
userLookup = "{% url "geonode.views.ajax_lookup" %}"
|
||||
|
||||
{% endautoescape %}
|
||||
|
||||
</script>
|
||||
{% with "none" as layer %}
|
||||
{% include "_permissions_form_js.html" %}
|
||||
{% endwith %}
|
||||
{% endblock extra_script %}
|
||||
@@ -1,89 +0,0 @@
|
||||
{% extends "layers/layer_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ layer.typename }} — {{ block.super }}{% endblock %}
|
||||
|
||||
{% block body_class %}layers{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
{% if error %}
|
||||
<div class="alert alert-error">{{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="page-header">
|
||||
<h2>{% trans "Manage Styles" %}</h2>
|
||||
</div>
|
||||
<h4>{% blocktrans with layer.typename as layer_title %}
|
||||
Manage Available Styles for <a href="/layers/{{ layer_title }}">{{ layer_title }}</a>
|
||||
{% endblocktrans %}</h4>
|
||||
<form action="{% url "layer_style_manage" layer.service_typename %}" method="POST">
|
||||
<div class="row grid-spacer">
|
||||
<fieldset>
|
||||
<div class="col-md-3">
|
||||
<h4>{% trans "Layer Default Style" %}</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select id='default_style' name='default_style' required='required'>
|
||||
{% for style in layer_styles %}
|
||||
{% if style = layer.default_style %}
|
||||
<option value="{{ style.0 }}" selected>{{ style.1 }}</option>
|
||||
{% else %}
|
||||
<option value="{{ style.0 }}">{{ style.1 }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row grid-spacer">
|
||||
<fieldset>
|
||||
<div class="col-md-3">
|
||||
<h4>{% trans "Available styles" %}</h4>
|
||||
<p>{% trans "Click on an available style in the upper box to assign it to this layer. Selected styles appear in the lower box." %}</p>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<select multiple="multiple" id="style-select" name="style-select">
|
||||
{% for style in gs_styles %}
|
||||
{% if style in layer_styles %}
|
||||
<option value='{{ style.0 }}' selected>{{ style.1 }}</option>
|
||||
{% else %}
|
||||
<option value='{{ style.0 }}'>{{ style.1 }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ layer.service_typename }}" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row grid-spacer">
|
||||
<div class="col-md-offset-3 col-md-6 form-actions">
|
||||
<input type="submit" value="{% trans "Update Available Styles" %}" class="btn btn-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
$('#style-select').multiSelect({
|
||||
afterSelect: function(values){
|
||||
$('#default_style').append($("<option/>", {
|
||||
value: values[0],
|
||||
text: values[0]
|
||||
}));
|
||||
},
|
||||
afterDeselect: function(values){
|
||||
$('#default_style option').each(function() {
|
||||
if ( $(this).val() == values[0] ) {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
|
||||
<ows:Identifier>gs:Aggregate</ows:Identifier>
|
||||
<wps:DataInputs>
|
||||
<wps:Input>
|
||||
<ows:Identifier>features</ows:Identifier>
|
||||
<wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST">
|
||||
<wps:Body>
|
||||
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:geonode="http://www.geonode.org/">
|
||||
<wfs:Query typeName="{{ layer_name }}"/>
|
||||
</wfs:GetFeature>
|
||||
</wps:Body>
|
||||
</wps:Reference>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>aggregationAttribute</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>{{ field }}</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Count</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Min</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Max</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Average</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Median</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>StdDev</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>function</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>Sum</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>singlePass</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>True</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
</wps:DataInputs>
|
||||
<!--
|
||||
<wps:ResponseForm>
|
||||
<wps:ResponseDocument lineage="true" storeExecuteResponse="true" status="true">
|
||||
<wps:Output>
|
||||
<ows:Identifier>result</ows:Identifier>
|
||||
</wps:Output>
|
||||
</wps:ResponseDocument>
|
||||
</wps:ResponseForm>
|
||||
-->
|
||||
<wps:ResponseForm>
|
||||
<wps:RawDataOutput mimeType="text/xml">
|
||||
<ows:Identifier>result</ows:Identifier>
|
||||
</wps:RawDataOutput>
|
||||
</wps:ResponseForm>
|
||||
</wps:Execute>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
|
||||
<ows:Identifier>gs:Unique</ows:Identifier>
|
||||
<wps:DataInputs>
|
||||
<wps:Input>
|
||||
<ows:Identifier>features</ows:Identifier>
|
||||
<wps:Reference mimeType="text/xml; subtype=wfs-collection/1.0" xlink:href="http://geoserver/wfs" method="POST">
|
||||
<wps:Body>
|
||||
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:geonode="http://www.geonode.org/">
|
||||
<wfs:Query typeName="{{ layer_name }}"/>
|
||||
</wfs:GetFeature>
|
||||
</wps:Body>
|
||||
</wps:Reference>
|
||||
</wps:Input>
|
||||
<wps:Input>
|
||||
<ows:Identifier>attribute</ows:Identifier>
|
||||
<wps:Data>
|
||||
<wps:LiteralData>{{ field }}</wps:LiteralData>
|
||||
</wps:Data>
|
||||
</wps:Input>
|
||||
</wps:DataInputs>
|
||||
<wps:ResponseForm>
|
||||
<wps:RawDataOutput mimeType="text/xml; subtype=wfs-collection/1.1">
|
||||
<ows:Identifier>result</ows:Identifier>
|
||||
</wps:RawDataOutput>
|
||||
</wps:ResponseForm>
|
||||
</wps:Execute>
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}{% block title_sub %}{% trans "Explore Maps" %}{% endblock %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}maps{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock %}
|
||||
@@ -1,32 +0,0 @@
|
||||
{% extends "maps/map_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block body_class %}maps explore{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<a href="{% url "new_map" %}" class="btn btn-primary pull-right">{% trans "Create a New Map" %}</a>
|
||||
<h2>{% trans "Explore Maps" %}</h2>
|
||||
</div>
|
||||
{% include "search/_search_content.html" %}
|
||||
{% include "_bulk_permissions_form.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
{% if GEONODE_SECURITY_ENABLED %}
|
||||
{% include "_permissions_form_js.html" %}
|
||||
{% endif %}
|
||||
<script type="text/javascript">
|
||||
{% if HAYSTACK_SEARCH %}
|
||||
SEARCH_URL = '{% url 'api_get_search' api_name='api' resource_name='base' %}?type__in=map'
|
||||
{% else %}
|
||||
SEARCH_URL = '{% url 'api_dispatch_list' api_name='api' resource_name='maps' %}';
|
||||
{% endif %}
|
||||
FILTER_TYPE = 'map';
|
||||
</script>
|
||||
{% with include_spatial='true' %}
|
||||
{% include 'search/search_scripts.html' %}
|
||||
{% endwith %}
|
||||
{% endblock extra_script %}
|
||||
@@ -1,569 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load bootstrap_tags %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "GeoExplorer" %} - {{ block.super }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block head %}
|
||||
{{ block.super }}
|
||||
{% endblock head %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css"/>
|
||||
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" type="text/css"
|
||||
media="all"/>
|
||||
<link rel="stylesheet"
|
||||
href="https://cdn.rawgit.com/elesdoar/leaflet-control-orderlayers/master/dist/css/leaflet.control.orderlayers.min.css"
|
||||
type="text/css"/>
|
||||
<link rel="stylesheet" href="{% static 'lib/css/L.Control.Pan.css' %}"/>
|
||||
<link href="{{ STATIC_URL }}geonode/css/map_leaflet.css" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
html, body, #wrap {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#layer-list li {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
label {
|
||||
padding-bottom: 1%;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock extra_head %}
|
||||
|
||||
{% block body %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-3 pad0">
|
||||
<div class="options-panel newmap">
|
||||
<div class="form-group">
|
||||
<label for="add_layer_select">Available layers</label>
|
||||
<select class="form-control" id="add_layer_select">
|
||||
{% for layer in layers %}
|
||||
<option value="{{ layer.typename }}"
|
||||
id="option_{{ layer.typename }}">{{ layer.title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input id="add_layer_button" type="submit" class="btn btn-info" value="Add Layer">
|
||||
</div>
|
||||
<h4>Map layers</h4>
|
||||
<div>
|
||||
<ul id="layer-list">
|
||||
</ul>
|
||||
</div>
|
||||
<h4>Background layers</h4>
|
||||
<div>
|
||||
<ul id="background-layer-list">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="btn btn-info" data-toggle="modal" data-target="#save-map-modal">Save</button>
|
||||
{# <button class="btn btn-info">Load</button>#}
|
||||
{# <button class="btn btn-info">Publish</button>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 pad0">
|
||||
<div id="map" style="position:relative; ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="save-map-modal" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Save Map</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" id="save-map-form" action="{% url 'new_map_json' %}" method="post">
|
||||
<div class="form-group">
|
||||
<label for="map-title-input">Title:</label>
|
||||
<input name="map-title" type="text" class="form-control" id="map-title-input"
|
||||
placeholder="Enter map title">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="map-abstract-input">Abstract:</label>
|
||||
<textarea name="map-abstract" class="form-control" rows="5" id="map-abstract-input"
|
||||
placeholder="Enter map abstract"></textarea>
|
||||
</div>
|
||||
<div class="alert alert-danger" id="error-message-modal" hidden>
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
<span id="error-message-content"></span>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Save</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
{% endblock footer %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"
|
||||
type="text/javascript"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/Sortable/1.4.2/Sortable.min.js"></script>
|
||||
<script src="https://cdn.rawgit.com/elesdoar/leaflet-control-orderlayers/master/dist/leaflet.control.orderlayers.min.js"></script>
|
||||
<script src="https://cdn.rawgit.com/elesdoar/leaflet-control-orderlayers/master/dist/leaflet.control.orderlayers.min.js"></script>
|
||||
|
||||
<script src="{% static 'lib/js/L.Control.Pan.js' %}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery.fn.extend({
|
||||
propAttr: $.fn.prop || $.fn.attr
|
||||
});
|
||||
var map = $("#map");
|
||||
var active_background_layer;
|
||||
|
||||
var all_layers = {};
|
||||
var all_layers_list = [];
|
||||
|
||||
// Define some default base layers
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
|
||||
var OpenMapSurfer_Roads = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', {
|
||||
maxZoom: 20,
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
{% if create %}
|
||||
all_layers = {
|
||||
'OpenMapSurfer_Roads': {
|
||||
'title': 'OpenMapSurfer Roads',
|
||||
'name': 'OpenMapSurfer_Roads',
|
||||
'url': OpenMapSurfer_Roads._url,
|
||||
'layer': OpenMapSurfer_Roads,
|
||||
'visibility': true,
|
||||
'group': 'background',
|
||||
'zIndex': 0
|
||||
},
|
||||
'osm': {
|
||||
'title': 'OpenStreetMap',
|
||||
'name': 'osm',
|
||||
'url': osm._url,
|
||||
'layer': osm,
|
||||
'visibility': false,
|
||||
'group': 'background',
|
||||
'zIndex': 1
|
||||
}
|
||||
};
|
||||
all_layers_list.push('OpenMapSurfer_Roads');
|
||||
all_layers_list.push('osm');
|
||||
|
||||
active_background_layer = OpenMapSurfer_Roads;
|
||||
{% else %}
|
||||
all_layers = {};
|
||||
all_layers_list = [];
|
||||
{% endif %}
|
||||
|
||||
var w_height = $(window).height();
|
||||
var map_height = w_height - $('nav').height();
|
||||
map.css("height", map_height);
|
||||
|
||||
function remove(id) {
|
||||
return (elem = document.getElementById(id)).parentNode.removeChild(elem);
|
||||
}
|
||||
|
||||
function zoom_to_box(map, bbox) {
|
||||
var bounds = [
|
||||
[bbox[1], bbox[0]],
|
||||
[bbox[3], bbox[2]]
|
||||
];
|
||||
map.fitBounds(bounds);
|
||||
}
|
||||
|
||||
function check_box_layer_clicked(check_box) {
|
||||
if (check_box.checked) {
|
||||
map.addLayer(all_layers[check_box.value].layer);
|
||||
all_layers[check_box.value].visibility = true;
|
||||
} else {
|
||||
if (map.hasLayer(all_layers[check_box.value].layer)) {
|
||||
map.removeLayer(all_layers[check_box.value].layer);
|
||||
all_layers[check_box.value].visibility = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function delete_layer_clicked(button) {
|
||||
// Remove layer from the map
|
||||
if (map.hasLayer(all_layers[button.value].layer)) {
|
||||
map.removeLayer(all_layers[button.value].layer);
|
||||
}
|
||||
// Remove layer from the array
|
||||
delete all_layers[button.value];
|
||||
// Remove layer from map layer list
|
||||
remove("li_" + button.value);
|
||||
// Remove from list overlay layers
|
||||
remove_from_list(all_layers, button.value);
|
||||
|
||||
// Show from available layer
|
||||
document.getElementById("option_" + button.value).style.display = 'block';
|
||||
}
|
||||
|
||||
function remove_from_list(list, item) {
|
||||
var item_index = list.indexOf(item);
|
||||
if (item_index > -1) {
|
||||
list.splice(item_index, 1)
|
||||
}
|
||||
}
|
||||
|
||||
function add_layer(layer_typename, visibility, layer_order) {
|
||||
visibility = typeof visibility !== 'undefined' ? visibility : true;
|
||||
if (layer_typename in all_layers) {
|
||||
return
|
||||
}
|
||||
if (layer_typename in all_layers) {
|
||||
return
|
||||
}
|
||||
if (!layer_typename) {
|
||||
return
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/layers/' + layer_typename + '/get',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: function (json) {
|
||||
var layer_url = json['url'];
|
||||
var layer_title = json['title'];
|
||||
|
||||
// Add layer to leaflet
|
||||
var tile_layer = L.tileLayer(layer_url);
|
||||
if (tile_layer != null) {
|
||||
// Set view to new added layer
|
||||
zoom_to_box(map, [
|
||||
json['bbox_x0'],
|
||||
json['bbox_y0'],
|
||||
json['bbox_x1'],
|
||||
json['bbox_y1']
|
||||
]);
|
||||
|
||||
// Add to list layer
|
||||
if (visibility) {
|
||||
// Add the layer
|
||||
map.addLayer(tile_layer);
|
||||
$("#layer-list").prepend(
|
||||
"<li id='li_" + layer_typename + "'>" +
|
||||
"<input type='checkbox' onclick='check_box_layer_clicked(this);' name='show_layer' value='" + layer_typename + "' checked>" +
|
||||
layer_title +
|
||||
"<button type='button' onclick='delete_layer_clicked(this);' value='" + layer_typename + "'>X</button>" +
|
||||
"</li>");
|
||||
} else {
|
||||
$("#layer-list").prepend(
|
||||
"<li id='li_" + layer_typename + "'>" +
|
||||
"<input type='checkbox' onclick='check_box_layer_clicked(this);' name='show_layer' value='" + layer_typename + "'>" +
|
||||
layer_title +
|
||||
"<button type='button' onclick='delete_layer_clicked(this);' value='" + layer_typename + "'>X</button>" +
|
||||
"</li>");
|
||||
}
|
||||
|
||||
|
||||
// Add to memory
|
||||
var added_layer = {};
|
||||
added_layer.title = layer_title;
|
||||
added_layer.url = layer_url;
|
||||
added_layer.layer = tile_layer;
|
||||
added_layer.visibility = visibility;
|
||||
if (layer_order) {
|
||||
added_layer.zIndex = layer_order;
|
||||
} else {
|
||||
console.log('No layer order, set to : ' + (all_layers_list.length));
|
||||
added_layer.zIndex = all_layers_list.length;
|
||||
}
|
||||
all_layers[layer_typename] = added_layer;
|
||||
|
||||
// Add to list of overlay layers
|
||||
all_layers_list.push(layer_typename);
|
||||
|
||||
// Set zIndex of the layer
|
||||
tile_layer.setZIndex(added_layer.zIndex);
|
||||
console.log(added_layer.zIndex);
|
||||
|
||||
|
||||
// Hide from available layer
|
||||
document.getElementById("option_" + layer_typename).style.display = 'none';
|
||||
$('#add_layer_select').prop('selectedIndex', -1);
|
||||
}
|
||||
},
|
||||
error: function (xhr, errmsg, err) {
|
||||
console.log(xhr.status + ": " + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function save_map(event) {
|
||||
console.log('Save Map');
|
||||
event.preventDefault();
|
||||
var form_data = $('#save-map-form').serializeObject();
|
||||
|
||||
// Collect layers
|
||||
var layers = [];
|
||||
var map_data = {};
|
||||
|
||||
map_data['sources'] = {};
|
||||
for (i = 0; i < all_layers_list.length; i++) {
|
||||
key = all_layers_list[i];
|
||||
source_token = 'source_' + all_layers[key]['title'];
|
||||
console.log('Adding to layers');
|
||||
console.log(key);
|
||||
layers.push(
|
||||
{
|
||||
'name': key,
|
||||
'title': all_layers[key]['title'],
|
||||
'visibility': all_layers[key]['visibility'],
|
||||
'url': all_layers[key]['url'],
|
||||
'group': all_layers[key]['group'],
|
||||
'source': source_token
|
||||
}
|
||||
);
|
||||
map_data['sources'][source_token] = {
|
||||
'url': all_layers[key]['url']
|
||||
};
|
||||
}
|
||||
console.log(layers);
|
||||
|
||||
map_data['about'] = {
|
||||
'title': form_data['map-title'],
|
||||
'abstract': form_data['map-abstract']
|
||||
};
|
||||
map_data['map'] = {
|
||||
'center': [map.getCenter()['lat'], map.getCenter()['lng']],
|
||||
'zoom': map.getZoom(),
|
||||
'projection': '',
|
||||
'layers': layers
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
data: JSON.stringify(map_data),
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
console.log('Save map success');
|
||||
$('#save-map-modal').modal('hide');
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log('Save map failed' + error);
|
||||
$("#error-message-content").html(
|
||||
"<strong>Failed!</strong> There is an error when saving the map. " + error);
|
||||
$('#error-message-modal').show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function populate_background_layer(the_list, the_dict) {
|
||||
console.log(the_list);
|
||||
for (i = 0; i < the_list.length; i++) {
|
||||
var background_layer_name = the_list[i];
|
||||
var background_layer = the_dict[background_layer_name];
|
||||
if (background_layer['group'] != 'background') {
|
||||
continue;
|
||||
}
|
||||
if (background_layer['visibility'] == "True") {
|
||||
active_background_layer = background_layer;
|
||||
$("#background-layer-list").prepend(
|
||||
'<li>' +
|
||||
'<input type="radio" name="background-layer" value="' +
|
||||
background_layer_name +
|
||||
'" checked="checked">' +
|
||||
background_layer['title'] +
|
||||
'</li>'
|
||||
);
|
||||
} else if (background_layer['visibility']) {
|
||||
active_background_layer = background_layer;
|
||||
$("#background-layer-list").prepend(
|
||||
'<li>' +
|
||||
'<input type="radio" name="background-layer" value="' +
|
||||
background_layer_name +
|
||||
'" checked="checked">' +
|
||||
background_layer['title'] +
|
||||
'</li>'
|
||||
);
|
||||
|
||||
} else {
|
||||
$("#background-layer-list").prepend(
|
||||
'<li>' +
|
||||
'<input type="radio" name="background-layer" value="' +
|
||||
background_layer_name +
|
||||
'">' +
|
||||
background_layer['title'] +
|
||||
'</li>'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
// Add radio button listener for background layer
|
||||
$('input:radio[name=background-layer]').change(function () {
|
||||
var new_background_layer = all_layers[this.value]['layer'];
|
||||
map.removeLayer(active_background_layer);
|
||||
new_background_layer.addTo(map);
|
||||
new_background_layer.setZIndex(0);
|
||||
active_background_layer = new_background_layer;
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
// Initiate map
|
||||
{% if create %}
|
||||
map = L.map('map', {
|
||||
center: [-6.2, 106.8],
|
||||
zoom: 11,
|
||||
layers: [active_background_layer]
|
||||
});
|
||||
{% else %}
|
||||
map = L.map('map', {
|
||||
center: [-6.2, 106.8],
|
||||
zoom: 11
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
// Populate radio button for background layer
|
||||
populate_background_layer(all_layers_list, all_layers);
|
||||
|
||||
// Make sortable
|
||||
var list = document.getElementById("layer-list");
|
||||
Sortable.create(list, {
|
||||
onEnd: function (/**Event*/evt) {
|
||||
console.log(evt.oldIndex);
|
||||
console.log(evt.newIndex);
|
||||
console.log(evt.item.id);
|
||||
if (evt.newIndex == undefined) {
|
||||
// Move but to the same location.
|
||||
console.log('new index is undefined, return');
|
||||
return;
|
||||
}
|
||||
var num_background = 0;
|
||||
|
||||
for (i = 0; i < all_layers_list.length; i++) {
|
||||
if (all_layers[all_layers_list[i]].group == 'background') {
|
||||
num_background++;
|
||||
}
|
||||
}
|
||||
var num_overlay = all_layers_list.length - num_background;
|
||||
var flag_move_up = evt.oldIndex > evt.newIndex;
|
||||
console.log("is move up " + flag_move_up);
|
||||
var small_index = evt.oldIndex;
|
||||
var big_index = evt.newIndex;
|
||||
|
||||
if (flag_move_up) {
|
||||
big_index = evt.oldIndex;
|
||||
small_index = evt.newIndex;
|
||||
}
|
||||
|
||||
var layer_list = $("ul[id='layer-list'] li");
|
||||
for (i = 0; i < layer_list.length; i++) {
|
||||
var layer_typename = layer_list[i].id.slice(3);
|
||||
layer = all_layers[layer_typename].layer;
|
||||
if (i < small_index) {
|
||||
// pass
|
||||
} else if (i > big_index) {
|
||||
// pass
|
||||
} else if (i == evt.newIndex) {
|
||||
if (flag_move_up) {
|
||||
layer.setZIndex(layer.options.zIndex + (big_index - small_index));
|
||||
console.log("move layer " + layer_typename + " to " + (layer.options.zIndex))
|
||||
} else {
|
||||
layer.setZIndex(layer.options.zIndex - (big_index - small_index));
|
||||
console.log("move layer " + layer_typename + " to " + (layer.options.zIndex))
|
||||
}
|
||||
|
||||
} else {
|
||||
if (flag_move_up) {
|
||||
layer.setZIndex(layer.options.zIndex - 1);
|
||||
console.log("move layer " + layer_typename + " to " + (layer.options.zIndex))
|
||||
} else {
|
||||
layer.setZIndex(layer.options.zIndex + 1);
|
||||
console.log("move layer " + layer_typename + " to " + (layer.options.zIndex))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}); // That's all
|
||||
|
||||
{% if not create %}
|
||||
{% for layer in map_layers %}
|
||||
if ("{{ layer.group }}" == 'background') {
|
||||
all_layers_list.push("{{ layer.name }}");
|
||||
background_tile = L.tileLayer("{{ layer.ows_url }}");
|
||||
all_layers["{{ layer.name }}"] = {
|
||||
'title': '{{ layer.name }}',
|
||||
'url': '{{ layer.ows_url }}',
|
||||
'group': '{{ layer.group }}',
|
||||
'visibility': '{{ layer.visibility }}',
|
||||
'layer': background_tile,
|
||||
'zIndex': parseInt("{{ layer.stack_order }}")
|
||||
};
|
||||
if ("{{ layer.visibility }}" == 'True') {
|
||||
background_tile.addTo(map);
|
||||
}
|
||||
} else {
|
||||
console.log("{{ layer.name }} " + "{{ layer.stack_order }}");
|
||||
{% if layer.visibility %}
|
||||
add_layer("{{ layer.name }}", true, parseInt("{{ layer.stack_order }}"));
|
||||
{% else %}
|
||||
add_layer("{{ layer.name }}", false, parseInt("{{ layer.stack_order }}"));
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
populate_background_layer(all_layers_list, all_layers);
|
||||
console.log("{{ map.center_x }}, {{ map.center_y }}), {{ map.zoom }}");
|
||||
map.setView(new L.LatLng({{ map.center_x }}, {{ map.center_y }}), {{ map.zoom }});
|
||||
{% else %}
|
||||
// Check layer parameter in url
|
||||
var qd = {};
|
||||
location.search.substr(1).split("&").forEach(function (item) {
|
||||
var s = item.split("="),
|
||||
k = s[0],
|
||||
v = s[1] && decodeURIComponent(s[1]);
|
||||
(k in qd) ? qd[k].push(v) : qd[k] = [v]
|
||||
});
|
||||
if (qd['layer']) {
|
||||
for (i = 0; i < qd['layer'].length; i++) {
|
||||
var layer_typename = qd['layer'][i];
|
||||
add_layer(layer_typename);
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
});
|
||||
|
||||
$("#add_layer_button").click(function () {
|
||||
// Get value from select option
|
||||
{# var add_layer_select = $('select[id=add_layer_select]');#}
|
||||
var add_layer_select = $("#add_layer_select option:selected");
|
||||
var layer_typename = add_layer_select.val();
|
||||
|
||||
add_layer(layer_typename);
|
||||
|
||||
});
|
||||
|
||||
$('#save-map-form').submit(save_map);
|
||||
</script>
|
||||
{% endblock extra_script %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}{% block title_sub %}{% trans "Explore Maps" %}{% endblock %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block body_class %}maps{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
{% block body %}{% endblock body %}
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
{% endblock %}
|
||||
@@ -1,134 +0,0 @@
|
||||
{% extends "maps/map_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div class="span12">
|
||||
<h3>{% trans "Download" %} {{map.title}}</h3>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Here you can download all the layers of this map that
|
||||
are hosted on this GeoNode.
|
||||
{% endblocktrans %}
|
||||
<ul>
|
||||
{% for layer in downloadable_layers %}
|
||||
<li>
|
||||
{% if layer.local %}
|
||||
{{ layer.local_link|safe }}
|
||||
{% else %}
|
||||
{{ layer }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
{% blocktrans %}
|
||||
<div class="alert alert-warning">Could not find downloadable layers for this map. You can go back to
|
||||
{% endblocktrans %}<a href="{% url 'map_detail' map.id %}">{{map.title}}</a></div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if locked_layers %}
|
||||
{% blocktrans %}
|
||||
Additionally, the map contains these layers which will not be downloaded
|
||||
due to security restrictions:
|
||||
{% endblocktrans %}
|
||||
<ul>
|
||||
{% for layer in locked_layers %}
|
||||
<li>{{ layer.layer_title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if remote_layers %}
|
||||
{% blocktrans %}
|
||||
Finally, the map contains these layers which will not be downloaded
|
||||
because they are not available directly from this GeoNode:
|
||||
{% endblocktrans %}
|
||||
<ul>
|
||||
{% for layer in remote_layers %}
|
||||
<li>{{ layer }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if map_status %}
|
||||
<div class="alert alert-success span8" id="download">
|
||||
<div id="pb-status">{% trans 'Downloading' %}...</div>
|
||||
<div class="progress">
|
||||
<div id="pb" class="bar bar-success"></div>
|
||||
</div>
|
||||
<a class="btn" href="#" id="cancel">{% trans 'Cancel' %}</a>
|
||||
<a class="btn" href="{% url 'map_download' map.id %}" style="display:none;" id="retry">{% trans 'Retry' %}</a>
|
||||
</div>
|
||||
{% elif downloadable_layers|length > 0 %}
|
||||
<form action="{% url 'map_download' map.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="{% trans "Start downloading this map" %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
|
||||
{% autoescape off %}
|
||||
|
||||
{% if map_status %}
|
||||
|
||||
$(function(){
|
||||
|
||||
"use strict";
|
||||
|
||||
var processID;
|
||||
var checkStatus = setInterval(function (){
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url : "{% url 'map_download_check' %}"
|
||||
})
|
||||
.done(function(result){
|
||||
var response = $.parseJSON(result);
|
||||
processID = response.process.id;
|
||||
|
||||
if (response.process.status === "FINISHED") {
|
||||
$('#cancel').hide();
|
||||
$("#pb-status").html("{% trans "Download Complete" %}");
|
||||
location.href = "{{geoserver}}rest/process/batchDownload/download/" + processID;
|
||||
clearInterval(checkStatus);
|
||||
}
|
||||
|
||||
if (response.process.status === "FAILED") {
|
||||
$('#download').attr({class:'alert alert-error'});
|
||||
$('.progress').hide();
|
||||
$('#cancel').hide();
|
||||
$('#retry').show();
|
||||
$("#pb-status").html("{% trans "Download Failed" %}");
|
||||
clearInterval(checkStatus);
|
||||
}
|
||||
|
||||
$("#pb").css("width", response.process.progress + "%");
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
$("#cancel").click(function(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "{{geoserver}}rest/process/batchDownload/kill/" + processID
|
||||
})
|
||||
.done(function(){
|
||||
window.alert("You successfuly canceled the download");
|
||||
location.href = "{% url 'map_detail' map.id %}";
|
||||
clearInterval(checkStatus);
|
||||
})
|
||||
.fail(function(){
|
||||
clearInterval(checkStatus); // break if something fails
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endautoescape %}
|
||||
|
||||
</script>
|
||||
{% endblock extra_script %}
|
||||
@@ -1,19 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load base_tags %}
|
||||
|
||||
{% block title %} {% trans "Edit Map" %} - {{ block.super }} {% endblock %}
|
||||
{% block head %}
|
||||
{% if preview == 'geoext' %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% elif preview == 'react' %}
|
||||
{% include 'geonode-client/edit_map.html' %}
|
||||
{% else %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% endif %}
|
||||
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
@@ -1,40 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block head %}
|
||||
{% include "geonode/ext_header.html" %}
|
||||
{% include "geonode/app_header.html" %}
|
||||
{% include "geonode/geo_header.html" %}
|
||||
<script type="text/javascript">
|
||||
google.load("earth", "1");
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var app;
|
||||
Ext.onReady(function() {
|
||||
{% autoescape off %}
|
||||
var config = {
|
||||
useCapabilities: false,
|
||||
useToolbar: false,
|
||||
proxy: '{{ PROXY_URL }}',
|
||||
{% if MAPFISH_PRINT_ENABLED %}
|
||||
printService: "{{GEOSERVER_BASE_URL}}pdf/",
|
||||
{% else %}
|
||||
printService: "",
|
||||
{% endif %}
|
||||
/* The URL to a REST map configuration service. This service
|
||||
* provides listing and, with an authenticated user, saving of
|
||||
* maps on the server for sharing and editing.
|
||||
*/
|
||||
rest: "/maps/"
|
||||
};
|
||||
|
||||
Ext.apply(config, {{ config }});
|
||||
app = new GeoExplorer.Viewer(config);
|
||||
|
||||
{% endautoescape %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
@@ -1,44 +0,0 @@
|
||||
{% include 'geonode/ext_header.html' %}
|
||||
{% include 'geonode/geo_header.html' %}
|
||||
<link href="{{ STATIC_URL}}geonode/css/geoexplorer/map_geoexplorer.css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/extjs/GeoNode-mixin.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/extjs/Geonode-CatalogueApiSearch.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/extjs/GeoNode-GeoExplorer.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/utils/thumbnail.js"></script>
|
||||
<script type="text/javascript">
|
||||
var app;
|
||||
Ext.onReady(function() {
|
||||
{% autoescape off %}
|
||||
GeoExt.Lang.set("{{ LANGUAGE_CODE }}");
|
||||
var config = Ext.apply({
|
||||
authStatus: {% if user.is_authenticated %} 200{% else %} 401{% endif %},
|
||||
{% if PROXY_URL %}
|
||||
proxy: '{{ PROXY_URL }}',
|
||||
{% endif %}
|
||||
{% if MAPFISH_PRINT_ENABLED %}
|
||||
printService: "{{GEOSERVER_BASE_URL}}pdf/",
|
||||
{% else %}
|
||||
printService: "",
|
||||
{% endif %}
|
||||
/* The URL to a REST map configuration service. This service
|
||||
* provides listing and, with an authenticated user, saving of
|
||||
* maps on the server for sharing and editing.
|
||||
*/
|
||||
rest: "{% url "maps_browse" %}",
|
||||
ajaxLoginUrl: "{% url "account_ajax_login" %}",
|
||||
homeUrl: "{% url "home" %}",
|
||||
localGeoServerBaseUrl: "{{ GEOSERVER_BASE_URL }}",
|
||||
localCSWBaseUrl: "{{ CATALOGUE_BASE_URL }}",
|
||||
csrfToken: "{{ csrf_token }}",
|
||||
tools: [{ptype: "gxp_getfeedfeatureinfo"}],
|
||||
listeners: {
|
||||
'save': function(obj_id) {
|
||||
createMapThumbnail(obj_id);
|
||||
}
|
||||
}
|
||||
}, {{ config }});
|
||||
|
||||
app = new GeoNode.Composer(config);
|
||||
{% endautoescape %}
|
||||
});
|
||||
</script>
|
||||
@@ -1,36 +0,0 @@
|
||||
{% include "geonode/ext_header.html" %}
|
||||
{% include "geonode/app_header.html" %}
|
||||
{% include "geonode/geo_header.html" %}
|
||||
<script type="text/javascript">
|
||||
var app;
|
||||
Ext.onReady(function() {
|
||||
{% autoescape off %}
|
||||
GeoExt.Lang.set("{{ LANGUAGE_CODE }}");
|
||||
var config = Ext.apply({
|
||||
tools: [{
|
||||
ptype: "gxp_wmsgetfeatureinfo",
|
||||
format: "grid",
|
||||
actionTarget: "main.tbar",
|
||||
outputConfig: {width: 400, height: 200, panIn: false}
|
||||
}],
|
||||
useToolbar: true,
|
||||
{% if PROXY_URL %}
|
||||
proxy: '{{ PROXY_URL }}',
|
||||
{% endif %}
|
||||
{% if MAPFISH_PRINT_ENABLED %}
|
||||
printService: "{{GEOSERVER_BASE_URL}}pdf/",
|
||||
{% else %}
|
||||
printService: "",
|
||||
{% endif %}
|
||||
rest: "/maps/",
|
||||
|
||||
// tell the map viewer where and how to be rendered
|
||||
portalConfig: {
|
||||
height: 600,
|
||||
renderTo: "the_map"
|
||||
}
|
||||
}, {{ config }});
|
||||
app = new GeoExplorer.Viewer(config);
|
||||
{% endautoescape %}
|
||||
});
|
||||
</script>
|
||||
@@ -1,81 +0,0 @@
|
||||
{% load leaflet_tags %}
|
||||
|
||||
{% leaflet_js %}
|
||||
{% leaflet_css %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15/proj4-src.js"></script>
|
||||
|
||||
<style>
|
||||
.leaflet-container { /* all maps */
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function (event) {
|
||||
|
||||
/* set base layers */
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
var OpenMapSurfer_Roads = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}', {
|
||||
maxZoom: 20,
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
var base_maps = {
|
||||
"OpenMapSurfer_Roads": OpenMapSurfer_Roads,
|
||||
'OpenStreetMap': osm
|
||||
};
|
||||
|
||||
/* init overlay layers */
|
||||
var overlay_layers = {};
|
||||
/* init custom layer */
|
||||
var wmsLayer = null;
|
||||
|
||||
/* set coordinate systems */
|
||||
var firstProjection = proj4('EPSG:3857'); // google mercator
|
||||
var secondProjection = proj4('EPSG:4326'); // WGS84 web mercator
|
||||
|
||||
/* transform {{resource}} point coordinates from google mercator to WSG84 system */
|
||||
var point_wsg84 = proj4(firstProjection,secondProjection,[{{ resource.center_x }}, {{ resource.center_y }}]);
|
||||
|
||||
/* initialize the map on the "the_map" div with a given center and zoom */
|
||||
map = L.map('the_map').setView([point_wsg84[1], point_wsg84[0]],6);;
|
||||
map.setZoom({{ resource.zoom }});
|
||||
|
||||
/* add initial base layer to the map */
|
||||
map.addLayer(OpenMapSurfer_Roads);
|
||||
|
||||
/* loop over the layers used by the map */
|
||||
{% for layer in layers %}
|
||||
|
||||
if ("{{ layer.group }}" != 'background') {
|
||||
/* if current layer not a background layer, instantiates a WMS tile layer object
|
||||
* given the URL of the WMS service and a WMS parameters/options object.
|
||||
*/
|
||||
wmsLayer = L.tileLayer.wms('{{ layer.ows_url }}', {
|
||||
format: 'image/png',
|
||||
transparent: true,
|
||||
layers: '{{ layer.name }}',
|
||||
'opacity': 0.8
|
||||
});
|
||||
/* add wmsLayer to the overlay_layers{} and to the map object itself */
|
||||
if (wmsLayer != null) {
|
||||
overlay_layers["{{ resource.title }}"] = wmsLayer;
|
||||
map.addLayer(wmsLayer);
|
||||
}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
/* add layers control to allow switching between different base layers and switching overlays on/off */
|
||||
layerControl = L.control.layers(
|
||||
base_maps, overlay_layers
|
||||
).addTo(map);
|
||||
});
|
||||
|
||||
function zoom_to_box(map, bbox) {
|
||||
var bounds = [
|
||||
[bbox[1], bbox[0]],
|
||||
[bbox[3], bbox[2]]
|
||||
];
|
||||
map.fitBounds(bounds);
|
||||
}
|
||||
</script>
|
||||
@@ -16,7 +16,6 @@
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}maps{% endblock %}
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ map.title }} — {{ block.super }}{% endblock %}
|
||||
{% block title %}{{ block.super }} {{ map.title }} - {% trans "Edit Metadata" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Edit Metadata" %}
|
||||
{% if user.is_authenticated %}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-icon" href="{% url "new_map" %}">
|
||||
<i class="fa fa-plus" title="Create Map"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="{% url "new_map" %}">
|
||||
{% trans "Create Map" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}data{% endblock %}
|
||||
{% block body_class %}metadata{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div class="page-header">
|
||||
@@ -66,7 +79,7 @@
|
||||
<input type="radio" name="category_choice_field" value="{{ choice.0 }}"
|
||||
{% ifequal category_form.initial choice.0 %}
|
||||
checked="checked"
|
||||
{% endifequal %}>
|
||||
{% endifequal %}>
|
||||
{{ choice.1 }}
|
||||
</input>
|
||||
</div>
|
||||
@@ -82,5 +95,5 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
{% include 'metadata_form_js.html' %}
|
||||
{% include 'metadata_form_js.html' %}
|
||||
{% endblock %}
|
||||
@@ -1 +0,0 @@
|
||||
{% extends "metadata_detail.html" %}
|
||||
@@ -1,19 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load base_tags %}
|
||||
|
||||
{% block title %} {% trans "New Map" %} - {{ block.super }} {% endblock %}
|
||||
{% block head %}
|
||||
{% if preview == 'geoext' %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% elif preview == 'react' %}
|
||||
{% include 'geonode-client/map_new.html' %}
|
||||
{% else %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% endif %}
|
||||
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
@@ -1,62 +0,0 @@
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v3.17.1/build/ol.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
|
||||
document.getElementById('the_map').setAttribute("style", "height:600px");
|
||||
|
||||
var layers = [];
|
||||
var zoom = {{ resource.zoom }};
|
||||
var center_x = {{ resource.center_x }};
|
||||
var center_y = {{ resource.center_y }};
|
||||
var center = [center_x, center_y];
|
||||
var settings_crs = '{{ crs }}'
|
||||
|
||||
if (settings_crs != 'EPSG:4326') {
|
||||
settings_crs = 'EPSG:3857';
|
||||
}
|
||||
|
||||
var config = {{ config|safe }};
|
||||
|
||||
var model_crs = config['map']['projection'];
|
||||
if (settings_crs != model_crs) {
|
||||
// if the two crs are not the same, user must have switched default crs for project after map was created
|
||||
center = ol.proj.transform(center, model_crs, settings_crs)
|
||||
}
|
||||
|
||||
var config_layers = config['map']['layers']
|
||||
for (layer in config_layers) {
|
||||
if (config_layers[layer]['title'] == 'OpenStreetMap') {
|
||||
if (config_layers[layer]['visibility'] == true) {
|
||||
layers.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM()
|
||||
}));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
{% for layer in resource.layers %}
|
||||
{% if layer.ows_url != None %}
|
||||
layers.push(new ol.layer.Tile({
|
||||
source: new ol.source.TileWMS({
|
||||
url: '{{ layer.ows_url }}',
|
||||
params: {'LAYERS': '{{ layer.name }}'}
|
||||
})
|
||||
})
|
||||
);
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: layers,
|
||||
target: 'the_map',
|
||||
view: new ol.View({
|
||||
center: center,
|
||||
zoom: zoom,
|
||||
projection: settings_crs
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -3,12 +3,12 @@
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{% trans "Deleting" %} {{ map.title }} — {{ block.super }}{% endblock %}
|
||||
{% block title %}{{ block.super }} {% trans "Remove Map" %}{% endblock %}
|
||||
{% block page-title %}
|
||||
{% trans "Remove Map" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page-header">
|
||||
<h2 class="page-title">{% trans "Remove Map" %}</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{% include 'geonode/ext_header.html' %}
|
||||
{% include 'geonode/sdk_header.html' %}
|
||||
<style type="text/css">
|
||||
.map-title-header {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="{{ STATIC_URL}}geonode/js/extjs/GeoNode-GeoExplorer.js"></script>
|
||||
<script type="text/javascript">
|
||||
var app;
|
||||
Ext.onReady(function() {
|
||||
{% autoescape off %}
|
||||
var config = Ext.apply({
|
||||
authStatus: {% if user.is_authenticated %} 200{% else %} 401{% endif %},
|
||||
proxy: '{{ PROXY_URL }}',
|
||||
{% if MAPFISH_PRINT_ENABLED %}
|
||||
printService: "{{GEOSERVER_BASE_URL}}pdf/",
|
||||
{% else %}
|
||||
printService: "",
|
||||
{% endif %}
|
||||
/* The URL to a REST map configuration service. This service
|
||||
* provides listing and, with an authenticated user, saving of
|
||||
* maps on the server for sharing and editing.
|
||||
*/
|
||||
rest: "{% url "maps_browse" %}",
|
||||
ajaxLoginUrl: "{% url "account_ajax_login" %}",
|
||||
homeUrl: "{% url "home" %}",
|
||||
portalItems: [{
|
||||
xtype: "container",
|
||||
layout: "fit",
|
||||
height: 81,
|
||||
region: "north"
|
||||
}],
|
||||
localGeoServerBaseUrl: "{{ GEOSERVER_BASE_URL }}",
|
||||
localCSWBaseUrl: "{{ CATALOGUE_BASE_URL }}",
|
||||
csrfToken: "{{ csrf_token }}",
|
||||
tools: [{ptype: "gxp_getfeedfeatureinfo"}],
|
||||
}, {{ config }});
|
||||
|
||||
|
||||
app = new MyApp.Viewer(config);
|
||||
{% endautoescape %}
|
||||
});
|
||||
</script>
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load base_tags %}
|
||||
|
||||
{% block title %} {% trans "Map" %} - {{ block.super }} {% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% if preview == 'geoext' %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% elif preview == 'react' %}
|
||||
{% include 'geonode-client/map_view.html' %}
|
||||
{% else %}
|
||||
{% include 'maps/map_geoexplorer.js' %}
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<ViewContext version="1.1.0" id="{{ map.id }}" xmlns="http://www.opengis.net/context" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd">
|
||||
<General>
|
||||
<Window width="500" height="300"/>
|
||||
<BoundingBox SRS="EPSG:4326" minx="{{ map.bbox.0 }}" miny="{{ map.bbox.1 }}" maxx="{{ map.bbox.2 }}" maxy="{{ map.bbox.3 }}"/>
|
||||
<Title>{{ map.title }}</Title>
|
||||
{% if map.keyword_list %}
|
||||
<KeywordList>
|
||||
{% for keyword in map.keyword_list %}
|
||||
<Keyword>{{ keyword }}</Keyword>
|
||||
{% endfor %}
|
||||
</KeywordList>
|
||||
{% endif %}
|
||||
<Abstract>{{ map.abstract }}</Abstract>
|
||||
<LogoURL width="307" height="168" format="image/png">
|
||||
<OnlineResource xlink:type="simple" xlink:href="http://geonode.org/static/img/GeoNode-logo.png"/>
|
||||
</LogoURL>
|
||||
<DescriptionURL format="text/html">
|
||||
<OnlineResource xlink:type="simple" xlink:href="{{ siteurl }}{{ map.get_absolute_url }}"/>
|
||||
</DescriptionURL>
|
||||
{% with profile as profile %}
|
||||
<ContactInformation>
|
||||
<ContactPersonPrimary>
|
||||
<ContactPerson>{{ profile.name }}</ContactPerson>
|
||||
<ContactOrganization>{{ profile.organization }}</ContactOrganization>
|
||||
</ContactPersonPrimary>
|
||||
<ContactPosition>{{ profile.position }}</ContactPosition>
|
||||
<ContactAddress>
|
||||
<AddressType>postal</AddressType>
|
||||
<Address>{{ profile.delivery }}</Address>
|
||||
<City>{{ profile.city }}</City>
|
||||
<StateOrProvince>{{ profile.area }}</StateOrProvince>
|
||||
<PostCode>{{ profile.zipcode }}</PostCode>
|
||||
<Country>{{ profile.country }}</Country>
|
||||
</ContactAddress>
|
||||
<ContactVoiceTelephone>{{ profile.voice }}</ContactVoiceTelephone>
|
||||
<ContactFacsimileTelephone>{{ profile.fax }}</ContactFacsimileTelephone>
|
||||
<ContactElectronicMailAddress>{{ map.owner.email }}</ContactElectronicMailAddress>
|
||||
</ContactInformation>
|
||||
{% endwith %}
|
||||
</General>
|
||||
<LayerList>
|
||||
{% for layer in map.layers %}
|
||||
{% if layer.ows_url != None %}
|
||||
{% with layer.layer_config as lc %}
|
||||
<Layer queryable="{{ lc.capability.queryable|lower }}" hidden="{% if lc.visibility == False %}true{%else%}false{%endif%}">
|
||||
<Server service="OGC:WMS" version="1.1.1">
|
||||
<OnlineResource xlink:type="simple" xlink:href="{{ layer.ows_url }}"/>
|
||||
</Server>
|
||||
<Name>{{ layer.name }}</Name>
|
||||
<Title>{{ lc.capability.title }}</Title>
|
||||
<Abstract>{{ lc.capability.abstract }}</Abstract>
|
||||
{% if lc.capability.metadataURLs %}
|
||||
<MetadataURL>
|
||||
<OnlineResource xlink:type="simple" xlink:href="{{ lc.metadataURLs }}"/>
|
||||
</MetadataURL>
|
||||
{% endif %}
|
||||
<SRS>EPSG:4326</SRS>
|
||||
<FormatList>
|
||||
{% if layer.format %}
|
||||
<Format current="1">{{ layer.format }}</Format>
|
||||
{% else %}
|
||||
<Format current="1">image/png</Format>
|
||||
{% endif %}
|
||||
{% for f in lc.capability.formats %}
|
||||
{% if f != layer.format %}
|
||||
<Format>{{ f }}</Format>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</FormatList>
|
||||
<StyleList>
|
||||
{% for s in lc.capability.styles %}
|
||||
<Style>
|
||||
<Name>{{ s.name }}</Name>
|
||||
<Title>{{ s.abstract }}</Title>
|
||||
<LegendURL width="{{ s.legend.width}}" height="{{ s.legend.height }}" format="{{ s.legend.format }}">
|
||||
<OnlineResource xlink:type="simple" xlink:href="{{ s.legend.href }}"/>
|
||||
</LegendURL>
|
||||
</Style>
|
||||
{% endfor %}
|
||||
</StyleList>
|
||||
</Layer>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</LayerList>
|
||||
</ViewContext>
|
||||
@@ -1,25 +0,0 @@
|
||||
{% load wagtailroutablepage_tags wagtailimages_tags puput_tags %}
|
||||
{% if entry.categories.count > 0 %}
|
||||
<ul class="links">
|
||||
<li class="category">{% categories_list entry.categories %}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<h1>{{ entry.title }}</h1>
|
||||
<ul class="links">
|
||||
<li>
|
||||
by <a href="{% routablepageurl blog_page "entries_by_author" entry.owner.username %}">{{ entry.owner.username }}</a>
|
||||
on {{ entry.date|date:"DATE_FORMAT" }}</li>
|
||||
|
||||
{% if entry.tags.count > 0 %}
|
||||
<li>
|
||||
<i class="fa fa-tag"></i>
|
||||
{% tags_list blog_page.num_tags_entry_header entry.tags %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if blog_page.disqus_api_secret %}
|
||||
<li>
|
||||
<i class="fa fa-comments"></i>
|
||||
{{ entry.num_comments }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -1,59 +0,0 @@
|
||||
{% extends "blog/base.html" %}
|
||||
{% load wagtailcore_tags wagtailimages_tags puput_tags %}
|
||||
|
||||
{% block title %}{{ self.title }} | {{ blog_page.title }}{% endblock title %}
|
||||
{% block meta_title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock meta_title %}
|
||||
{% block meta_description %}{% if self.search_description %}{{ self.search_description }}{% else %}{{ self.body|striptags|truncatewords:20 }}{% endif %}{% endblock meta_description %}
|
||||
{% block canonical %}{% canonical_url entry=self %}{% endblock canonical %}
|
||||
{% block social_share %}
|
||||
{% image self.header_image fill-800x450 as share_image %}
|
||||
<meta property="og:title" content="{{ self.title }}" />
|
||||
<meta property="og:description" content="{% if self.excerpt %}{{ self.excerpt|striptags }}{% else %}{{ self.body|striptags|truncatewords:20 }}{% endif %}" />
|
||||
<meta property="og:url" content="{% canonical_url entry=self %}" />
|
||||
{% if self.header_image %}
|
||||
<meta property="og:image" content="{% image_url share_image.url %}" />
|
||||
<meta property="og:image:width" content="800" />
|
||||
<meta property="og:image:height" content="450" />
|
||||
<meta name="twitter:image" content="{% image_url share_image.url %}" />
|
||||
{% endif %}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{{ self.title }}" />
|
||||
<meta name="twitter:description" content="{% if self.excerpt %}{{ self.excerpt|striptags }}{% else %}{{ self.body|striptags|truncatewords:20 }}{% endif %}" />
|
||||
|
||||
{% if page.map %}
|
||||
{% block extra_head %}
|
||||
{% include "blog/tags/map_leaflet.html" %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock social_share %}
|
||||
|
||||
{% block body_class %}blog{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="box page-content"
|
||||
{%if self.id %}data-entry-page-update-comments-url="{% url 'entry_page_update_comments' self.id %}{% endif %}">
|
||||
{% include 'masdap/entry_page_header.html' with entry=self %}
|
||||
{% if self.header_image %}
|
||||
<section>
|
||||
<span class="image featured">
|
||||
{% image self.header_image fill-800x450 as header_image %}
|
||||
<img alt="{{ self.header_image.title }}" src="{{ header_image.url }}">
|
||||
</span>
|
||||
</section>
|
||||
{% endif %}
|
||||
<section>
|
||||
{{ self.body|richtext}}
|
||||
{% if page.map %}
|
||||
{% include "blog/tags/map.html" %}
|
||||
{% endif %}
|
||||
</section>
|
||||
{% show_comments %}
|
||||
</article>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_content %}
|
||||
{% if self.has_related %}
|
||||
{% include 'blog/related_entries.html' with entry=self %}
|
||||
{% endif %}
|
||||
{% endblock extra_content %}
|
||||
@@ -1,376 +0,0 @@
|
||||
{% extends "site_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} {{ resource.title }} — {{ block.super }}{% endblock %}
|
||||
{% block page-title %}{% trans "Metadata" %}{% endblock %}
|
||||
|
||||
{% block body_class %}data{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
|
||||
<style>
|
||||
|
||||
.subtitle {
|
||||
font-size:16px;
|
||||
color: #428bca;
|
||||
}
|
||||
|
||||
.sep_title hr {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="page-header">
|
||||
{% if resource.class_name == "Document" %}
|
||||
<a href="{% url 'document_detail' docid=resource.id %}" class="btn btn-primary pull-right">{% trans "Return to Document" %}</a>
|
||||
{% elif resource.class_name == "Layer" %}
|
||||
<a href="{% url 'layer_detail' layername=resource.typename %}" class="btn btn-primary pull-right">{% trans "Return to Layer" %}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'map_detail' mapid=resource.id %}" class="btn btn-primary pull-right">{% trans "Return to Map" %}</a>
|
||||
{% endif %}
|
||||
<h2 class="page-title">{% trans "Metadata" %} : {{ resource.title }}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<article class="description tab-pane active" id="info">
|
||||
|
||||
<span class="subtitle">{% trans "Identification" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
{% if resource.title %}
|
||||
<dt>{% trans "Title" %}</dt>
|
||||
<dd>{{ resource.title|truncatechars:80 }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.abstract %}
|
||||
<dt>{% trans "Abstract" %}</dt>
|
||||
<dd>{{ resource.abstract|escape|urlize|linebreaks|safe|truncatechars:1000 }}</dd>
|
||||
{% endif %}
|
||||
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'above' and resource.license %}
|
||||
<dt>{% trans "License" %}</dt>
|
||||
<dd>{{ resource.license.name_long }} <a href="#license-more-above" data-toggle="collapse" data-target=".license-more-above"><i class="fa fa-info-circle"></i></a></dd>
|
||||
{% endif %}
|
||||
<dd class="license-more-above collapse">
|
||||
{% for bullet in resource.license.description_bullets %}
|
||||
{{ bullet }}<br/><br/>
|
||||
{% endfor %}
|
||||
{% if resource.license.url %}
|
||||
+ For more info see <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
|
||||
{% if resource.date %}
|
||||
<dt>{% trans resource.date_type|title %} {% trans "Date" %}</dt>
|
||||
<dd>{{ resource.date }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.display_type %}
|
||||
<dt>{% trans "Type" %}</dt>
|
||||
<dd>{{ resource.display_type }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.keyword_list %}
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd>{% for keyword in resource.keyword_list %}
|
||||
{{ keyword }}
|
||||
{% endfor %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.category %}
|
||||
<dt>{% trans "Category" %}</dt>
|
||||
<dd><a href="/search/?category__identifier__in={{ resource.category.identifier }}">{{ resource.category }}</a> {% if resource.category.description %}<a href="#category-more" data-toggle="collapse" data-target=".category-more"><i class="fa fa-info-circle"></i></a>{% endif %}</dd>
|
||||
{% if resource.category.description %}
|
||||
<dd class="category-more collapse">
|
||||
{{ resource.category.description }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if resource.regions.all %}
|
||||
<dt>{% trans "Regions" %}</dt>
|
||||
<dd>{{ resource.regions.all|join:", " }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{% trans "Published" %}</dt>
|
||||
<dd>{% if resource.is_published %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %}</dd>
|
||||
|
||||
<dt>{% trans "Featured" %}</dt>
|
||||
<dd>{% if resource.featured %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %}</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
<span class="subtitle">{% trans "Owner" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
{% if resource.owner %}
|
||||
{% with resource.owner as poc %}
|
||||
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ poc.name_long }}</dd>
|
||||
|
||||
<dt>{% trans "email" %}</dt>
|
||||
<dd>{{ poc.email }}</dd>
|
||||
|
||||
<dt>{% trans "Position" %}</dt>
|
||||
<dd>{{ poc.position }}</dd>
|
||||
|
||||
<dt>{% trans "Organization" %}</dt>
|
||||
<dd>{{ poc.organization }}</dd>
|
||||
|
||||
<dt>{% trans "Location" %}</dt>
|
||||
<dd>{{ poc.location }}</dd>
|
||||
|
||||
<dt>{% trans "Voice" %}</dt>
|
||||
<dd>{{ poc.voice }}</dd>
|
||||
|
||||
<dt>{% trans "Fax" %}</dt>
|
||||
<dd>{{ poc.fax }}</dd>
|
||||
|
||||
{% if poc.keyword_list %}
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd>{% for keyword in poc.keyword_list %}
|
||||
{{ keyword }}
|
||||
{% endfor %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
</dl>
|
||||
|
||||
<span class="subtitle">{% trans "Information" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>{% trans "Identification Image" %}</dt>
|
||||
<dd>
|
||||
<a href="{{ resource.get_thumbnail_url }}"><img ng-src="{{ resource.get_thumbnail_url }}" src="{{ resource.get_thumbnail_url }}"></a>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>{% trans "Spatial Resolution" %}</dt>
|
||||
<dd>{% if resource.scale %} {{ resource.scale }} {% else %} --- {% endif %}</dd>
|
||||
|
||||
<dt>{% trans "Projetion System" %}</dt>
|
||||
<dd>{{ resource.srid }}</dd>
|
||||
|
||||
<dt>{% trans "Extension x0" %}</dt>
|
||||
<dd>{{resource.bbox_x0}}</dd>
|
||||
|
||||
<dt>{% trans "Extension x1" %}</dt>
|
||||
<dd>{{resource.bbox_x1}}</dd>
|
||||
|
||||
<dt>{% trans "Extension y0" %}</dt>
|
||||
<dd>{{resource.bbox_y0}}</dd>
|
||||
|
||||
<dt>{% trans "Extension y1" %}</dt>
|
||||
<dd>{{resource.bbox_y1}}</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
<span class="subtitle">{% trans "Features" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'below' and resource.license %}
|
||||
<dt>{% trans "License" %}</dt>
|
||||
<dd>{{ resource.license.name_long }} <a href="#license-more-below" data-toggle="collapse" data-target=".license-more-below"><i class="fa fa-info-circle"></i></a></dd>
|
||||
<dd class="license-more-below collapse">
|
||||
{% for bullet in resource.license.description_bullets %}
|
||||
{{ bullet }}<br/><br/>
|
||||
{% endfor %}
|
||||
{% if resource.license.url %}
|
||||
+ For more info see <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.maintenance_frequency %}
|
||||
<dt>{% trans "Maintenance Frequency" %}</dt>
|
||||
<dd>{{ resource.maintenance_frequency_title }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.restriction_code_type or resource.constraints_other %}
|
||||
<dt>{% trans "Restrictions" %}</dt>
|
||||
<dd>{% if resource.constraints_other %}
|
||||
{{ resource.constraints_other }}
|
||||
{% else %}
|
||||
{{ resource.restriction_code_type }}
|
||||
{% endif %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.edition %}
|
||||
<dt>{% trans "Edition" %}</dt>
|
||||
<dd>{{ resource.edition}}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.purpose %}
|
||||
<dt>{% trans "Purpose" %}</dt>
|
||||
<dd>{{ resource.purpose|escape|urlize|linebreaks|safe|truncatechars:160 }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.language %}
|
||||
<dt>{% trans "Language" %}</dt>
|
||||
<dd>{{ resource.language_title }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.temporal_extent_start and resource.temporal_extent_end %}
|
||||
<dt>{% trans "Temporal Extent" %}</dt>
|
||||
<dd>{{ resource.temporal_extent_start }} - {{ resource.temporal_extent_end }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.data_quality_statement %}
|
||||
<dt>{% trans "Data Quality" %}</dt>
|
||||
<dd>{{ resource.data_quality_statement }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.supplemental_information %}
|
||||
<dt>{% trans "Supplemental Information" %}</dt>
|
||||
<dd>{{ resource.supplemental_information|truncatechars:160|escape|urlize|linebreaks|safe }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if resource.spatial_representation_type %}
|
||||
<dt>{% trans "Spatial Representation Type" %}</dt>
|
||||
<dd>{{ resource.spatial_representation_type }}</dd>
|
||||
{% endif %}
|
||||
|
||||
</dl>
|
||||
|
||||
{% if resource.poc %}
|
||||
<span class="subtitle">{% trans "Contact Points" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ resource.poc.name_long }}</dd>
|
||||
|
||||
<dt>{% trans "email" %}</dt>
|
||||
<dd>{{ resource.poc.email }}</dd>
|
||||
|
||||
<dt>{% trans "Position" %}</dt>
|
||||
<dd>{{ resource.poc.position }}</dd>
|
||||
|
||||
<dt>{% trans "Organization" %}</dt>
|
||||
<dd>{{ resource.poc.organization }}</dd>
|
||||
|
||||
<dt>{% trans "Location" %}</dt>
|
||||
<dd>{{ resource.poc.location }}</dd>
|
||||
|
||||
<dt>{% trans "Voice" %}</dt>
|
||||
<dd>{{ resource.poc.voice }}</dd>
|
||||
|
||||
<dt>{% trans "Fax" %}</dt>
|
||||
<dd>{{ resource.poc.fax }}</dd>
|
||||
|
||||
{% if poc.keyword_list %}
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd>{% for keyword in resource.poc.keyword_list %}
|
||||
{{ keyword }}
|
||||
{% endfor %}</dd>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
<span class="subtitle">{% trans "References" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>{% trans "Link Online" %}</dt>
|
||||
<dd><a href="{{ resource.get_absolute_url }}">{{ resource.get_absolute_url }}</a></dd>
|
||||
|
||||
<dt>{% trans "Metadata Page" %}</dt>
|
||||
<dd><a href="{{ resource.get_absolute_url }}/metadata_detail">{{ resource.get_absolute_url }}/metadata_detail</a></dd>
|
||||
|
||||
{% if resource.doc_file %}
|
||||
<dt>{% trans "Online Link" %}</dt>
|
||||
<dd><a href="{{ resource.get_absolute_url }}/download">{{ resource.get_absolute_url }}/download</a></dd>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
|
||||
{% for link in resource.link_set.download %}
|
||||
<dt>{{link.name}}</dt>
|
||||
<dd><a href="{{link.url}}">{{resource.title}}.{{link.extension}}</a></dd>
|
||||
{% endfor %}
|
||||
|
||||
<hr>
|
||||
|
||||
{% for link in resource.link_set.ows %}
|
||||
<dt>{{link.name}}</dt>
|
||||
<dd><a href="{{link.url}}">Geoservice {{link.link_type}}</a></dd>
|
||||
{% endfor %}
|
||||
|
||||
</dl>
|
||||
|
||||
{% if resource.metadata_author %}
|
||||
<span class="subtitle">{% trans "Metadata Author" %}</span>
|
||||
<div class="sep_title"><hr></div>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
{% with resource.metadata_author as poc %}
|
||||
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ poc.name_long }}</dd>
|
||||
|
||||
<dt>{% trans "email" %}</dt>
|
||||
<dd>{{ poc.email }}</dd>
|
||||
|
||||
<dt>{% trans "Position" %}</dt>
|
||||
<dd>{{ poc.position }}</dd>
|
||||
|
||||
<dt>{% trans "Organization" %}</dt>
|
||||
<dd>{{ poc.organization }}</dd>
|
||||
|
||||
<dt>{% trans "Location" %}</dt>
|
||||
<dd>{{ poc.location }}</dd>
|
||||
|
||||
<dt>{% trans "Voice" %}</dt>
|
||||
<dd>{{ poc.voice }}</dd>
|
||||
|
||||
<dt>{% trans "Fax" %}</dt>
|
||||
<dd>{{ poc.fax }}</dd>
|
||||
|
||||
{% if poc.keyword_list %}
|
||||
<dt>{% trans "Keywords" %}</dt>
|
||||
<dd>{% for keyword in poc.keyword_list %}
|
||||
{{ keyword }}
|
||||
{% endfor %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% endwith %}
|
||||
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,85 +0,0 @@
|
||||
{% load staticfiles %}
|
||||
{% if DEBUG_STATIC %}
|
||||
<script src="{% static "lib/js/bootstrap-datetimepicker.min.js" %}" type="text/javascript"></script>
|
||||
<script src="{% static "lib/js/bootstrap-treeview.min.js" %}" type="text/javascript"></script>
|
||||
<script src="{% static "lib/js/bootstrap-tokenfield.js" %}" type="text/javascript"></script>
|
||||
{% endif %}
|
||||
<script type="text/javascript">
|
||||
{% autoescape off %}
|
||||
$(function() {
|
||||
var pickerOptions = {
|
||||
format: 'YYYY-MM-DD hh:mm A',
|
||||
pickDate: true,
|
||||
pickTime: true,
|
||||
language: 'en',
|
||||
icons: {
|
||||
time: 'fa fa-clock-o',
|
||||
date: 'fa fa-calendar',
|
||||
up: 'fa fa-chevron-up',
|
||||
down: 'fa fa-chevron-down'
|
||||
}
|
||||
};
|
||||
$('#id_resource-date_picker').datetimepicker(pickerOptions);
|
||||
$('#id_resource-temporal_extent_start_picker').datetimepicker(pickerOptions);
|
||||
$('#id_resource-temporal_extent_end_picker').datetimepicker(pickerOptions);
|
||||
});
|
||||
|
||||
$('.modal-forms').css('max-height', '500px').css('overflow-y', 'scroll');
|
||||
$('.modal-cloose-btn').css('margin','20px');
|
||||
|
||||
$('.modal-cloose-btn').click(function(){
|
||||
$('.modal-forms').modal('hide');
|
||||
});
|
||||
|
||||
$('#id_resource-poc').change(function(){
|
||||
if($(this).val() === ''){
|
||||
$('#poc_form').modal();
|
||||
}
|
||||
});
|
||||
|
||||
$('#id_resource-metadata_author').change(function(){
|
||||
if($(this).val() === ''){
|
||||
$('#metadata_form').modal();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
{% if layer.metadata_uploaded_preserve %}
|
||||
$('#layer_metadata_update :input').attr('readonly','readonly');
|
||||
{% endif %}
|
||||
$('.has-popover').popover({'trigger':'hover'});
|
||||
|
||||
var params = typeof FILTER_TYPE == 'undefined' ? {} : {'type': FILTER_TYPE};
|
||||
$('#id_resource-keywords').tokenfield({
|
||||
/*
|
||||
autocomplete: {
|
||||
source: ['red','blue','green','yellow','violet','brown','purple','black','white'],
|
||||
delay: 100
|
||||
},
|
||||
showAutocompleteOnFocus: true
|
||||
*/
|
||||
})
|
||||
|
||||
$.ajax('/h_keywords_api', {params: params}).success(function(data){
|
||||
$('#treeview').treeview({
|
||||
data: data,
|
||||
levels: 1,
|
||||
onNodeSelected: function($event, $data) {
|
||||
//TODO: This seems a horribly inelegant way of doing this in 12 Lines
|
||||
kws = $('#id_resource-keywords').tokenfield('getTokens');
|
||||
newToken = $data.text
|
||||
exists = false
|
||||
for (kw in kws) {
|
||||
if (kws[kw]['value'].indexOf(newToken) >=0) {
|
||||
exists = true
|
||||
}
|
||||
}
|
||||
if (!exists) {
|
||||
$('#id_resource-keywords').tokenfield('createToken', $data.text);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
{% endautoescape %}
|
||||
</script>
|
||||
Loaded 100 of 139 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user