Skip to content

Commit

Permalink
feature/added Add Subscriptions buttons and text if props is set -twe…
Browse files Browse the repository at this point in the history
…aked
  • Loading branch information
hongwei1 committed May 30, 2024
1 parent ef30d4e commit 415770e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions obp-api/src/main/resources/props/sample.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@ webui_developer_user_invitation_email_html_text=<!DOCTYPE html>\
</p>\
</body>\
</html>
# the subscription button,default is empty, will not show it on the homepage.
#webui_subscriptions_url=
#webui_subscriptions_button_text=
#webui_subscriptions_invitation_text=

# List of countries where consent is not required for the collection of personal data
personal_data_collection_consent_country_waiver_list = Austria, Belgium, Bulgaria, Croatia, Republic of Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, England, Scotland, Wales, Northern Ireland
Expand Down
5 changes: 3 additions & 2 deletions obp-api/src/main/scala/code/snippet/WebUI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ class WebUI extends MdcLoggable{
val webuiSubscriptionsButtonText = getWebUiPropsValue("webui_subscriptions_button_text", s"")

if (webuiSubscriptionsButtonText.isEmpty) {
".subscriptions-button [style]" #> "display:none"
".subscriptions-button [style]" #> "display:none"&
".btn-default [style]" #> "display:none"
} else {
".subscriptions-button [href]" #> scala.xml.Unparsed(webuiSubscriptionsUrl) &
".subscriptions-button-text *" #> scala.xml.Unparsed(webuiSubscriptionsButtonText)
Expand All @@ -355,7 +356,7 @@ class WebUI extends MdcLoggable{
if (webuiSubscriptionsInvitationText.isEmpty) {
".subscriptions_invitation_text [style]" #> "display:none"
} else {
".subscriptions_invitation_text_value *" #> scala.xml.Unparsed(webuiSubscriptionsInvitationText)
".subscriptions_invitation_text *" #> scala.xml.Unparsed(webuiSubscriptionsInvitationText)
}
}

Expand Down
6 changes: 3 additions & 3 deletions obp-api/src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2 id="get-started-part"><lift:loc locid="get_started_title">Get started</lift:
<h3><lift:loc locid="get_started_create_account_title">Create an account</lift:loc></h3>
<p><lift:loc locid="get_started_create_account">First, create a free developer account on this sandbox and request a developer key. You will be asked to submit basic information about your app at this stage. </lift:loc><a href="/user_mgt/sign_up"><lift:loc locid="register_for_an_account">Register for an account</lift:loc>
</a>.</p>
<p data-lift="WebUI.subscriptionsInvitationText" class ="subscriptions_invitation_text"><lift:loc locid="subscription_context">You may also like to get a </lift:loc><lift:loc locid="subscriptions_invitation_text_content" class="subscriptions_invitation_text_value" > Subscription </lift:loc>
<p data-lift="WebUI.subscriptionsInvitationText" class ="subscriptions_invitation_text"> </lift:loc>
</p>
</a>
</div>
Expand Down Expand Up @@ -323,8 +323,8 @@ <h2 name="get-started" data-lift="WebUI.getStartedText"><lift:loc locid="get_sta
<a href="/consumer-registration">
<lift:loc locid="get_api_key">Get API key</lift:loc></a>
</div>
<div class="btn btn-default pull-left">
<a class="subscriptions-button" data-lift="WebUI.subscriptionsButton" href="">
<div data-lift="WebUI.subscriptionsButton" class="btn btn-default pull-left" id ="subscriptions-button-div">
<a class="subscriptions-button" href="">
<lift:loc locid="subscriptions"><div class ="subscriptions-button-text">Subscriptions</div></lift:loc>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions obp-api/src/main/webapp/templates-hidden/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@
<lift:loc locid="support">Support</lift:loc>
</a>
</li>
<li class="navitem">
<a class="navlink" class="subscriptions-button" data-lift="WebUI.subscriptionsButton" href="">
<lift:loc locid="subscriptions"><div class ="subscriptions-button-text">Subscriptions</div></lift:loc>
<li class="navitem" data-lift="WebUI.subscriptionsButton" >
<a class="navlink subscriptions-button" href="">
<lift:loc locid="subscriptions"><div class ="subscriptions-button-text"></div></lift:loc>
</a>
</li>
</ul>
Expand Down

0 comments on commit 415770e

Please sign in to comment.