templates/explorer/asset-detail.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}Marketplace{% endblock %}
{% block body %}
<div id="crate-contents" style="display: none; padding-top: 15%;">
<div class="grid-container">
<div class="grid-x grid-padding-x grid-padding-y crate-contents align-center">
<div class="small-12 medium-4 cell">
<img class="crate" src="{{ asset("/build/images/web/front-crate.png") }}" />
</div>
</div>
<div class="grid-x">
<div class="small-12 cell">
<p style="font-size: .9em; text-align: center;">Please note that it may take up to 5 minutes for the NFT to process and show in your inventory.</p>
<button id="close-crate-contents" class="button" style="display: none;">Close</button>
</div>
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-padding-y grid-padding-x">
<div class="small-12 cell" style="text-align: center;">
<h1 style="margin-top: 75px;">Asset Detail</h1>
</div>
<div class="small-12 medium-offset-1 cell">
<div class="small-12 cell">
{{ wo_render_breadcrumbs() }}
</div>
</div>
{% if assetMetadata.nftHub.isMinted is same as(null) and assetMetadata.nftHub.scriptMint is same as(true) %}
<div class="small-12 medium-10 medium-offset-1 end cell">
<p style="text-align: center; font-size: .9em; background: #c4510f; padding: 10px; border-radius: 3px; font-weight: bold;">This asset is currently being processed on the blockchain. It will be available in your inventory in approximately 10 minutes.</p>
</div>
{% endif %}
<div class="small-12 medium-3 medium-offset-1 cell">
{% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': assetMetadata, 'app': app} %}
{# <div style="background: #13161d; padding: 50px; text-align: center; border-radius: 10px;">#}
{# <div class="grid-x grid-padding-x grid-padding-y">#}
{# <div class="small-12 cell">#}
{# <div style="position: relative; height: 150px;">#}
{# <img src="{{ assetMetadata.imageUrl }}" />#}
{# </div>#}
{# </div>#}
{# <div class="small-4 cell">#}
{# <p><span class="nft-detail-label">L</span><br />#}
{# <span class="nft-detail-text">{{ assetMetadata.statStar }}</span></p>#}
{# </div>#}
{# <div class="small-4 cell">#}
{# <p><span class="nft-detail-label">D</span><br />#}
{# <span class="nft-detail-text">{{ assetMetadata.statRectangle }}</span></p>#}
{# </div>#}
{# <div class="small-4 cell">#}
{# <p><span class="nft-detail-label">T</span><br />#}
{# <span class="nft-detail-text">{{ assetMetadata.statCircle }}</span></p>#}
{# </div>#}
{# </div>#}
{# </div>#}
{% if assetMetadata.template.genus.id != 3 %}
<div class="grid-container" style="background: #252534; padding: 15px 0 20px 0; text-align: center; border-radius: 10px; margin-top: 15px;">
<div class="grid-x">
<div class="small-12 cell">
<div style="margin-bottom: 15px; display: block;">
<span data-tooltip tabindex="1" title="Stat comparison for {{ assetMetadata.name}} across ALL NFT Collection Series. Note that these ranges are pulled from all existing {{ assetMetadata.name }} NFTs and do not represent actual minimum and maximum potential values." class="family-orgovan">Stat Comparison</span>
</div>
</div>
<div class="small-12 cell">
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<span data-tooltip tabindex="1" title="Overall Score. Note that the Overall Score is calculated using all stats, including the Additional Stats listed below.">S</span>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minScore|number_format(0,'.',',') }}
</div>
{% if (nftMinMaxStats.maxScore - nftMinMaxStats.minScore) > 0 %}
{% set scorePercent = (assetMetadata.score - nftMinMaxStats.minScore) / (nftMinMaxStats.maxScore - nftMinMaxStats.minScore) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxScore == assetMetadata.score %}
width: 100%;
{% else %}
width: {{ scorePercent * 100 }}%;
float: left;
{% endif %}
background: goldenrod;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxScore|number_format(0,'.',',') }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<span data-tooltip tabindex="1" title="Luck">L</span>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minStar }}
</div>
{% if (nftMinMaxStats.maxStar - nftMinMaxStats.minStar) > 0 %}
{# {% set luckStat = (assetMetadata.nftMetadataquest.progress > assetMetadata.nftMetadataquest.goal) ? assetMetadata.statStar + assetMetadata.nftMetadataQuest.statStarMod : assetMetadata.statStar %}#}
{# {% set starPercent = (luckStat - nftMinMaxStats.minStar) / (luckStat - nftMinMaxStats.minStar) %}#}
{% set starPercent = (assetMetadata.statStar - nftMinMaxStats.minStar) / (nftMinMaxStats.maxStar - nftMinMaxStats.minStar) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top:3px">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxStar == assetMetadata.statStar %}
width: 100%;
{% else %}
width: {{ starPercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxStar }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<span data-tooltip tabindex="1" title="Distance">D</span>
</div>
{# <div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">#}
{# {{ assetMetadata.statRectangle }}#}
{# </div>#}
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minRectangle }}
</div>
{% if (nftMinMaxStats.maxRectangle - nftMinMaxStats.minRectangle) > 0 %}
{% set rectanglePercent = (assetMetadata.statRectangle - nftMinMaxStats.minRectangle) / (nftMinMaxStats.maxRectangle - nftMinMaxStats.minRectangle) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxRectangle == assetMetadata.statRectangle %}
width: 100%;
{% else %}
width: {{ rectanglePercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxRectangle }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<span data-tooltip tabindex="1" title="Tension">T</span>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minCircle }}
</div>
{% if (nftMinMaxStats.maxCircle - nftMinMaxStats.minCircle) > 0 %}
{% set circlePercent = (assetMetadata.statCircle - nftMinMaxStats.minCircle) / (nftMinMaxStats.maxCircle - nftMinMaxStats.minCircle) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxCircle == assetMetadata.statCircle %}
width: 100%;
{% else %}
width: {{ circlePercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxCircle }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="grid-container" style="background: #252534; padding: 15px 0 20px 0; text-align: center; border-radius: 10px; margin-top: 15px;">
<div class="grid-x">
<div class="small-12 cell">
<div style="margin-bottom: 15px; display: block;">
<span data-tooltip tabindex="1" title="These are additional stats tied to this NFT. These stats are not yet used in game, but are planned for future updates." class="family-orgovan">Additional Stats</span>
</div>
</div>
<div class="small-12 cell">
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<svg style="filter: invert(88%) sepia(13%) saturate(0%) hue-rotate(347deg) brightness(91%) contrast(93%);" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m21 4c0-.478-.379-1-1-1h-16c-.62 0-1 .519-1 1v16c0 .621.52 1 1 1h16c.478 0 1-.379 1-1z" fill-rule="nonzero"/></svg> </div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minSquare }}
</div>
{% if (nftMinMaxStats.maxSquare - nftMinMaxStats.minSquare) > 0 %}
{% set squarePercent = (assetMetadata.statSquare - nftMinMaxStats.minSquare) / (nftMinMaxStats.maxSquare - nftMinMaxStats.minSquare) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top:3px">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxSquare == assetMetadata.statSquare %}
width: 100%;
{% else %}
width: {{ squarePercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxSquare }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<svg style="filter: invert(88%) sepia(13%) saturate(0%) hue-rotate(347deg) brightness(91%) contrast(93%);" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m11.262 2.306c.196-.196.461-.306.738-.306s.542.11.738.306c1.917 1.917 7.039 7.039 8.956 8.956.196.196.306.461.306.738s-.11.542-.306.738c-1.917 1.917-7.039 7.039-8.956 8.956-.196.196-.461.306-.738.306s-.542-.11-.738-.306c-1.917-1.917-7.039-7.039-8.956-8.956-.196-.196-.306-.461-.306-.738s.11-.542.306-.738c1.917-1.917 7.039-7.039 8.956-8.956z" fill-rule="nonzero"/></svg> </div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minDiamond }}
</div>
{% if (nftMinMaxStats.maxDiamond - nftMinMaxStats.minDiamond) > 0 %}
{% set diamondPercent = (assetMetadata.statDiamond - nftMinMaxStats.minDiamond) / (nftMinMaxStats.maxDiamond - nftMinMaxStats.minDiamond) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxDiamond == assetMetadata.statDiamond %}
width: 100%;
{% else %}
width: {{ diamondPercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxDiamond }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<svg style="filter: invert(88%) sepia(13%) saturate(0%) hue-rotate(347deg) brightness(91%) contrast(93%);" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m2.095 19.882 9.248-16.5c.133-.237.384-.384.657-.384.272 0 .524.147.656.384l9.248 16.5c.064.115.096.241.096.367 0 .385-.309.749-.752.749h-18.496c-.44 0-.752-.36-.752-.749 0-.126.031-.252.095-.367z" fill-rule="nonzero"/></svg>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minTriangle }}
</div>
{% if (nftMinMaxStats.maxTriangle - nftMinMaxStats.minTriangle) > 0 %}
{% set trianglePercent = (assetMetadata.statTriangle - nftMinMaxStats.minTriangle) / (nftMinMaxStats.maxTriangle - nftMinMaxStats.minTriangle) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxTriangle == assetMetadata.statTriangle %}
width: 100%;
{% else %}
width: {{ trianglePercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxTriangle }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<svg style="filter: invert(88%) sepia(13%) saturate(0%) hue-rotate(347deg) brightness(91%) contrast(93%);" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m12 5.72c-2.624-4.517-10-3.198-10 2.461 0 3.725 4.345 7.727 9.303 12.54.194.189.446.283.697.283s.503-.094.697-.283c4.977-4.831 9.303-8.814 9.303-12.54 0-5.678-7.396-6.944-10-2.461z" fill-rule="nonzero"/></svg>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minHeart }}
</div>
{% if (nftMinMaxStats.maxHeart - nftMinMaxStats.minHeart) > 0 %}
{% set heartPercent = (assetMetadata.statHeart - nftMinMaxStats.minHeart) / (nftMinMaxStats.maxHeart - nftMinMaxStats.minHeart) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxHeart == assetMetadata.statHeart %}
width: 100%;
{% else %}
width: {{ heartPercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxHeart }}
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-margin-y">
<div class="small-1 cell" style="text-align: center; font-size: .8em; font-weight: bold; color: dodgerblue">
<svg style="filter: invert(88%) sepia(13%) saturate(0%) hue-rotate(347deg) brightness(91%) contrast(93%);" clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m22.005 15.728c0 .266-.106.52-.293.707-1 1-4.272 4.272-5.272 5.272-.187.188-.442.293-.707.293-1.414 0-6.042 0-7.457 0-.265 0-.519-.105-.707-.293-1-1-4.271-4.272-5.271-5.272-.188-.187-.293-.441-.293-.707 0-1.414 0-6.042 0-7.456 0-.266.105-.52.293-.707 1-1 4.271-4.272 5.271-5.272.188-.188.442-.293.707-.293h7.457c.265 0 .52.105.707.293 1 1 4.272 4.272 5.272 5.272.187.187.293.441.293.707z" fill-rule="nonzero"/></svg> </div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.minOctagon }}
</div>
{% if (nftMinMaxStats.maxOctagon - nftMinMaxStats.minOctagon) > 0 %}
{% set octagonPercent = (assetMetadata.statOctagon - nftMinMaxStats.minOctagon) / (nftMinMaxStats.maxOctagon - nftMinMaxStats.minOctagon) %}
{% endif %}
<div class="small-7 cell">
<div style="background: #333; border-radius: 3px; height: 12px; margin-top: 3px;">
<div style="height:12px; width: 5px; border-radius: 2px;
{% if nftMinMaxStats.maxOctagon == assetMetadata.statOctagon %}
width: 100%;
{% else %}
width: {{ octagonPercent * 100 }}%;
float: left;
{% endif %}
background: dodgerblue;">
</div>
</div>
</div>
<div class="small-2 cell" style="text-align: center; font-size: .8em; font-weight: bold;">
{{ nftMinMaxStats.maxOctagon }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %} {# if assetMetadata.template.genus.id != 3 #}
{# <div style="text-align: center;">#}
{# <div class="grid-x grid-padding-x grid-padding-y">#}
{# <div class="small-12 cell">#}
{# {% if marketItem == true %}#}
{# <p style="padding: 20px; text-align: center;"><img height="25" width="25" src="{{ asset('build/images/web/tfuel-logo.svg') }}" style="vertical-align: top;" /> <span style="font-size: 2em; font-weight: bold; color: #ffa50d; ">{{ marketItem.price|number_format(2,'.',',') }}</span></p>#}
{# {% if app.user is not null#}
{# and app.user.activeWallet == marketItem.seller %}#}
{# #}{# Show Cancel Button #}
{# <button class="button initiateMarketCancel" data-open="initiateMarketCancel-{{ marketItem.id }}" style="width: 100%; font-weight: bold; font-size: 1.1em;">Cancel</button>#}
{# {% include 'marketplace/modals/createMarketCancel.html.twig' with {'marketItem': marketItem, 'app': app } %}#}
{# {% elseif app.user is not null %}#}
{# #}{# Show Buy Button #}
{# <button class="button initiateMarketSale" data-open="initiateMarketSale-{{ marketItem.id }}" style="width: 100%; padding: 15px 50px; font-weight: bold; font-size: 1.1em;">Buy</button>#}
{# {% include 'marketplace/modals/createMarketSale.html.twig' with {'marketItem': marketItem, 'app': app } %}#}
{# {% else %}#}
{# #}{# Show Buy Button but direct towards login #}
{# <a href="{{ path('app_login') }}" class="button" style="width: 100%; padding: 15px 50px; font-weight: bold; font-size: 1.1em;">Buy</a>#}
{# {% endif %}#}
{# {% elseif marketItem == false %}#}
{# {% if app.user is not null#}
{# and app.user.activeWallet is defined#}
{# and app.user.activeWallet.isApprovedForAllMarket is same as(true)#}
{# and app.user.activeWallet == assetMetadata.nftHub.thetaWallet#}
{# %}#}
{# <a class="button gold-button initiateMarketCreateItem" style="margin-top: 10px; font-weight: bold; font-size: 1.1em;" href="#" data-open="createMarketItem-{{ assetMetadata.id }}">Sell</a>#}
{# {% include 'marketplace/modals/createMarketItem.html.twig' with {'assetMetadata': assetMetadata, 'app': app } %}#}
{# {% elseif app.user.activeWallet.address is defined#}
{# and app.user.activeWallet.address == assetMetadata.nftHub.thetaWallet.address#}
{# %}#}
{# #}{# If User has not given Marketplace contract permissions to handle NFT tokens we must ask for that first #}
{# #}{# include both Approval and Sell modals so that we can immediately show the Sell button after Approval #}
{# <a class="button gold-button initiateMarketCreateItem" style="margin-top: 10px; font-weight: bold; font-size: 1.1em; display: none;" href="#" data-open="createMarketItem-{{ assetMetadata.id }}">Sell</a>#}
{# {% include 'marketplace/modals/setApprovalForAll.html.twig' with {'assetMetadata': assetMetadata, 'app': app} %}#}
{# {% include 'marketplace/modals/createMarketItem.html.twig' with {'assetMetadata': assetMetadata, 'app': app, 'hideSellButton': true } %}#}
{# {% endif %}#}
{# {% endif %}#}
{# </div>#}
{# </div>#}
{# </div>#}
<div class="grid-x" style="margin: 5px;">
<div class="small-12 cell">
{# Show Open Crate if current User owns the crate #}
{% if app.user and app.user.activeWallet is defined and app.user.activeWallet == assetMetadata.nftHub.thetaWallet %}
{# If the crate is still in minting process show disabled Open Crate button #}
{% if assetMetadata.nftHub.crateActionLog is not same as(null) and assetMetadata.nftHub.isMinted is same as(null) %}
<button class="button orange-button initiateOpenCrate {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" style="width: 100%; height: 50px; margin-top: 10px; background-color: darkslateblue; font-weight: bold; font-size: .8em; color: #fff;" data-open="openCrate-{{ assetMetadata.nftHub.id }}" disabled>Open Crate</button>
{# If the crate is not opened show Open Crate button #}
{% elseif assetMetadata.nftHub.crateActionLog is not same as(null) and assetMetadata.nftHub.crateActionLog.isOpened is same as(null) %}
<button class="button orange-button initiateOpenCrate {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" style="width: 100%; height: 50px; margin-top: 10px; background-color: darkslateblue; font-weight: bold; font-size: .8em; color: #fff;" data-open="openCrate-{{ assetMetadata.nftHub.id }}">Open Crate</button>
{% include 'crate/modals/openCrate.html.twig' with {'assetMetadata': assetMetadata, 'app': app} %}
{% endif %}
{% endif %}
{# If the crate is opened show details #}
{% if assetMetadata.nftHub.crateActionLog is not same as(null) and assetMetadata.nftHub.crateActionLog.isOpened is same as(true) %}
<p style="font-size: .8em; padding: 10px; background: #c4510f; border-radius: 3px;">
Crate opened by <strong>{{ assetMetadata.nftHub.crateActionLog.openedBy.user.username is defined ? assetMetadata.nftHub.crateActionLog.openedBy.user.username : assetMetadata.nftHub.crateActionLog.openedBy.address|slice(0,6 ) ~ '...' ~ assetMetadata.nftHub.crateActionLog.openedBy.address|slice(38,42) }}</strong>
on {{ assetMetadata.nftHub.crateActionLog.initiateOpenAt|date }}</p>
{% endif %}
</div>
</div>
</div>
<div class="small-12 medium-7 end cell">
<div class="grid-container" style="background: #252534; padding: 50px; border-radius: 10px;">
<div class="grid-x">
<div class="small-12 cell">
<p><span class="nft-detail-label">Name</span><br />
<span class="nft-detail-text">{{ assetMetadata.name }}</span></p>
</div>
<div class="small-12 medium-12 cell">
<p><span class="nft-detail-label">Series</span><br />
<span class="nft-detail-text">{{ assetMetadata.nftCollection.name }} {{ assetMetadata.nftCollection.series }}</span></p>
</div>
<div class="small-12 medium-4 cell">
<p><span class="nft-detail-label">Mint number</span><br />
<span class="nft-detail-text"><span class="highlight">#{{ assetHub.nftMetadata.mint }}</span> of {{ totalMinted }}</span></p>
</div>
<div class="small-12 medium-3 end cell">
<p><span class="nft-detail-label">Token Id</span><br />
<span class="nft-detail-text">{{ assetMetadata.nftHub.id }}</span></p>
</div>
<div class="small-12 medium-3 cell">
<p><span class="nft-detail-label">Wear</span><br />
{% if assetMetadata.template.genus.id != 3 %}
<span class="nft-detail-text">{{ assetMetadata.wear }}</span></p>
{% else %}
N/A
{% endif %}
</div>
<div class="small-12 medium-2 cell">
<p><span class="nft-detail-label">Weight</span><br />
{% if assetMetadata.template.genus.id != 3 %}
<span class="nft-detail-text">{{ assetMetadata.weight }}</span></p>
{% else %}
N/A
{% endif %}
</div>
<div class="small-12 medium-4 cell">
{% if assetMetadata.template.tier == 0 %}
{% set tier = 'Old' %}
{% elseif assetMetadata.template.tier == 1 %}
{% set tier = 'Fodder' %}
{% elseif assetMetadata.template.tier == 2 %}
{% set tier = 'Common' %}
{% elseif assetMetadata.template.tier == 3 %}
{% set tier = 'Uncommon' %}
{% elseif assetMetadata.template.tier == 4 %}
{% set tier = 'Rare' %}
{% elseif assetMetadata.template.tier == 5 %}
{% set tier = 'Epic' %}
{% elseif assetMetadata.template.tier == 6 %}
{% set tier = 'Legendary' %}
{% elseif assetMetadata.template.tier == 7 %}
{% set tier = 'Extreme' %}
{% elseif assetMetadata.template.tier == 100 %}
{% set tier = 'Promotional' %}
{% endif %}
<p><span class="nft-detail-label">Tier</span><br />
{% if assetMetadata.template.genus.id != 3 %}
<span class="nft-detail-text">{{ tier }}</span></p>
{% else %}
N/A
{% endif %}
</div>
<div class="small-12 medium-4 cell">
<p><span class="nft-detail-label">Grade</span><br />
{% if assetMetadata.template.genus.id != 3 %}
<span class="nft-detail-text">{{ assetMetadata.grade }}</span></p>
{% else %}
N/A
{% endif %}
</div>
<div class="small-12 medium-4 end cell">
<p><span class="nft-detail-label">Score</span><br />
{% if assetMetadata.template.genus.id != 3 %}
<span class="nft-detail-text" style="color: goldenrod">{{ assetMetadata.score|number_format(2,'.',',') }}</span></p>
{% else %}
N/A
{% endif %}
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">School of Magic</span><br />
<span class="nft-detail-text">{{ assetMetadata.schoolOfMagic.name is defined ? assetMetadata.schoolOfMagic.name : 'N/A' }}</span></p>
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">Description</span><br />
<span class="nft-detail-text">{{ assetMetadata.description }}</span></p>
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">Created</span><br />
<span class="nft-detail-text">{{ assetMetadata.createdAt|date() }}</span></p>
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">Owner</span><br />
{% if assetMetadata.nftHub.activeMarketItem is not empty %}
{% if assetMetadata.nftHub.activeMarketItem|first.seller.user.username is defined %}
<span class="nft-detail-text"><span class="highlight"><a href="{{ path('user_profile', { userId: assetMetadata.nftHub.activeMarketItem|first.seller.user.id, domain: app_domain }) }}">{{ assetMetadata.nftHub.activeMarketItem|first.seller.user.username is defined ? assetMetadata.nftHub.activeMarketItem|first.seller.user.username : ''}} ({{ assetMetadata.nftHub.activeMarketItem|first.seller.address|slice(0,6) }}...{{ assetMetadata.nftHub.activeMarketItem|first.seller.address|slice(38,42) }})</a></span></span></p>
{% elseif assetMetadata.nftHub.activeMarketItem|first.seller.address is defined %}
<a href="https://explorer.thetatoken.org/account/{{ assetMetadata.nftHub.activeMarketItem|first.seller.address }}" target="_blank">{{ assetMetadata.nftHub.activeMarketItem|first.seller.address }}</a>
{% endif %}
{% else %}
{% if assetHub.thetaWallet.user.username is defined %}
<span class="nft-detail-text"><span class="highlight"><a href="{{ path('user_profile', { userId: assetHub.thetaWallet.user.id, domain: app_domain }) }}">{{ assetHub.thetaWallet.user.username is defined ? assetHub.thetaWallet.user.username : ''}} ({{ assetHub.thetaWallet.address|slice(0,6) }}...{{ assetHub.thetaWallet.address|slice(38,42) }})</a></span></span></p>
{% elseif assetHub.thetaWallet.address is defined %}
<a href="https://explorer.thetatoken.org/account/{{ assetHub.thetaWallet.address }}" target="_blank">{{ assetHub.thetaWallet.address }}</a>
{% endif %}
{% endif %}
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">IPFS URL</span><br />
<span class="nft-detail-text" style="font-size: .8em;"><a href="{{ assetMetadata.nftHub.ipfsUrl }}">{{ assetMetadata.nftHub.ipfsUrl }}</a></span></p>
</div>
<div class="small-12 cell">
<p><span class="nft-detail-label">QUEST DETAIL</span><br />
{% if assetMetadata.template.genus.id != 3 %}
Progress: {{ assetMetadata.nftMetadataQuest.progress }}
Goal: {{ assetMetadata.nftMetadataQuest.goal }}
{% else %}
N/A
{% endif %}
</div>
</div>
</div>
<div class="grid-container" style="margin-top: 15px; background: #252534; padding: 35px 50px; border-radius: 10px;">
<div class="grid-x">
<div class="small-12 cell">
<h2>Transfer History</h2>
</div>
<div class="small-12 cell">
{% for transfer in assetTransferHistory %}
<div class="grid-container" style="padding: 3px 0;">
<div class="grid-x">
<div class="small-12 medium-4 cell">
{{ transfer.timestamp|date() }}
</div>
<div class="small-12 medium-8 cell">
{% if transfer.fromAddress == '0x0000000000000000000000000000000000000000' or transfer.fromAddress == '0xC0DF07Ae87912a7Df9798e68d18cBD77E3Da8BCf' or transfer.fromAddress == '0xBF05F3330ba6fF8bb4dCE16c4A8a1D8B23DeD398'
or transfer.fromAddress == '0x3Fc3FE7C34F1aD2D4cA86219eF1b67af9aA7aBD4'%}
{% if transfer.fromAddress == '0x0000000000000000000000000000000000000000' %}
Genesis
{% elseif transfer.fromAddress == '0xC0DF07Ae87912a7Df9798e68d18cBD77E3Da8BCf' or transfer.fromAddress == '0x3Fc3FE7C34F1aD2D4cA86219eF1b67af9aA7aBD4' %}
<a href="https://explorer.thetatoken.org/account/{{ transfer.fromAddress }}" target="_blank">Marketplace</a>
{% elseif transfer.fromAddress == '0xBF05F3330ba6fF8bb4dCE16c4A8a1D8B23DeD398' %}
Minter
{% endif %}
{% else %}
<a href="{{ path('user_profile_wallet_address', { walletAddress: transfer.fromAddress }) }}">{{ transfer.fromAddress|slice(0,6) }}...{{ transfer.fromAddress|slice(38,42)}}</a>
{% endif %}
<svg xmlns="http://www.w3.org/2000/svg" width="23.828" height="14.769" style=" margin: 0 5px; filter: invert(96%) sepia(78%) saturate(2%) hue-rotate(181deg) brightness(111%) contrast(100%);"><path d="m13.616 2.828 2.585 2.586H0v4h16.143l-2.527 2.526 2.828 2.829 7.384-7.384L16.444 0l-2.828 2.828z"/></svg>
{% if transfer.toAddress == '0x0000000000000000000000000000000000000000' or transfer.toAddress == '0xC0DF07Ae87912a7Df9798e68d18cBD77E3Da8BCf' or transfer.toAddress == '0xBF05F3330ba6fF8bb4dCE16c4A8a1D8B23DeD398'
or transfer.toAddress == '0x3Fc3FE7C34F1aD2D4cA86219eF1b67af9aA7aBD4'%}
{% if transfer.toAddress == '0x0000000000000000000000000000000000000000' %}
Genesis
{% elseif transfer.toAddress == '0xC0DF07Ae87912a7Df9798e68d18cBD77E3Da8BCf' or transfer.toAddress == '0x3Fc3FE7C34F1aD2D4cA86219eF1b67af9aA7aBD4' %}
<a href="https://explorer.thetatoken.org/account/{{ transfer.toAddress }}" target="_blank">Marketplace</a>
{% elseif transfer.toAddress == '0xBF05F3330ba6fF8bb4dCE16c4A8a1D8B23DeD398' %}
Minter
{% endif %}
{% else %}
<a href="{{ path('user_profile_wallet_address', { walletAddress: transfer.toAddress }) }}">{{ transfer.toAddress|slice(0,6) }}...{{ transfer.toAddress|slice(38,42)}}</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="grid-container" style="margin-top: 15px; background: #252534; padding: 35px 50px; border-radius: 10px;">
<div class="grid-x">
<div class="small-12 cell">
<h2>Market History</h2>
</div>
<div class="small-12 cell">
{% if assetMarketHistory|length == 0 %}
<p>No market sales exist for this asset.</p>
{% else %}
{% for transfer in assetMarketHistory %}
{% if transfer.price > 0 %}
<div class="grid-container" style="padding: 3px 0;">
<div class="grid-x">
<div class="small-12 medium-4 cell">
{{ transfer.updatedAt|date() }}
</div>
<div class="small-12 medium-8 cell">
<img alt="" height="20" width="20" src="{{ asset('build/images/web/tfuel-logo.svg') }}" style="vertical-align: top;" /> <strong><span style="color: #ffa50d">{{ transfer.price|number_format(2,'.',',') }}</span></strong>
</div>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
<div class="grid-container" style="margin-top: 15px; background: #252534; padding: 35px 50px; border-radius: 10px;">
<div class="grid-x">
<div class="small-12 cell">
<h2 id="asset-offers">Offers</h2>
</div>
<div class="small-12 cell">
{% if assetMetadata.nftHub.activeMarketOffers|length == 0 %}
<p>No offers exist for this asset.</p>
{% else %}
{% for offer in assetMetadata.nftHub.activeMarketOffers %}
<div class="grid-container" style="padding: 3px 0;">
<div class="grid-x">
<div class="small-12 medium-5 cell">
{% if offer.bidder.user.username is defined %}
<span class="nft-detail-text"><span class="highlight"><a href="{{ path('user_profile', { userId: offer.bidder.user.id, domain: app_domain }) }}">{{ offer.bidder.user.username is defined ? offer.bidder.user.username : ''}} ({{ offer.bidder.address|slice(0,6) }}...{{ offer.bidder.address|slice(38,42) }})</a></span></span></p>
{% elseif offer.bidder.address is defined %}
<a href="https://explorer.thetatoken.org/account/{{ offer.bidder.address }}" target="_blank">{{ offer.bidder.address|slice(0,6) }}...{{ offer.bidder.address|slice(38,42) }}</a>
{% endif %}
</div>
<div class="small-12 medium-4 cell">
<img alt="" height="20" width="20" src="{{ asset('build/images/web/tfuel-logo.svg') }}" style="vertical-align: top;" /> <strong><span style="color: #ffa50d">{{ offer.price|number_format(2,'.',',') }}</span></strong>
</div>
<div class="small-12 medium-3 cell">
{# If the current User is the owner of this item, we need to show Accept Offer buttons #}
{# However, they can only accept if this item is not actively listed in the market #}
{# They also need to have approved market permissions #}
{# If Main Token #}
{% if assetMetadata.nftHub.nftContract.id == 1 %}
{% if app.user.activeWallet and app.user.activeWallet.isApprovedForAllMarket2 is same as(false) %}
<button class="button initiateAcceptMarketOffer {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" data-open="acceptMarketOffer-{{ offer.id }}" style="display: none;">Accept Offer</button>
{% include 'marketplace/modals/setApprovalForAll.html.twig' with {'assetMetadata': assetMetadata, 'app': app, 'buttonText': 'Accept Offer'} %}
{% include 'marketplace/modals/acceptMarketOffer.html.twig' with {'marketOffer' : offer, 'assetMetadata' : assetMetadata, 'app': app } %}
{% elseif assetMetadata.nftHub.activeMarketItem is not empty and app.user.activeWallet == assetMetadata.nftHub.activeMarketItem|first.seller %}
<button class="button initiateAcceptMarketOffer"
data-open="conflict-cancelMarketItem-{{ assetMetadata.nftHub.activeMarketItem|first.id }}"
style="width: 100%; font-size: .8em; font-weight: bold;">Accept Offer
</button>
<div class="reveal" id="conflict-cancelMarketItem-{{ assetMetadata.nftHub.activeMarketItem|first.id }}" data-reveal
style="text-align: center; background: #1f1f29; border-radius: 15px; border: none;">
<h1>Active Market Exists</h1>
<img height="100" width="100" src="{{ asset('build/images/web/warning.svg') }}" />
<p>You must cancel your Market listing for this item before you can accept an Offer.</p>
<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">×</span>
</button>
</div>
{% else %}
{% if (app.user and app.user.activeWallet is defined) and app.user.activeWallet == assetMetadata.nftHub.thetaWallet %}
<button class="button initiateAcceptMarketOffer {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" data-open="acceptMarketOffer-{{ offer.id }}">Accept Offer</button>
{% include 'marketplace/modals/acceptMarketOffer.html.twig' with {'marketOffer' : offer, 'assetMetadata' : assetMetadata, 'app': app } %}
{% endif %}
{% endif %}
{% elseif assetMetadata.nftHub.nftContract.id == 4 %}
{# If Crate Token #}
{% if app.user.activeWallet and app.user.activeWallet.isApprovedForAllMarketCrate is same as(false) %}
<button class="button initiateAcceptMarketOffer {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" data-open="acceptMarketOffer-{{ offer.id }}" style="display: none;">Accept Offer</button>
{% include 'marketplace/modals/setApprovalForAll.html.twig' with {'assetMetadata': assetMetadata, 'app': app, 'buttonText': 'Accept Offer'} %}
{% include 'marketplace/modals/acceptMarketOffer.html.twig' with {'marketOffer' : offer, 'assetMetadata' : assetMetadata, 'app': app } %}
{% elseif assetMetadata.nftHub.activeMarketItem is not empty and app.user.activeWallet == assetMetadata.nftHub.activeMarketItem|first.seller %}
<button class="button initiateAcceptMarketOffer"
data-open="conflict-cancelMarketItem-{{ assetMetadata.nftHub.activeMarketItem|first.id }}"
style="width: 100%; font-size: .8em; font-weight: bold;">Accept Offer
</button>
<div class="reveal" id="conflict-cancelMarketItem-{{ assetMetadata.nftHub.activeMarketItem|first.id }}" data-reveal
style="text-align: center; background: #1f1f29; border-radius: 15px; border: none;">
<h1>Active Market Exists</h1>
<img height="100" width="100" src="{{ asset('build/images/web/warning.svg') }}" />
<p>You must cancel your Market listing for this item before you can accept an Offer.</p>
<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">×</span>
</button>
</div>
{% else %}
{% if (app.user and app.user.activeWallet is defined) and app.user.activeWallet == assetMetadata.nftHub.thetaWallet %}
<button class="button initiateAcceptMarketOffer {{ app.user.walletExtension == 1 ? 'ext-theta' : 'ext-meta' }}" data-open="acceptMarketOffer-{{ offer.id }}">Accept Offer</button>
{% include 'marketplace/modals/acceptMarketOffer.html.twig' with {'marketOffer' : offer, 'assetMetadata' : assetMetadata, 'app': app } %}
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}