Changeset 7800


Ignore:
Timestamp:
Apr 30, 2020, 9:33:55 AM (21 months ago)
Author:
Nicklas Nordborg
Message:

Fixes #2208: Add option to create a private item list

Location:
branches/3.16-stable/www/views/itemlists
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.16-stable/www/views/itemlists/edit_list.jsp

    r7747 r7800  
    222222        </td>
    223223      </tr>
     224      <%
     225      // NOTE! We can't just check sc.getActiveProjectId() since the user may not have USE permission
     226      if (itemId == 0 && (sc.getProjectKeyId() != 0 || sc.getItemKeyId() != 0))
     227      {
     228        %>
     229        <tr>
     230          <th>Private list?</th>
     231          <td>
     232            <label><input type="radio" name="private" value="1">Yes</label>
     233            <label><input type="radio" name="private" value="0" checked>Shared to <i><%=HTML.encodeTags(sc.getActiveProjectName()) %></i></label>
     234          </td>
     235          <td></td>
     236        </tr>
     237        <%
     238      }
     239      %>
    224240      <tr>
    225241        <th>External ID</th>
  • branches/3.16-stable/www/views/itemlists/index.jsp

    r7747 r7800  
    229229      Item memberType = Item.valueOf(request.getParameter("memberType"));
    230230      list = ItemList.getNew(dc, memberType);
     231      if (Values.getBoolean(request.getParameter("private")))
     232      {
     233        list.setProjectKey(null);
     234        list.setItemKey(null);
     235      }
    231236      dc.saveItem(list);
    232237     
Note: See TracChangeset for help on using the changeset viewer.