Ignore:
Timestamp:
Jun 7, 2013, 2:41:14 PM (11 years ago)
Author:
plg
Message:

New feature: user album. Only for registered users, no recursivity. Piwigo
will automatically create an upload album for each user with appropriate
community permissions, at first connection.

Bug fixed: on activation, do not create a new "Community" album if it already
exists.

Bug fixed: remove debug for quota

Bug fixed: round corners for number of pending pictures in admin menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/admin_permissions.tpl

    r23037 r23085  
    6060    $("[name^=who_]").hide();
    6161    $("[name=who_"+$(this).attr("value")+"]").show();
    62   });
     62    checkWhoOptions();
     63  });
     64
     65  function checkWhoOptions() {
     66    if ('any_visitor' == $("select[name=who] option:selected").val()) {
     67      $("#userAlbumOption").attr("disabled", true);
     68      $("#userAlbumInfo").hide();
     69
     70      if (-1 == $("select[name=category] option:selected").val()) {
     71        $("select[name=category]").val("0");
     72        checkWhereOptions();
     73      }
     74    }
     75    else {
     76      $("#userAlbumOption").attr("disabled", false);
     77      $("#userAlbumInfo").show();
     78    }
     79  }
     80  checkWhoOptions();
    6381
    6482  function checkWhereOptions() {
     
    6987      $(recursive).attr("disabled", true);
    7088      $(recursive).attr('checked', true);
     89    }
     90    else if ($("select[name=category] option:selected").val() == -1) {
     91      /* user upload only */
     92      $(recursive).attr("disabled", true).attr('checked', false);
     93      $(create).attr("disabled", true).attr('checked', false);
    7194    }
    7295    else {
     
    207230
    208231    <p>
    209       <strong>{'Where?'|@translate}</strong>
     232      <strong>{'Where?'|@translate}</strong> {if $community_conf.user_albums}<em id="userAlbumInfo">{'(in addition to user album)'|@translate}</em>{/if}
    210233      <br>
    211234      <select class="categoryDropDown" name="category">
    212         <option value="0" {if not isset($category_options_selected)}selected="selected"{/if}>{'The whole gallery'|@translate}</option>
     235{if $community_conf.user_albums}
     236        <option value="-1"{if $user_album_selected} selected="selected"{/if} id="userAlbumOption">{'User album only'|@translate}</option>
     237{/if}
     238        <option value="0"{if $whole_gallery_selected} selected="selected"{/if}>{'The whole gallery'|@translate}</option>
    213239        <option disabled="disabled">------------</option>
    214240        {html_options options=$category_options selected=$category_options_selected}
Note: See TracChangeset for help on using the changeset viewer.