diff options
Diffstat (limited to 'mod/bookmarks/views/default/bookmarks')
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/bookmarklet.php | 32 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/css.php | 125 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/form.php | 139 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/owner_block.php | 9 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/sharing.php | 80 |
5 files changed, 385 insertions, 0 deletions
diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php new file mode 100644 index 000000000..b7a4757f6 --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php @@ -0,0 +1,32 @@ +<?php + + /** + * Elgg get bookmarks bookmarklet view + * + * @package ElggBookmarks + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider <info@elgg.com> + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + + $page_owner = $vars['pg_owner']; + + $bookmarktext = elgg_echo("bookmarks:this"); + if ($page_owner instanceof ElggGroup) + $bookmarktext = sprintf(elgg_echo("bookmarks:this:group"), $page_owner->name) +?> + <div class="contentWrapper"> + <p> + <?php echo elgg_echo("bookmarks:bookmarklet:description"); ?> + </p> + <p class="sharing_bookmarklet"> + <a href="javascript:location.href='<?php echo $vars['url']; ?>pg/bookmarks/<?php echo $page_owner->username; ?>/add?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"> <img src="<?php echo $vars['url']; ?>_graphics/elgg_bookmarklet.gif" border="0" title="<?php echo $bookmarktext ?>" /> </a> + </p> + <p> + <?php echo elgg_echo("bookmarks:bookmarklet:descriptionie"); ?> + </p> + <p> + <?php echo elgg_echo("bookmarks:bookmarklet:description:conclusion"); ?> + </p> + </div>
\ No newline at end of file diff --git a/mod/bookmarks/views/default/bookmarks/css.php b/mod/bookmarks/views/default/bookmarks/css.php new file mode 100644 index 000000000..71d2d9ed6 --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/css.php @@ -0,0 +1,125 @@ +<?php + + /** + * Elgg bookmarks CSS + * + * @package ElggBookmarks + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider <info@elgg.com> + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +?> + +.sharing_item { + +} + +.sharing_item_owner { + font-size: 90%; + margin: 10px 0 0 0; + color:#666666; +} + +.sharing_item_owner .icon { + float: left; + margin-right: 5px; + +} +.sharing_item_title h3 { + font-size: 150%; + margin-bottom: 5px; +} +.sharing_item_title h3 a { + text-decoration: none; +} +.sharing_item_description p { + margin:0; + padding:0 0 5px 0; +} +.sharing_item_tags { + background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px; + margin:0; + padding:0 0 0 14px; +} + +.sharing_item_address a { + font: 12px/100% Arial, Helvetica, sans-serif; + font-weight: bold; + color: #ffffff; + background:#4690d6; + border: 1px solid #4690d6; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + width: auto; + height: 25px; + padding: 2px 6px 2px 6px; + margin:10px 0 10px 0; + cursor: pointer; +} +.sharing_item_address a:hover { + background: #0054a7; + border: 1px solid #0054a7; + text-decoration: none; +} +.sharing_item_controls p { + margin:0; +} + + + +/* SHARES WIDGET VIEW */ +.shares_widget_wrapper { + background-color: white; + margin:0 10px 5px 10px; + padding:5px; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; +} +.shares_widget_icon { + float: left; + margin-right: 10px; +} +.shares_timestamp { + color:#666666; + margin:0; +} +.share_desc { + display:none; + line-height: 1.2em; +} +.shares_widget_content { + margin-left: 35px; +} +.shares_title { + margin:0; + line-height: 1.2em; +} + +/* timestamp and user info in gallery and list view */ +.search_listing_info .shares_gallery_user, +.share_gallery_info .shares_gallery_user, +.share_gallery_info .shares_gallery_comments { + color:#666666; + margin:0; + font-size: 90%; +} + + +/* *************************************** +PAGE-OWNER BLOCK +*************************************** */ +#owner_block_bookmark_this { + padding:5px 0 0 0; +} +#owner_block_bookmark_this a { + font-size: 90%; + color:#999999; + padding:0 0 4px 20px; + background: url(<?php echo $vars['url']; ?>_graphics/icon_bookmarkthis.gif) no-repeat left top; +} +#owner_block_bookmark_this a:hover { + color: #0054a7; +} + diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php new file mode 100644 index 000000000..94897d0b0 --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/form.php @@ -0,0 +1,139 @@ +<?php + + /** + * Elgg bookmarks plugin form + * + * @package ElggBookmarks + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider <info@elgg.com> + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + + // Have we been supplied with an entity? + if (isset($vars['entity'])) { + + $guid = $vars['entity']->getGUID(); + $title = $vars['entity']->title; + $description = $vars['entity']->description; + $address = $vars['entity']->address; + $tags = $vars['entity']->tags; + $access_id = $vars['entity']->access_id; + $shares = $vars['entity']->shares; + $owner = $vars['entity']->getOwnerEntity(); + $highlight = 'default'; + + } else { + + $guid = 0; + $title = get_input('title',""); + $description = ""; + $address = get_input('address',""); + $highlight = 'all'; + + if ($address == "previous") + $address = $_SERVER['HTTP_REFERER']; + $tags = array(); + + if (defined('ACCESS_DEFAULT')) + $access_id = ACCESS_DEFAULT; + else + $access_id = 0; + $shares = array(); + $owner = $vars['user']; + + } + +?> +<div class="contentWrapper"> + <form action="<?php echo $vars['url']; ?>action/bookmarks/add" method="post"> + <?php echo elgg_view('input/securitytoken'); ?> + <p> + <label> + <?php echo elgg_echo('title'); ?> + <?php + + echo elgg_view('input/text',array( + 'internalname' => 'title', + 'value' => $title, + )); + + ?> + </label> + </p> + <p> + <label> + <?php echo elgg_echo('bookmarks:address'); ?> + <?php + + echo elgg_view('input/url',array( + 'internalname' => 'address', + 'value' => $address, + )); + + ?> + </label> + </p> + <p class="longtext_editarea"> + <label> + <?php echo elgg_echo('description'); ?> + <br /> + <?php + + echo elgg_view('input/longtext',array( + 'internalname' => 'description', + 'value' => $description, + )); + + ?> + </label> + </p> + <p> + <label> + <?php echo elgg_echo('tags'); ?> + <?php + + echo elgg_view('input/tags',array( + 'internalname' => 'tags', + 'value' => $tags, + )); + + ?> + </label> + </p> + <?php + + //echo elgg_view('bookmarks/sharing',array('shares' => $shares, 'owner' => $owner)); + if ($friends = elgg_get_entities_from_relationship(array('relationship' => 'friend', 'relationship_guid' => $owner->getGUID(), 'inverse_relationship' => FALSE, 'type' => 'user', 'limit' => 9999))) { +?> + <p> + <label><?php echo elgg_echo("bookmarks:with"); ?></label><br /> +<?php + echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'shares', 'highlight' => $highlight)); +?> + </p> +<?php + } + + ?> + <p> + <label> + <?php echo elgg_echo('access'); ?> + <?php + + echo elgg_view('input/access',array( + 'internalname' => 'access', + 'value' => $access_id, + )); + + ?> + </label> + </p> + <p> + <?php echo $vars['container_guid'] ? elgg_view('input/hidden', array('internalname' => 'container_guid', 'value' => $vars['container_guid'])) : ""; ?> + <input type="hidden" name="bookmark_guid" value="<?php echo $guid; ?>" /> + <input type="submit" value="<?php echo elgg_echo('save'); ?>" /> + </p> + + </form> +</div>
\ No newline at end of file diff --git a/mod/bookmarks/views/default/bookmarks/owner_block.php b/mod/bookmarks/views/default/bookmarks/owner_block.php new file mode 100644 index 000000000..2cc8f6118 --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/owner_block.php @@ -0,0 +1,9 @@ +<?php + +$label = elgg_echo('bookmarks:this'); +$url = "'" . $vars['url'] . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"; + +?> +<div id="owner_block_bookmark_this"> +<a href="javascript:location.href=<?php echo $url; ?>"><?php echo $label ?></a> +</div> diff --git a/mod/bookmarks/views/default/bookmarks/sharing.php b/mod/bookmarks/views/default/bookmarks/sharing.php new file mode 100644 index 000000000..63738d94d --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/sharing.php @@ -0,0 +1,80 @@ +<?php + + $owner = $vars['owner']; + if ($friends = elgg_get_entities_from_relationship(array('relationship' => 'friend', 'relationship_guid' => $owner->getGUID(), 'inverse_relationship' => FALSE, 'type' => 'user', 'limit' => 9999))) { + +?> + +<table border="0" cellspacing="0" cellpadding="0"> + +<?php + + $col = 0; + foreach($friends as $friend) { + + if ($col == 0) echo "<tr>"; + + $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny')); + $options[$label] = $friend->getGUID(); + +?> + + <td> + + <input type="checkbox" name="shares[]" value="<?php echo $options[$label]; ?>" /> + + </td> + + <td > + + <div style="width: 25px; margin-bottom: 15px;"> + <?php + + echo $label; + + ?> + </div> + </td> + <td style="width: 300px; padding: 5px;"> + <?php + + echo $friend->name; + + ?> + </td> +<?php + + + $col++; + + if ($col == 3) { + + $col = 0; + echo "</tr>"; + + } + + + } + if ($col != 3) { + echo "</tr>"; + } + + +?> + +</table> + +<?php + + /*echo elgg_view('input/checkboxes',array( + + 'internalname' => 'shares', + 'options' => $options, + 'value' => $vars['shares'], + + )); */ + + } + +?>
\ No newline at end of file |