-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Claim metadata #62
Closed
Closed
Claim metadata #62
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fd7c85d
Removed author from claim page
marcdeb1 428c9d8
Block time & Created time matching
marcdeb1 7899669
Added information to claim page
marcdeb1 28071a4
Minor fix
marcdeb1 ecaefa6
Format currency refactoring
marcdeb1 9764362
Added constants and new function for LBRY price display
marcdeb1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,9 @@ $cost = 'Free'; | |
if (isset($claim->price) && $claim->price > 0) { | ||
$cost = $this->Amount->formatCurrency($claim->price) . ' LBC'; | ||
} else if (isset($claim->fee) && strtolower($claim->fee_currency) === 'lbc') { | ||
$cost = $this->Amount->formatCurrency($claim->fee) . ' LBC'; | ||
$cost = (float) ($claim->fee) . ' LBC'; | ||
} | ||
$effective_amount = $claim->effective_amount / 100000000; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we create a const instead so the number makes sense? |
||
|
||
$desc = $claim->description; | ||
if (strlen(trim($desc)) == 0) { | ||
|
@@ -66,6 +67,10 @@ if (strlen(trim($desc)) == 0) { | |
|
||
<div class="claims-body"> | ||
<div class="claim-info"> | ||
<div class="tags"> | ||
<div class="bid-state"><?php echo $claim->bid_state; ?></div> | ||
</div> | ||
|
||
<div data-autothumb="<?php echo $autoThumbText ?>" class="thumbnail <?php echo $a[mt_rand(0, count($a) - 1)] ?>"> | ||
<?php if (!$claim->is_nsfw && strlen(trim($claim->thumbnail_url)) > 0): ?> | ||
<img src="<?php echo htmlspecialchars($claim->thumbnail_url) ?>" alt="" /> | ||
|
@@ -101,6 +106,17 @@ if (strlen(trim($desc)) == 0) { | |
|
||
<div class="clear"></div> | ||
<?php endif; ?> | ||
|
||
<div class="half-width"><div class="label help-text" title="The quantity of tokens used to back the stake.">Claim bid</div></div> | ||
<div class="half-width"><div class="label help-text" title="The sum of the claim bid and all of its active supports.">Effective amount</div></div> | ||
|
||
<div class="value half-width"><?php echo (float) ($claim->claim_bid) . ' LBC'; ?></div> | ||
<div class="value half-width"><?php echo ($effective_amount < $claim->claim_bid) ? '<em>Synchronizing</em>' : ((float) ($claim->effective_amount / 100000000) . ' LBC'); ?></div> | ||
tiger5226 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<div class="clear"></div> | ||
|
||
<div class="label help-text" title="A unique identifier that is used to locate and fetch the content from the data network.">Stream hash</div> | ||
<div class="value"><?php echo $claim->sd_hash ?></div> | ||
</div> | ||
</div> | ||
|
||
|
@@ -113,26 +129,26 @@ if (strlen(trim($desc)) == 0) { | |
<div class="desc"><?php echo str_replace("\n", '<br />', $desc) ?></div> | ||
|
||
<div class="details"> | ||
<div class="label half-width">Author</div> | ||
<div class="label half-width">Content Type</div> | ||
<div class="label half-width">Language</div> | ||
|
||
|
||
<div class="value half-width"><?php echo strlen(trim($claim->author)) > 0 ? $claim->author : '<em>Unspecified</em>' ?></div> | ||
<div class="value half-width"><?php echo strlen(trim($claim->content_type)) > 0 ? $claim->content_type : '<em>Unspecified</em>' ?></div> | ||
<div class="value half-width"><?php echo strlen(trim($claim->language)) > 0 ? ($claim->language == 'en' ? 'English' : '') : '<em>Unspecified</em>' ?></div> | ||
|
||
<!-- | ||
<div class="label half-width">License</div> | ||
--> | ||
|
||
<div class="label">Language</div> | ||
--> | ||
|
||
<!-- | ||
<div class="value half-width"<?php if(strlen(trim($claim->license)) > 0): ?> title="<?php echo $claim->license ?>"<?php endif; ?>> | ||
<?php if (strlen(trim($claim->license_url)) > 0): ?><a href="<?php echo $claim->LicenseUrl ?>" rel="nofollow" target="_blank"><?php endif; ?> | ||
<?php echo strlen(trim($claim->License)) > 0 ? $claim->License : '<em>Unspecified</em>' ?> | ||
<?php if (strlen(trim($claim->LicenseUrl))): ?></a><?php endif; ?> | ||
</div> | ||
--> | ||
<div class="value half-width"><?php echo strlen(trim($claim->language)) > 0 ? ($claim->language == 'en' ? 'English' : '') : '<em>Unspecified</em>' ?></div> | ||
--> | ||
</div> | ||
<?php endif; ?> | ||
<a href="<?php echo $claim->getLbryLink() ?>" class="open-lbry-link">Open in LBRY</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we treating currency as a float? What was wrong with
formatCurrency
?