Skip to content

Commit

Permalink
[#1188] Allow organization dropdown to be displayed
Browse files Browse the repository at this point in the history
The current logic was unclear. If a user belongs to at least one
organization, the dropdown will be displayed, both on the created and
edit forms. Same for the visibility one.
  • Loading branch information
amercader committed Jan 8, 2014
1 parent 2879b92 commit 6cb9a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/templates/package/snippets/package_basic_fields.html
Expand Up @@ -56,8 +56,8 @@
{% set dataset_has_organization = data.owner_org or data.group_id %}
{% set organizations_available = h.organizations_available('create_dataset') %}
{% set user_is_sysadmin = h.check_access('sysadmin') %}
{% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %}
{% set show_visibility_selector = dataset_has_organization or (organizations_available and (user_is_sysadmin or dataset_is_draft)) %}
{% set show_organizations_selector = organizations_available %}
{% set show_visibility_selector = dataset_has_organization or organizations_available %}

{% if show_organizations_selector and show_visibility_selector %}
<div data-module="dataset-visibility">
Expand Down

0 comments on commit 6cb9a97

Please sign in to comment.