aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:37:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:37:39 -0700
commit752fe00dc50c4e6d4627e4fe211d1749399c0eb8 (patch)
tree97bd38c8b471b00b518224bce7e9c4fab4e79fa8 /python
parent03961b5019a402ec5706ff43c9fb4d8f903e7369 (diff)
downloadfatcat-752fe00dc50c4e6d4627e4fe211d1749399c0eb8.tar.gz
fatcat-752fe00dc50c4e6d4627e4fe211d1749399c0eb8.zip
lock down editing links/routes for preview
Diffstat (limited to 'python')
-rw-r--r--python/fatcat/routes.py52
-rw-r--r--python/fatcat/templates/base.html4
-rw-r--r--python/fatcat/templates/container_view.html2
-rw-r--r--python/fatcat/templates/creator_view.html2
-rw-r--r--python/fatcat/templates/file_view.html2
-rw-r--r--python/fatcat/templates/home.html6
-rw-r--r--python/fatcat/templates/release_view.html2
-rw-r--r--python/fatcat/templates/work_view.html2
8 files changed, 33 insertions, 39 deletions
diff --git a/python/fatcat/routes.py b/python/fatcat/routes.py
index 801397e8..b1458fb1 100644
--- a/python/fatcat/routes.py
+++ b/python/fatcat/routes.py
@@ -44,18 +44,18 @@ def container_edit_view(ident):
# # else:
# #return render_template('container_edit.html')
-@app.route('/container/create', methods=['GET'])
-def container_create_view():
- return render_template('container_create.html')
-
-@app.route('/container/create', methods=['POST'])
-def container_create():
- params = dict()
- for k in request.form:
- if k.startswith('container_'):
- params[k[10:]] = request.form[k]
- edit = api.create_container(params=params)
- return redirect("/container/{}".format(edit.ident))
+#@app.route('/container/create', methods=['GET'])
+#def container_create_view():
+# return render_template('container_create.html')
+
+#@app.route('/container/create', methods=['POST'])
+#def container_create():
+# params = dict()
+# for k in request.form:
+# if k.startswith('container_'):
+# params[k[10:]] = request.form[k]
+# edit = api.create_container(params=params)
+# return redirect("/container/{}".format(edit.ident))
@app.route('/container/lookup', methods=['GET'])
def container_lookup():
@@ -168,18 +168,18 @@ def release_lookup():
abort(ae.status)
return redirect('/release/{}'.format(resp.ident))
-@app.route('/release/create', methods=['GET'])
-def release_create_view():
- return render_template('release_create.html')
+#@app.route('/release/create', methods=['GET'])
+#def release_create_view():
+# return render_template('release_create.html')
-@app.route('/release/create', methods=['POST'])
-def release_create():
- params = dict()
- for k in request.form:
- if k.startswith('release_'):
- params[k[10:]] = request.form[k]
- edit = api.create_release(params=params)
- return redirect("/release/{}".format(edit.ident))
+#@app.route('/release/create', methods=['POST'])
+#def release_create():
+# params = dict()
+# for k in request.form:
+# if k.startswith('release_'):
+# params[k[10:]] = request.form[k]
+# edit = api.create_release(params=params)
+# return redirect("/release/{}".format(edit.ident))
@app.route('/release/<ident>/history', methods=['GET'])
def release_history(ident):
@@ -217,9 +217,9 @@ def release_view(ident):
return render_template('release_view.html', release=entity,
authors=authors, files=files, container=container)
-@app.route('/work/create', methods=['GET'])
-def work_create_view():
- return abort(404)
+#@app.route('/work/create', methods=['GET'])
+#def work_create_view():
+ #return abort(404)
@app.route('/work/<ident>/history', methods=['GET'])
def work_history(ident):
diff --git a/python/fatcat/templates/base.html b/python/fatcat/templates/base.html
index 617450c2..838e795d 100644
--- a/python/fatcat/templates/base.html
+++ b/python/fatcat/templates/base.html
@@ -36,11 +36,11 @@
<div class="ui simple dropdown item">
demo-user <i class="dropdown icon"></i>
<div class="menu">
- <a class="item" href="/editgroup/current"><i class="edit icon"></i>Edits in Progress</a>
+ <a class="item" href="{# /editgroup/current #}#"><i class="edit icon"></i>Edits in Progress</a>
<a class="item" href="/editor/aaaaaaaaaaaabkvkaaaaaaaaae/changelog"><i class="history icon"></i>History</a>
<div class="divider"></div>
<a class="item" href="/editor/aaaaaaaaaaaabkvkaaaaaaaaae"><i class="user icon"></i>Account</a>
- <a class="item" href="/logout"><i class="sign out icon"></i>Logout</a>
+ <a class="item" href="{# /logout #}#"><i class="sign out icon"></i>Logout</a>
</div>
</div>
diff --git a/python/fatcat/templates/container_view.html b/python/fatcat/templates/container_view.html
index c2ca7327..ad4905f8 100644
--- a/python/fatcat/templates/container_view.html
+++ b/python/fatcat/templates/container_view.html
@@ -98,7 +98,7 @@ Raw Object:
</div>
<div class="two ui buttons bottom attached">
- <a href="/container/{{ container.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/container/{{ container.ident }}/edit" class="ui blue button"><strike>Edit Metadata</strike></a>
<a href="/container/{{ container.ident }}/history" class="ui button">View History</a>
</div>
diff --git a/python/fatcat/templates/creator_view.html b/python/fatcat/templates/creator_view.html
index 2ce01fb6..316a1508 100644
--- a/python/fatcat/templates/creator_view.html
+++ b/python/fatcat/templates/creator_view.html
@@ -72,7 +72,7 @@ Raw Object:
</div>
<div class="two ui buttons bottom attached">
- <a href="/creator/{{ creator.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/creator/{{ creator.ident }}/edit" class="ui blue button"><strike>Edit Metadata</strike></a>
<a href="/creator/{{ creator.ident }}/history" class="ui button">View History</a>
</div>
diff --git a/python/fatcat/templates/file_view.html b/python/fatcat/templates/file_view.html
index 70ce8771..ff08de83 100644
--- a/python/fatcat/templates/file_view.html
+++ b/python/fatcat/templates/file_view.html
@@ -97,7 +97,7 @@ Raw Object:
</div>
<div class="two ui buttons bottom attached">
- <a href="/file/{{ file.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/file/{{ file.ident }}/edit" class="ui blue button"><strike>Edit Metadata</strike></a>
<a href="/file/{{ file.ident }}/history" class="ui button">View History</a>
</div>
diff --git a/python/fatcat/templates/home.html b/python/fatcat/templates/home.html
index 4d3b44a1..e5a77930 100644
--- a/python/fatcat/templates/home.html
+++ b/python/fatcat/templates/home.html
@@ -29,14 +29,12 @@ indexing (aka, linking together of pre-prints and final copies).
<table class="ui single line table">
<thead>
<tr><th>Entity
- <th>Actions
<th>Examples
<th>Lookup
</thead>
<tr><td><b>Release</b>
<br>journal article, pre-print, book
<br>published version of a Work
- <td><a href="/release/create">Create</a>
<td><a href="/release/aaaaaaaaaaaaarceaaaaaaaaai">Dummy</a>
<br><a href="/release/aaaaaaaaaaaaarceaaaaaaaaam">Realistic</a>
<td><form class="" role="lookup" action="/release/lookup" method="get">
@@ -47,7 +45,6 @@ indexing (aka, linking together of pre-prints and final copies).
</form>
<tr><td><b>Container</b>
<br>journal or serial
- <td><a href="/container/create">Create</a>
<td><a href="/container/aaaaaaaaaaaaaeiraaaaaaaaai">Dummy</a>
<br><a href="/container/aaaaaaaaaaaaaeiraaaaaaaaam">Realistic</a>
<td><form class="" role="lookup" action="/container/lookup" method="get">
@@ -59,7 +56,6 @@ indexing (aka, linking together of pre-prints and final copies).
<tr><td><b>Creator</b>
<br>authors, editors, translators
- <td><!-- <a href="/creator/create">Create</a> -->
<td><a href="/creator/aaaaaaaaaaaaaircaaaaaaaaai">Dummy</a>
<br><a href="/creator/aaaaaaaaaaaaaircaaaaaaaaam">Realistic</a>
<td><form class="" role="lookup" action="/creator/lookup" method="get">
@@ -70,7 +66,6 @@ indexing (aka, linking together of pre-prints and final copies).
</form>
<tr><td><b>File</b>
<br>specific digital blobs (immutable)
- <td>
<td><a href="/file/aaaaaaaaaaaaamztaaaaaaaaai">Dummy</a>
<br><a href="/file/aaaaaaaaaaaaamztaaaaaaaaam">Realistic</a>
<td><form class="" role="lookup" action="/file/lookup" method="get">
@@ -81,7 +76,6 @@ indexing (aka, linking together of pre-prints and final copies).
</form>
<tr><td><b>Work</b>
<br>for grouping Releases
- <td>
<td><a href="/work/aaaaaaaaaaaaavkvaaaaaaaaai">Dummy</a>
<br><a href="/work/aaaaaaaaaaaaavkvaaaaaaaaam">Realistic</a>
<td>
diff --git a/python/fatcat/templates/release_view.html b/python/fatcat/templates/release_view.html
index a4b3e2bb..c86eac75 100644
--- a/python/fatcat/templates/release_view.html
+++ b/python/fatcat/templates/release_view.html
@@ -273,7 +273,7 @@ This release citing other releases.
</div>
<div class="two ui buttons bottom attached">
- <a href="/release/{{ release.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/release/{{ release.ident }}/edit" class="ui blue button"><strike>Edit Metadata</strike></a>
<a href="/release/{{ release.ident }}/history" class="ui button">View History</a>
</div>
diff --git a/python/fatcat/templates/work_view.html b/python/fatcat/templates/work_view.html
index 87120e63..949ca769 100644
--- a/python/fatcat/templates/work_view.html
+++ b/python/fatcat/templates/work_view.html
@@ -62,7 +62,7 @@ still reference the same underlying "work".
</div>
<div class="two ui buttons bottom attached">
- <a href="/work/{{ work.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/work/{{ work.ident }}/edit" class="ui blue button"><strike>Edit Metadata</strike></a>
<a href="/work/{{ work.ident }}/history" class="ui button">View History</a>
</div>