Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restores editor logic in view. Removes collector logic. Fixes #1477
- Loading branch information
1 parent
1e04e5c
commit 2dd3b5f
Showing
4 changed files
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
<%# TODO: set these variables based on the current user | ||
# See https://github.com/projecthydra/sufia/issues/1477 %> | ||
<% collector = true %> | ||
<% editor = true %> | ||
<% if collector || editor %> | ||
<div class="form-actions"> | ||
<% if Sufia.config.analytics %> | ||
<%= link_to "Analytics", sufia.stats_work_path(@presenter), id: 'stats', class: 'btn btn-default' %> | ||
<% end %> | ||
<% if Sufia.config.citations %> | ||
<%= link_to "Citations", sufia.citations_work_path(@presenter), id: 'citations', class: 'btn btn-default' %> | ||
<% end %> | ||
<% if editor %> | ||
<%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %> | ||
<%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %> | ||
<% end %> | ||
<%= link_to 'Export to EndNote', polymorphic_path([main_app, @presenter], format: 'endnote'), class: 'btn btn-default' %> | ||
<%= link_to 'Export to Zotero', sufia.static_path('zotero'), id: 'zoteroLink', name: 'zotero', class: 'btn btn-default' %> | ||
<%= link_to 'Export to Mendeley', sufia.static_path('mendeley'), id: 'mendeleyLink', name: 'mendeley', class: 'btn btn-default' %> | ||
<!-- COinS hook for Zotero --> | ||
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(@presenter) %>"></span> | ||
</div> | ||
<% end %> | ||
<div class="form-actions"> | ||
<% if Sufia.config.analytics %> | ||
<%= link_to "Analytics", sufia.stats_work_path(@presenter), id: 'stats', class: 'btn btn-default' %> | ||
<% end %> | ||
<% if Sufia.config.citations %> | ||
<%= link_to "Citations", sufia.citations_work_path(@presenter), id: 'citations', class: 'btn btn-default' %> | ||
<% end %> | ||
<% if @presenter.editor? %> | ||
<%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %> | ||
<%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %> | ||
<% end %> | ||
<%= link_to 'Export to EndNote', polymorphic_path([main_app, @presenter], format: 'endnote'), class: 'btn btn-default' %> | ||
<%= link_to 'Export to Zotero', sufia.static_path('zotero'), id: 'zoteroLink', name: 'zotero', class: 'btn btn-default' %> | ||
<%= link_to 'Export to Mendeley', sufia.static_path('mendeley'), id: 'mendeleyLink', name: 'mendeley', class: 'btn btn-default' %> | ||
<!-- COinS hook for Zotero --> | ||
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(@presenter) %>"></span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters