Skip to content

Commit

Permalink
Merge pull request #157 from NateWr/i836_book_hooks_and_layout
Browse files Browse the repository at this point in the history
pkp/pkp-lib#836 book hooks and layout
  • Loading branch information
asmecher committed Nov 10, 2015
2 parents 830b218 + e24d670 commit 0434a7a
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 137 deletions.
2 changes: 1 addition & 1 deletion plugins/generic/addThis/AddThisPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AddThisPlugin extends GenericPlugin {
function register($category, $path) {
if (parent::register($category, $path)) {
if ($this->getEnabled()) {
HookRegistry::register('Templates::Catalog::Book::BookInfo::Sharing', array($this, 'callbackSharingDisplay'));
HookRegistry::register('Templates::Catalog::Book::Details', array($this, 'callbackSharingDisplay'));
// Register the components this plugin implements
HookRegistry::register('LoadComponentHandler', array($this, 'setupGridHandler'));
}
Expand Down
102 changes: 52 additions & 50 deletions plugins/generic/addThis/templates/addThis.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,56 @@
*
* The included template that is hooked into Templates::Catalog::Book::BookInfo::Sharing.
*}
<div id="addThisPluginOutput" class="pkp_helpers_clear">
<!-- AddThis Button BEGIN -->
{if $addThisDisplayStyle == 'button'}
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0"/></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'simple_button'}
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}" class="addthis_button_compact">Share</a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'large_toolbox'}
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'small_toolbox_with_share'}
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'plus_one_share_counter'}
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{else} {* small_toolbox is default *}
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{/if}
<!-- AddThis Button END -->
<div class="item addthis">
<div class="value">
<!-- AddThis Button BEGIN -->
{if $addThisDisplayStyle == 'button'}
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0"/></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'simple_button'}
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}" class="addthis_button_compact">Share</a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'large_toolbox'}
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'small_toolbox_with_share'}
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid={$addThisProfileId|escape:"url"}" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{elseif $addThisDisplayStyle == 'plus_one_share_counter'}
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{else} {* small_toolbox is default *}
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={$addThisProfileId|escape:"url"}"></script>
{/if}
<!-- AddThis Button END -->
</div>
</div>
45 changes: 30 additions & 15 deletions plugins/themes/default/styles/objects/monograph_full.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,33 @@
margin-bottom: @quadruple;
}

.author_roles {
&:extend(.pkp_unstyled_list);
.main_entry {

.name {
display: block;
.item {
padding: 30px 0;

&:first-child {
padding-top: 0;
}
}

.sub_item {
margin-bottom: @double;

&:last-child {
margin-bottom: 0;
}
}

.label {
margin: 0 0 @double;
font-size: @font-base;
font-weight: @bold;
}
}

h3 {
font-size: @font-base;
.authors .label {
margin-bottom: 0;
}

.entry_details {
Expand All @@ -44,8 +60,15 @@
border-bottom: @bg-border;
}

.sub_item {
margin-bottom: @double;

&:last-child {
margin-bottom: 0;
}
}

.label {
display: block;
font-size: @font-sml;
font-weight: @normal;
color: @text-light;
Expand All @@ -61,14 +84,6 @@
margin: 0 auto;
}

.format_detail {
margin-bottom: @base;

&:last-child {
margin-bottom: 0;
}
}

.files {
.pkp_helpers_clear;

Expand Down
Loading

0 comments on commit 0434a7a

Please sign in to comment.