interface and css more or less ready
parent
9dcdb93ef1
commit
6e7369586f
|
@ -117,4 +117,13 @@
|
|||
}
|
||||
.shared-with-list .edit-options {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.share-interface-container.internal-share::after {
|
||||
width:75%;
|
||||
height:0px;
|
||||
display:block;
|
||||
content:" ";
|
||||
margin:0.2em auto 0.5em auto;
|
||||
border-top:solid 1px #ddd;
|
||||
}
|
|
@ -1,62 +1,3 @@
|
|||
<?php /*
|
||||
<div id="dropdown" class="drop" data-item-type="calendar" data-item-source="1">
|
||||
|
||||
<input id="shareWith" type="text" placeholder="Share with user or group …" class="ui-autocomplete-input" autocomplete="off">
|
||||
|
||||
<ul id="shareWithList">
|
||||
<li style="clear: both;" data-share-type="1" data-share-with="test-group" title="test-group">
|
||||
<a href="#" class="unshare">
|
||||
<img class="svg" alt="Unshare" src="/core/img/actions/delete.svg">
|
||||
</a>
|
||||
<span class="username">test-group (group)</span>
|
||||
<label>
|
||||
<input type="checkbox" name="edit" class="permissions" checked="checked">can edit<a href="#" class="showCruds">
|
||||
<img class="svg" alt="access control" src="/core/img/actions/triangle-s.svg">
|
||||
</a>
|
||||
</label>
|
||||
<div class="cruds" style="display:none;">
|
||||
<label><input type="checkbox" name="create" class="permissions" checked="checked" data-permissions="4">create</label>
|
||||
<label><input type="checkbox" name="update" class="permissions" checked="checked" data-permissions="2">update</label>
|
||||
<label><input type="checkbox" name="delete" class="permissions" checked="checked" data-permissions="8">delete</label>
|
||||
<label><input type="checkbox" name="share" class="permissions" checked="checked" data-permissions="16">share</label>
|
||||
</div>
|
||||
</li>
|
||||
<li style="clear: both;" data-share-type="0" data-share-with="Tester" title="Tester">
|
||||
<a href="#" class="unshare">
|
||||
<img class="svg" alt="Unshare" src="/core/img/actions/delete.svg">
|
||||
</a>
|
||||
<span class="username">Tester</span>
|
||||
<label>
|
||||
<input type="checkbox" name="edit" class="permissions" checked="checked">can edit<a href="#" class="showCruds">
|
||||
<img class="svg" alt="access control" src="/core/img/actions/triangle-s.svg">
|
||||
</a>
|
||||
</label>
|
||||
<div class="cruds" style="display:none;">
|
||||
<label><input type="checkbox" name="create" class="permissions" checked="checked" data-permissions="4">create</label>
|
||||
<label><input type="checkbox" name="update" class="permissions" checked="checked" data-permissions="2">update</label>
|
||||
<label><input type="checkbox" name="delete" class="permissions" checked="checked" data-permissions="8">delete</label>
|
||||
<label><input type="checkbox" name="share" class="permissions" checked="checked" data-permissions="16">share</label>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="tabs-5" aria-labelledby="ui-id-4" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="true" aria-hidden="false" style="display: block;">
|
||||
|
||||
<input type="text" id="sharewith" placeholder="Share with user or group" data-item-source="1" class="ui-autocomplete-input" autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
|
||||
|
||||
<ul class="sharedby eventlist">
|
||||
<li data-share-with="Tester" data-item="1" data-item-type="event" data-link="true" data-permissions="17" data-share-type="0">Tester<span class="shareactions">
|
||||
<label><input class="update" type="checkbox">can edit</label>
|
||||
<label><input class="share" type="checkbox" checked=""checked"">can share</label>
|
||||
<img src="/core/img/actions/delete.svg" class="svg action delete" title="Unshare">
|
||||
</span></li>
|
||||
</ul>*/ ?>
|
||||
|
||||
|
||||
<div class="share-interface-container internal-share">
|
||||
<input type="text" class="share-with ui-autocomplete-input"
|
||||
placeholder="<?php p($l->t('Share with user or group')); ?>"
|
||||
|
@ -79,55 +20,35 @@
|
|||
<img class="svg" alt="<?php p($l->t('Unshare')); ?>" src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')); ?>">
|
||||
</a>
|
||||
<div class="displayable-container share-options">
|
||||
<!-- "can edit" info checkbox -->
|
||||
<input type="checkbox" name="edit" class="permissions" checked="checked" disabled="disabled"/>
|
||||
<!--
|
||||
"can edit" checkbox
|
||||
- if the item type allows for precise sharing settings (update, create, delete), just an info box, readonly/disabled
|
||||
- if the item type allows only for editable/uneditable (actually, just update) setting, a valid checkbox
|
||||
this is checked via $_['basic_edit_options'] flag (if set and true, only editable/uneditable setting available)
|
||||
-->
|
||||
<input type="checkbox" class="permissions"
|
||||
<?php if(empty($_['basic_edit_options'])): ?>
|
||||
name="edit" checked="checked" disabled="disabled"
|
||||
<?php else: ?>
|
||||
name="update" <?php p(($sharee['permissions'] & OCP\PERMISSION_UPDATE?'checked="checked"':''))?> id="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>"
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<!-- "can edit" displayable-control label -->
|
||||
<label for="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>"><?php p($l->t('can edit')); ?><img class="svg" alt="access control" src="<?php p(OCP\Util::imagePath('core', 'actions/triangle-s.svg')); ?>"></label>
|
||||
<label for="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>"><?php p($l->t('can edit')); ?><?php if(empty($_['basic_edit_options'])): ?><img class="svg" alt="access control" src="<?php p(OCP\Util::imagePath('core', 'actions/triangle-s.svg')); ?>"><?php endif; ?></label>
|
||||
<!-- "can share" label and checkbox -->
|
||||
<label class="share-label"><input type="checkbox" name="share" class="permissions" data-permissions="16" <?php p(($sharee['permissions'] & OCP\PERMISSION_SHARE?'checked="checked"':''))?>><?php p($l->t('can share')); ?></label>
|
||||
<!-- edit options displayable control and displayable itself -->
|
||||
<input type="checkbox" class="displayable-control hide" name="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>" id="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>"/>
|
||||
<div class="displayable edit-options">
|
||||
<label><input type="checkbox" name="create" class="permissions" data-permissions="4" <?php p(($sharee['permissions'] & OCP\PERMISSION_CREATE?'checked="checked"':''))?>><?php p($l->t('create')); ?></label>
|
||||
<label><input type="checkbox" name="update" class="permissions" data-permissions="2" <?php p(($sharee['permissions'] & OCP\PERMISSION_UPDATE?'checked="checked"':''))?>><?php p($l->t('update')); ?></label>
|
||||
<label><input type="checkbox" name="delete" class="permissions" data-permissions="8" <?php p(($sharee['permissions'] & OCP\PERMISSION_DELETE?'checked="checked"':''))?>><?php p($l->t('delete')); ?></label>
|
||||
</div>
|
||||
<!-- if we only have basic edit options available, there is no need for the advanced edit options controls, right? display these only when not in basic edit options regime -->
|
||||
<?php if(empty($_['basic_edit_options'])): ?>
|
||||
<!-- edit options displayable control and displayable itself -->
|
||||
<input type="checkbox" class="displayable-control hide" name="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>" id="share-can-edit-<?php p($_['item_type']); ?>-<?php p($_['item_id']); ?>-<?php p($i); ?>"/>
|
||||
<div class="displayable edit-options">
|
||||
<label><input type="checkbox" name="create" class="permissions" data-permissions="4" <?php p(($sharee['permissions'] & OCP\PERMISSION_CREATE?'checked="checked"':''))?>><?php p($l->t('create')); ?></label>
|
||||
<label><input type="checkbox" name="update" class="permissions" data-permissions="2" <?php p(($sharee['permissions'] & OCP\PERMISSION_UPDATE?'checked="checked"':''))?>><?php p($l->t('update')); ?></label>
|
||||
<label><input type="checkbox" name="delete" class="permissions" data-permissions="8" <?php p(($sharee['permissions'] & OCP\PERMISSION_DELETE?'checked="checked"':''))?>><?php p($l->t('delete')); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php /*
|
||||
<ul class="sharedby eventlist">
|
||||
<?php foreach($eventsharees as $sharee): ?>
|
||||
<li data-share-with="<?php p($sharee['share_with']); ?>"
|
||||
data-item="<?php p($eventid); ?>"
|
||||
data-item-type="event"
|
||||
data-link="true"
|
||||
data-permissions="<?php p($sharee['permissions']); ?>"
|
||||
data-share-type="<?php p($sharee['share_type']); ?>">
|
||||
<?php p($sharee['share_with'] . ($sharee['share_type'] == OCP\Share::SHARE_TYPE_GROUP ? ' (group)' : '')); ?>
|
||||
<span class="shareactions">
|
||||
<label>
|
||||
<input class="update" type="checkbox" <?php p(($sharee['permissions'] & OCP\PERMISSION_UPDATE?'checked="checked"':''))?>>
|
||||
|
||||
</label>
|
||||
<label>
|
||||
<input class="share" type="checkbox" >
|
||||
<?php p($l->t('can share')); ?>
|
||||
</label>
|
||||
<img src="" class="svg action delete"
|
||||
title="">
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if(!$eventsharees) {
|
||||
$nobody = $l->t('Not shared with anyone');
|
||||
print_unescaped('<div id="sharedWithNobody">' . OC_Util::sanitizeHTML($nobody) . '</div>');
|
||||
} ?>
|
||||
<br />
|
||||
<input type="button" id="sendemailbutton" style="float:right;" class="submit" value="<?php p($l->t("Send Email")); ?>" data-eventid="<?php p($eventid);?>" data-location="<?php p($location);?>" data-description="<?php p($description);?>" data-dtstart="<?php p($dtstart);?>" data-dtend="<?php p($dtend);?>">
|
||||
<br /> */ ?>
|
||||
</div>
|
|
@ -39,50 +39,20 @@ if(is_array($sharedwithByEvent)) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<input type="text" id="sharewith"
|
||||
placeholder="<?php p($l->t('Share with user or group')); ?>"
|
||||
data-item-source="<?php p($eventid); ?>" />
|
||||
|
||||
<ul class="sharedby eventlist">
|
||||
<?php foreach($eventsharees as $sharee): ?>
|
||||
<li data-share-with="<?php p($sharee['share_with']); ?>"
|
||||
data-item="<?php p($eventid); ?>"
|
||||
data-item-type="event"
|
||||
data-link="true"
|
||||
data-permissions="<?php p($sharee['permissions']); ?>"
|
||||
data-share-type="<?php p($sharee['share_type']); ?>">
|
||||
<?php p($sharee['share_with'] . ($sharee['share_type'] == OCP\Share::SHARE_TYPE_GROUP ? ' (group)' : '')); ?>
|
||||
<span class="shareactions">
|
||||
<label>
|
||||
<input class="update" type="checkbox" <?php p(($sharee['permissions'] & OCP\PERMISSION_UPDATE?'checked="checked"':''))?>>
|
||||
<?php p($l->t('can edit')); ?>
|
||||
</label>
|
||||
<label>
|
||||
<input class="share" type="checkbox" <?php p(($sharee['permissions'] & OCP\PERMISSION_SHARE?'checked="checked"':''))?>>
|
||||
<?php p($l->t('can share')); ?>
|
||||
</label>
|
||||
<img src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')); ?>" class="svg action delete"
|
||||
title="<?php p($l->t('Unshare')); ?>">
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if(!$eventsharees) {
|
||||
$nobody = $l->t('Not shared with anyone');
|
||||
print_unescaped('<div id="sharedWithNobody">' . OC_Util::sanitizeHTML($nobody) . '</div>');
|
||||
} ?>
|
||||
<br />
|
||||
<input type="button" id="sendemailbutton" style="float:right;" class="submit" value="<?php p($l->t("Send Email")); ?>" data-eventid="<?php p($eventid);?>" data-location="<?php p($location);?>" data-description="<?php p($description);?>" data-dtstart="<?php p($dtstart);?>" data-dtend="<?php p($dtend);?>">
|
||||
<br /><?php
|
||||
/* sharing an event internally */
|
||||
$tmpl = new OCP\Template('calendar', 'part.internalshare');
|
||||
$tmpl->assign('item_id', $_['eventid']);
|
||||
$tmpl->assign('item_type', 'event');
|
||||
$tmpl->assign('permissions', $_['permissions']);
|
||||
$tmpl->assign('basic_edit_options', true);
|
||||
$tmpl->assign('shared_with', $eventsharees);
|
||||
$tmpl->printpage();
|
||||
/* link-sharing an event */
|
||||
$tmpl = new OCP\Template('calendar', 'part.linkshare');
|
||||
$tmpl->assign('item_id', $_['eventid']);
|
||||
$tmpl->assign('item_type', 'event');
|
||||
$tmpl->assign('permissions', $_['permissions']);
|
||||
$tmpl->assign('link_share', $linkShare);
|
||||
//$tmpl->assign('shared', $shared);
|
||||
$tmpl->printpage();
|
||||
/* end link-sharing an event */
|
||||
?><br />
|
||||
|
|
Loading…
Reference in New Issue