Skip to content

Commit

Permalink
Add button labels, fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Apr 27, 2018
1 parent f065ebe commit 2b72bbb
Showing 1 changed file with 40 additions and 44 deletions.
84 changes: 40 additions & 44 deletions client/galaxy/scripts/components/Sharing.vue
Expand Up @@ -7,13 +7,13 @@
{{ err_msg }}
</div>
<form class="form-group">
<label/>
<input class="form-control" type="text" v-model="username"/>
<label/>
<input class="form-control" type="text" v-model="username"/>
</form>
<button type="submit" class="btn btn-primary" @click="setUsername()">Set Username</button>
</div>
<div v-else>
<br/>
<br/><br/>
<h3>Make {{item_class_name}} Accessible via Link and Publish It</h3>
<div v-if="item_importable">
This {{item_class_name_lc}} is currently <strong>{{item_status}}</strong>.
Expand All @@ -26,35 +26,33 @@
<p>This {{item_class_name_lc}} is publicly listed and searchable in Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section. You can:</p>
</div>
</div>
<form :action="sharing_url" method="POST">
<div v-if="!item_published">
<!-- Item is importable but not published. User can disable importable or publish. -->
<input class="action-button" type="submit" name="disable_link_access" value="Disable Access"/>
<div class="toolParamHelp">Disables {{item_class_name_lc}}'s link so that it is not accessible.</div>
<br/>
<div class="toolParamHelp">Publishes the {{item_class_name_lc}} to Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section, where it is publicly listed and searchable.</div>
<br/>
</div>
<div v-else>
<!-- Item is importable and published. User can unpublish or disable import and unpublish. -->
<input class="action-button" type="submit" name="unpublish" value="Unpublish">
<div class="toolParamHelp">Removes this {{item_class_name_lc}} from Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section so that it is not publicly listed or searchable.</div>
<br />
<input class="action-button" type="submit" name="disable_link_access_and_unpublish" value="Disable Access via Link and Unpublish">
<div class="toolParamHelp">Disables this {{item_class_name_lc}}'s link so that it is not accessible and removes {{item_class_name_lc}} from Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section so that it is not publicly listed or searchable.</div>
</div>
</form>
<div v-if="!item_published">
<!-- Item is importable but not published. User can disable importable or publish. -->
<button @click="disableLink">Disable Access to {{item_class_name}} Link</button>
<div class="toolParamHelp">Disables {{item_class_name_lc}}'s link so that it is not accessible.</div>
<br/>
<button @click="enablePublish">Publish {{item_class_name}}</button>
<div class="toolParamHelp">Publishes the {{item_class_name_lc}} to Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section, where it is publicly listed and searchable.</div>
<br/>
</div>
<div v-else>
<!-- Item is importable and published. User can unpublish or disable import and unpublish. -->
<button @click="disablePublish">Unpublish {{item_class_name}}</button>
<div class="toolParamHelp">Removes this {{item_class_name_lc}} from Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section so that it is not publicly listed or searchable.</div>
<br/>
<button @click="disableLinkPublish">Disable Access to {{item_class_name}} via Link and Unpublish</button>
<div class="toolParamHelp">Disables this {{item_class_name_lc}}'s link so that it is not accessible and removes {{item_class_name_lc}} from Galaxy's <a :href="list_url" target="_top">Published {{item_class_plural_name}}</a> section so that it is not publicly listed or searchable.</div>
</div>
</div>
<div v-else>
<p>This {{item_class_name_lc}} is currently restricted so that only you and the users listed below can access it. You can:</p>
<form :action="sharing_url" method="POST">
<input class="action-button" type="submit" name="make_accessible_via_link" value="Make Accessible via Link">
<div class="toolParamHelp">Generates a web link that you can share with other people so that they can view and import the {{item_class_name_lc}}.</div>
<br/>
<input class="action-button" type="submit" name="make_accessible_and_publish" value="Make Accessible and Publish" method="POST">
<div class="toolParamHelp">Makes the {{item_class_name_lc}} accessible via link (see above) and publishes the {{item_class_name_lc}} to Galaxy's <a href='list_url' target='_top'>Published {{item_class_plural_name}}</a> section, where it is publicly listed and searchable.</div>
</form>
<button @click="enableLink">Make {{item_class_name}} Accessible via Link</button>
<div class="toolParamHelp">Generates a web link that you can share with other people so that they can view and import the {{item_class_name_lc}}.</div>
<br/>
<button @click="enableLinkPublish">Make {{item_class_name}} Accessible and Publish</button>
<div class="toolParamHelp">Makes the {{item_class_name_lc}} accessible via link (see above) and publishes the {{item_class_name_lc}} to Galaxy's <a href='list_url' target='_top'>Published {{item_class_plural_name}}</a> section, where it is publicly listed and searchable.</div>
</div>
<br/><br/>
<h3>Share {{item_class_name}} with Individual Users</h3>
<div>
<div v-if="item_users_shared_with">
Expand All @@ -64,24 +62,10 @@
<table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr class="header">
<th>Email</th>
<th></th>
<th/>
</tr>
<div v-for="i, association in enumerate( item.users_shared_with )">
<!-- user = association.user -->
<tr>
<td>
<div class="menubutton popup" :id="`user-${i}-popup`">{{user.email}}</div>
</td>
<td>
<div popupmenu="`user-${i}-popup`">
<!-- {{h.url_for(controller=controller_name, action='sharing', id=trans.security.encode_id( item.id ), unshare_user=trans.security.encode_id( user.id ), use_panels=use_panels )} -->
<a class="action-button" href="">Unshare</a>
</div>
</td>
</tr>
</div>
</table>
<a id="share_with_a_user" class="action-button :href="share_url">
<a id="share_with_a_user" class="action-button" :href="share_url">
<span>Share with another user</span>
</a>
</div>
Expand Down Expand Up @@ -153,6 +137,18 @@ export default {
})
.then(response => this.has_username = true)
.catch(error => this.err_msg = error.response.data.err_msg);
},
enableLink: function() {
},
disableLink: function() {
},
enablePublish: function() {
},
disablePublish: function() {
},
enableLinkPublish: function() {
},
disableLinkPublish: function() {
}
},
updated: function() {
Expand Down

0 comments on commit 2b72bbb

Please sign in to comment.