A developer account. See User
drop if you are looking for the email addresses or similar information.
<h1>Account organization name {{ current_account.name }}</h1>
<div>Plan {{ current_account.bought_account_plan.name }}</div>
<div>Telephone {{ current_account.telephone_number }}</div>
<div>{{ current_account.fields_plain_text }}</div>
<div>{{ current_account.extra_fields_plain_text }}</div>
{% if current_account.approval_required? %}
<p>This account requires approval.</p>
{% endif %}
{% if current_account.credit_card_required? %}
{% if current_account.credit_card_stored? %}
<p>This account has credit card details stored in database.</p>
{% else %}
<p>Please enter your {{ 'credit card details' | link_to: urls.payment_details }}.</p>
{% endif %}
{% if current_account.credit_card_missing? %}
<p>This account has no credit card details stored in database.</p>
{% endif %}
{% endif %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="account[name]"
value="{{ account.name }}"
class="{{ account.errors.name | error_class }}"/>
{{ account.errors.name | inline_errors }}
Returns the id of the account.
Returns the organization name of the developer's account.
Returns account's display name
Returns a text about a VAT zero.
Return the VAT rate.
Returns the unread messages.
Returns the latest messages.
Returns the plan the account has contracted.
Returns the contract account.
Returns whether the account is required to enter credit card details.
Returns whether the account has credit card details stored.
Returns whether the account has no credit card details stored.
Returns whether this buyer needs to edit credit card because of bought paid plans
Returns timezone of this account.
Returns whether the account has at least a paid contract.
Returns whether the account is in the trial period, i.e. all paid contracts are in the trial period.
Returns the telephone number of the account.
Returns whether the account requires approval.
Returns UNIX timestamp of account creation (signup). Example: Converting timestamp to JavaScript Date.
<script>
var data = new Date({{ account.created_at }} * 1000);
</script>
Returns legal address, city and state.
Returns the applications of the account.
Returns an array with ServiceContract drops.
Returns the country of the account.
Returns the admin user of this account.
Returns the extra fields defined for the account as plain text.
Returns the fields defined for the account as plain text.
Returns extra fields with values of this account. Example: Print all extra fields.
{% for field in account.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all fields with values of this account. Example: Print all fields.
{% for field in account.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns the billing address of this account.
Returns whether this account has a billing address or not.
Give access to permission methods.
%{ if account.can.be_deleted? %}
<!-- do something -->
{% endif %}
Example: Using account plan drop in liquid.
<p class="notice">The examples for plan drop apply here</p>
Returns whether the plan is selected.
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
Returns whether the plan is bought.
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
Returns an array of available features.
Returns the setup fee.
Returns the name of the plan.
<h1>We offer you a new {{ plan.name }} plan!</h1>
Returns the system name of the plan.
{% for plan in available_plans %}
{% if plan.system_name == 'my_free_plan' %}
<input type="hidden" name="plans[system_name]" value="{{ plan.system_name }}"/>
<p>You will buy our only free plan!</p>
{% endif %}
{% endfor %}
Returns the plan ID.
The plan is free if it is not 'paid' (see the 'paid?' method).
{% if plan.free? %}
<p>This plan is free of charge.</p>
{% else %}
<div>
<p>Plan costs:</p>
<div>Setup fee {{ plan.setup_fee }}</div>
<div>Flat cost {{ plan.flat_cost }}</div>
</div>
{% endif %}
Returns the number of trial days in a plan.
<p>This plan has a free trial period of {{ plan.trial_period_days }} days.</p>
The plan is 'paid' when it has a non-zero fixed or setup fee or there are pricing rules present.
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
Returns whether the plan requires approval.
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
Returns the monthly fixed fee of the plan. (including currency)
Returns the monthly fixed fee of the plan.
Example: Using alert drop in liquid.
<h1>Alert details</h1>
<div>Level {{ alert.level }}</div>
<div>Message {{ alert.message }}</div>
<div>Utilization {{ alert.utilization }}</div>
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="alert[name]"
value="{{ alert.name }}"
class="{{ alert.errors.name | error_class }}"/>
{{ alert.errors.name | inline_errors }}
The alert level can be 50, 80, 90, 100, 120, 150, 200, or 300.
Text message describing the alert, for example 'SMS check status per minute: 5 of 5'.
Decimal number marking the actual utilization that triggered the alert (1.0 is equal to 100%).
Used by {{ alert.utilization | times: 100 }} percent.
Whether the alert has been read or not (boolean)
The current state of the alert ('unread', 'read' or 'deleted')
The URL that marks the alert as read
{{ 'Read' | update_button: alert.read_alert_url, class: 'mark-as-read', disable_with: 'Marking...', title: 'Mark as read' }}
A dom-friendly level identifier of the alert, for example 'above-100'
The formatted utilization level of the alert, for example '≥ 100 '
The URL that deletes the alert
{{ '<i class="fa fa-trash"></i>' | html_safe | link_to: alert.delete_alert_url, title: 'Delete alert', method: 'delete' }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="api_spec[name]"
value="{{ api_spec.name }}"
class="{{ api_spec.errors.name | error_class }}"/>
{{ api_spec.errors.name | inline_errors }}
Returns the url of the API spec.
Returns the name of the spec.
Returns the service of the spec if it has any or nil
otherwise.
Example: Using application drop in liquid.
<h1>Application {{ application.name }} (<span title="Application ID">{{ application.application_id }}</span>)</h1>
<p>{{ application.description }}</p>
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="application[name]"
value="{{ application.name }}"
class="{{ application.errors.name | error_class }}"/>
{{ application.errors.name | inline_errors }}
Returns the id of the application.
Returns 'true' if changing the application is allowed either directly or by request.
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect existing contracts.
There are three possible states:
- pending
- live
- suspended
Number of days left in the trial period.
Returns a plan drop with the plan of the application.
Returns name of the allowed action.
Returns a warning message for the allowed action.
Returns the admin_url of the application.
Returns the name of the application.
Returns 'true' if application state is pending.
Returns a list of not-deleted alerts for this application
Returns the description of the application.
Returns the redirect URL for the OAuth request of the application.
Returns the amount of referrer filters allowed for this application.
Returns the amount of application keys allowed for this application.
Returns the referrer filters associated with this application.
Returns the reason for rejecting an application.
Returns the user_key of application.
Returns the application_id of an application.
Returns the application id or the user key.
Returns URL of the built-in detail view for this application.
Returns URL of the built-in edit view for this application.
Service to which the application belongs to.
Returns the keys of an application.
{% case application.keys.size %}
{% when 0 %}
Generate your application key.
{% when 1 %}
<h3>Application key for {{ application.name }} {{ application.application_id }}</h3>
<p>Key is: {{ application.keys.first }}</p>
{% else %}
<h3>Application keys for {{ application.name }} {{ application.application_id }}</h3>
<ul>
{% for key in application.keys %}
<li>{{ key }}</li>
{% endfor %}
</ul>
{% endcase %}
Returns non-hidden extra fields with values for this application. Example: Print all extra fields.
{% for field in application.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all built-in and extra fields with values for this application. Example: Print all fields.
{% for field in application.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns only built-in fields of the application.
Returns whether the plan is selected.
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
Returns whether the plan is bought.
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
Returns the visible features of the plan.
{% if plan == my_free_plan %}
<p>These plans are the same.</p>
{% else %}
<p>These plans are not the same.</p>
{% endif %}
Returns the setup fee of the plan.
Returns the name of the plan.
<h1>We offer you a new {{ plan.name }} plan!</h1>
Returns the system name of the plan.
{% for plan in available_plans %}
{% if plan.system_name == 'my_free_plan' %}
<input type="hidden" name="plans[system_name]" value="{{ plan.system_name }}"/>
<p>You will buy our only free plan!</p>
{% endif %}
{% endfor %}
Returns the plan ID.
The plan is free if it is not 'paid' (see the 'paid?' method).
{% if plan.free? %}
<p>This plan is free of charge.</p>
{% else %}
<div>
<p>Plan costs:</p>
<div>Setup fee {{ plan.setup_fee }}</div>
<div>Flat cost {{ plan.flat_cost }}</div>
</div>
{% endif %}
Returns the number of trial days in a plan.
<p>This plan has a free trial period of {{ plan.trial_period_days }} days.</p>
The plan is 'paid' when it has a non-zero fixed or setup fee or there are pricing rules present.
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
Returns whether the plan requires approval.
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
Returns the monthly fixed fee of the plan. (including currency)
Returns the monthly fixed fee of the plan.
Returns the metrics of the plan.
Returns the usage limits of the plan.
Returns the service of the plan.
Name of the SSO Integration
Kind of the SSO Integration. Useful for styling.
OAuth authorize url.
OAuth callback url.
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="base[name]"
value="{{ base.name }}"
class="{{ base.errors.name | error_class }}"/>
{{ base.errors.name | inline_errors }}
Returns the title of result.
Returns the kind of result; can be 'topic' or 'page'.
Returns the resource URL of the result.
Returns a descriptive string for the result.
Plan of the contract {{ contract.plan.name }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="contract[name]"
value="{{ contract.name }}"
class="{{ contract.errors.name | error_class }}"/>
{{ contract.errors.name | inline_errors }}
Returns the id.
Returns true if any change is possible.
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect existing contracts.
There are three possible states:
- pending
- live
- suspended
Number of days left in the trial period.
Returns the plan of the contract.
Returns name of the allowed action.
Returns a warning message for the allowed action.
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="country[name]"
value="{{ country.name }}"
class="{{ country.errors.name | error_class }}"/>
{{ country.errors.name | inline_errors }}
Returns ID of the country.
{{ account.fields.country.value }} => 42
compare with:
{{ account.fields.country }} => 'United States'
Returns system name of the field.
Returns label of the field.
{{ account.fields.country.label }}
<!-- => 'Country' -->
Returns name of the country.
{{ account.fields.country }} => 'United States'
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="current_user[name]"
value="{{ current_user.name }}"
class="{{ current_user.errors.name | error_class }}"/>
{{ current_user.errors.name | inline_errors }}
Returns whether the user is an admin.
{% if user.admin? %}
<p>You are an admin of your account.</p>
{% endif %}
Returns the username of the user, HTML escaped.
Returns the account of the user.
Returns the first and last name of the user.
Returns true if user has stored oauth2 authorizations
Returns the email of the user.
This method will return true
for users using the built-in
Developer Portal authentication mechanisms and false
for
those that are authenticated via Janrain, CAS or other
single-sign-on method.
{{ if user.password_required? }}
<input name="account[user][password]" type="password">
<input name="account[user][password_confirmation]" type="password">
{{ endif }}
Returns the list of sections the user has access to.
{% if user.sections.size > 0 %}
<p>You can access following sections of our portal:</p>
<ul>
{% for section in user.sections %}
<li>{{ section }}</li>
{% endfor %}
</ul>
{% endif %}
Returns the role of the user.
Returns a list of available roles for the user.
{% for role in user.roles_collection %}
<li>
<label for="user_role_{{ role.key }}">
<input
{% if user.role == role.key %}
checked="checked"
{% endif %}
class="users_ids" id="user_role_{{ role.key }}" name="user[role]" type="radio" value="{{ role.key }}">
{{ role.text }}
</label>
</li>
{% endfor %}
Returns the resource URL of the user.
{{ 'Delete' | delete_button: user.url }}
Returns the URL to edit the user.
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
Exposes rights of current user which are dependent on your settings and user's role.
You can call these methods on the returned object:
liquid
(
{% if current_user.can.invite_users? %}
{{ '<i class="fa fa-trash pull-right"></i>' | html_safe | link_to: invitation.url, class: 'pull-right btn btn-link', method: 'delete' }}
{% endif %}
)
Returns non-hidden extra fields with values for this user. Example: Print all extra fields.
{% for field in user.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all fields with values for this user. Example: Print all fields.
{% for field in user.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all built-in fields with values for this user.
Returns SSO Authorizations collection.
When a form fails to submit because of invalid data, the `errors` array
will be available on the related model.
Returns value of the attribute to which this error
is related.
{{ account.errors.org_name.first.attribute }}
<!-- org_name -->
Returns description of the error.
{{ account.errors.first.message }}
<!-- can't be blank -->
Returns value of the attribute to which this error
is related.
{{ account.errors.org_name.first.value }}
<!-- => "ACME Co." -->
Returns full description of the error (includes the attribute name).
{{ model.errors.first }}
<!-- => "Attribute can't be blank" -->
Example: Get all errors.
{% for error in form.errors %}
attribute: {{ error.attribute }}
...
{% endfor %}
Returns true if there are no errors.
{% if form.errors == empty %}
Contgratulations! You have no errors!
{% endfor %}
Returns true if there are errors.
{% if form.errors == present %}
Sorry, there were errors.
{% endfor %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="feature[name]"
value="{{ feature.name }}"
class="{{ feature.errors.name | error_class }}"/>
{{ feature.errors.name | inline_errors }}
Returns the name of the feature.
<h1>Feature {{ feature.name }}</h1>
Returns the description of the feature.
Returns description of the feature or information that there is no description.
{% if feature.has_description? %}
{{ feature.description }}
{% else %}
This feature has no description.
{% endif %}
Returns system name of the feature (system wide unique name).
{% if feature.system_name == 'promo_feature' %}
<div>This feature is available only today!</div>
{% endif %}
Returns value of the field.
Name: {{ account.fields.first_name.value }}
Returns system name of the field.
Returns the name for the HTML input that is expected when the form is submitted.
<input name="{{ account.fields.country.input_name }}" value="{{account.fields.country}}" />
<!-- the 'name' attribute will be 'account[country]' -->
Returns a unique field identifier that is commonly used as HTML ID attribute.
{{ account.fields.country.html_id }}
<!-- => 'account_country' -->
Returns label of the field.
{{ account.fields.country.label }}
<!-- => 'Country' -->
Returns the value of the field if used as variable.
{{ account.fields.first_name }} => 'Tom'
Returns array of choices available for that field, if any. For example,
for a field called fruit
it may respond with ['apple', 'bannana', 'orange']
.
You can define the choices in your [admin dashboard][fields-definitions].
Each of the array elements responds to id
and label
which
are usually just the same unless the field is a special built-in one (like country
)
It is recommended to use those methods rather that output the choice
'as is'
for future compatibility.
{% for choice in field.choices %}
<select name="{{ field.input_name }}" id="{{ field.html_id }}_id"
class="{{ field.errors | error_class }}">
<option {% if field.value == choice %} selected {% endif %} value="{{ choice.id }}">
{{ choice }}
</option>
{% endfor %}
Returns an array of messages.
{% for message in flash.messages %}
<p id="flash-{{ message.type }}">
{{ message.text }}
</p>
{% endfor %}
Returns true if you have forum functionality enabled.
{% if forum.enabled? %}
<a href="/forum">Check out our forum!</a>
{% endif %}
Provide useful strings for i18n support:
{{ object.some_date | date: i18n.long_date }}
Alias for %b %d
.
Dec 11
Alias for %B %d, %Y
.
December 11, 2013
Alias for %Y-%m-%d
.
2013-12-11
Alias for %d %b %Y %H:%M:%S %Z
.
"16 Mar 2017 16:45:21 UTC"
<div> Email: {{ invitation.email }} </div>
<div>
<tr id="invitation_{{ invitation.id }}">
<td> {{ invitation.email }} </td>
<td> {{ invitation.sent_at | date: i18n.short_date }} </td>
<td>
{% if invitation.accepted? %}
yes, on {{invitation.accepted_at | format: i18n.short_date }}
{% else %}
no
{% endif %}
</td>
</tr>
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="invitation[name]"
value="{{ invitation.name }}"
class="{{ invitation.errors.name | error_class }}"/>
{{ invitation.errors.name | inline_errors }}
Returns email address.
Returns true if the invitation was accepted.
Returns a date if the invitation was accepted.
{{ invitation.accepted_at | date: i18n.short_date }}
Returns the creation date.
{{ invitation.sent_at | date: i18n.short_date }}
Returns the URL to resend the invitation.
{{ "Resend" | update_button: invitation.resend_url}}
Returns the resource URL.
{{ "Delete" | delete_button: invitation.url }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="invoice[name]"
value="{{ invoice.name }}"
class="{{ invoice.errors.name | error_class }}"/>
{{ invoice.errors.name | inline_errors }}
Returns a friendly id
<td> {{ invoice.friendly_id }} </td>
<td> {{ invoice.name }} </td>
<td> {{ invoice.state }} </td>
<td> {{ invoice.cost }} {{ invoice.currency }} </td>
Returns a string composed of month and year.
Returns a number with two decimals.
23.00
Returns cost without VAT.
Returns VAT rate.
Returns VAT ammount.
Return true if the PDF was generated.
{{ invoice.period_begin | date: i18n.short_date }}
{{ invoice.period_end | date: i18n.long_date }}
{{ invoice.issued_on | date: i18n.long_date }}
{{ invoice.due_on | date: i18n.long_date }}
{{ invoice.paid_on | date: i18n.long_date }}
Returns an AccountDrop.
Returns an array of LineItemDrop.
{% for line_item in invoice.line_items %}
<tr class="line_item {% cycle 'odd', 'even' %}">
<th>{{ line_item.name }}</th>
<td>{{ line_item.description }}</td>
<td>{{ line_item.quantity }}</td>
<td>{{ line_item.cost }}</td>
</tr>
{% endfor %}
Returns an array of PaymentTransactionDrop.
{% for payment_transaction in invoice.payment_transactions %}
<tr>
<td> {% if payment_transaction.success? %} Success {% else %} Failure {% endif %} </td>
<td> {{ payment_transaction.created_at }} </td>
<td> {{ payment_transaction.reference }} </td>
<td> {{ payment_transaction.message }} </td>
<td> {{ payment_transaction.amount }} {{ payment_transaction.currency }} </td>
</tr>
{% endfor %}
Returns the resource URL of the invoice.
{{ "Show" | link_to: invoice.url }}
Returns the resource URL of the invoice PDF.
{{ "PDF" | link_to: invoice.pdf_url }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="line_item[name]"
value="{{ line_item.name }}"
class="{{ line_item.errors.name | error_class }}"/>
{{ line_item.errors.name | inline_errors }}
{% for line_item in invoice.line_items %}
<tr class="line_item {% cycle 'odd', 'even' %}">
<th>{{ line_item.name }}</th>
<td>{{ line_item.description }}</td>
<td>{{ line_item.quantity }}</td>
<td>{{ line_item.cost }}</td>
</tr>
{% endfor %}
Possible types of the messages are:
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="message[name]"
value="{{ message.name }}"
class="{{ message.errors.name | error_class }}"/>
{{ message.errors.name | inline_errors }}
Returns the ID of the message.
If subject is not present then either a truncated body or (no subject)
string is returned.
Returns body of the message.
Returns the creation date.
{{ message.created_at | date: i18n.short_date }}
URL of the message detail, points either to inbox or outbox.
Either 'read' or 'unread'.
Returns the name of the sender.
Returns the name of the receiver.
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="metric[name]"
value="{{ metric.name }}"
class="{{ metric.errors.name | error_class }}"/>
{{ metric.errors.name | inline_errors }}
Returns the unit of the metric.
This metric is measured in {{ metric.unit | pluralize }}
Returns the description of the metric.
Returns the name of the metric.
<h3>Metric {{ metric.name }}</h3>
<p>{{ metric.description }}</p>
Returns the system name of the metric.
<h3>Metric {{ metric.name }}</h3>
<p>{{ metric.system_name }}</p>
Returns the usage limits of the metric.
{% if metric.usage_limits.size > 0 %}
<p>Usage limits of the metric</p>
<ul>
{% for usage_limit in metric.usage_limits %}
<li>{{ usage_limit.period }} : {{ usage_limit.value }}</li>
{% endfor %}
</ul>
{% else %}
<p>This metric has no usage limits.</p>
{% endif %}
Returns the pricing rules of the metric.
{% if metric.pricing_rules.size > 0 %}
<p>Pricing rules of the metric</p>
<ul>
{% for pricing_rule in metric.pricing_rules %}
<li>{{ pricing_rule.cost_per_unit }}</li>
{% endfor %}
</ul>
{% else %}
<p>This metric has no pricing rules.</p>
{% endif %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="page[name]"
value="{{ page.name }}"
class="{{ page.errors.name | error_class }}"/>
{{ page.errors.name | inline_errors }}
Returns the title of the page.
<title>{{ page.title }}</title>
Returns system name of the page.
{% if page.system_name == 'my_page' %}
{% include 'custom_header' %}
{% endif %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="page[name]"
value="{{ page.name }}"
class="{{ page.errors.name | error_class }}"/>
{{ page.errors.name | inline_errors }}
Number of items on one full page.
<div class="pagination">
{% for part in pagination.parts %}
{% if part.is_link %}
{% case part.rel %}
{% when 'previous' %}
{% assign css_class = 'previous_page' %}
{% when 'next' %}
{% assign css_class = 'next_page' %}
{% else %}
{% assign css_class = '' %}
{% endcase %}
<a class="{{ css_class }}" rel="{{ part.rel}}" href="{{ part.url }}">{{ part.title }}</a>
{% else %}
{% case part.rel %}
{% when 'current' %}
<em class="current">{{ part.title }}</em>
{% when 'gap' %}
<span class="gap">…</span>
{% else %}
<span>{{ part.title }}</span>
{% endcase %}
{% endif %}
{% endfor %}
</div>
<!-- Outputs:
============================================
<div class="pagination">
<a class="previous_page" rel="prev" href="?page=7">← Previous</a>
<a rel="start" href="?page=1">1</a>
<a href="?page=2">2</a>
<a href="?page=3">3</a>
<a href="?page=4">4</a>
<a href="?page=5">5</a>
<a href="?page=6">6</a>
<a rel="prev" href="?page=7">7</a>
<em class="current">8</em>
<a rel="next" href="?page=9">9</a>
<a href="?page=10">10</a>
<a href="?page=11">11</a>
<a href="?page=12">12</a>
<span class="gap">…</span>
<a href="?page=267">267</a>
<a href="?page=268">268</a>
<a class="next_page" rel="next" href="?page=9">Next →</a>
</div>
=======================================
-->
Number of the currently selected page.
Items skipped so far.
Total number of pages.
Total number of items in all pages.
Number of the previous page or empty.
Number of the next page or empty.
Elements that render a user-friendly pagination. See the part drop for more information.
Returns whether current payment gateway is authorize.Net.
Returns whether current payment gateway is authorize.Net.
Returns the type of the payment gateway.
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="payment_transaction[name]"
value="{{ payment_transaction.name }}"
class="{{ payment_transaction.errors.name | error_class }}"/>
{{ payment_transaction.errors.name | inline_errors }}
Returns the currency.
{% for payment_transaction in invoice.payment_transactions %}
<tr>
<td> {% if payment_transaction.success? %} Success {% else %} Failure {% endif %} </td>
<td> {{ payment_transaction.created_at }} </td>
<td> {{ payment_transaction.reference }} </td>
<td> {{ payment_transaction.message }} </td>
<td> {{ payment_transaction.amount }} {{ payment_transaction.currency }} </td>
</tr>
{% endfor %}
Returns the amount.
Returns the creation date.
Returns true if successful.
Returns the message of the transaction.
Returns the reference.
An attempt of plan change. It is used in plan upgrade workflow when developer does not have credit card details filled in and wants to upgrade to a paid plan
<div class="row">
<div class="col-md-9">
{% if plan_changes.size > 0 %}
<p>
You have begun to change plans of the following applications. <br>
Please review.
</p>
<table class="table panel panel-default" id="applications">
<thead class="panel-heading">
<tr>
<th>Name</th>
<th>Chosen plan</th>
<th>Accept</th>
<th>Reject</th>
</tr>
</thead>
<tbody class="panel-body">
{% for change in plan_changes %}
<tr class="{% cycle 'applications': 'odd', 'even' %}" id="application_{{ change.contract_id }}">
<td>
{{ change.contract_name }}
</td>
<td>
From <strong>{{ change.plan_name }}</strong> to <strong>{{ change.new_plan_name }}</strong>
</td>
<td>
{{ 'Confirm' | update_button: change.confirm_path , class: 'plan-change-button' }}
</td>
<td>
{{ 'Cancel' | delete_button: change.cancel_path , class: 'plan-change-button' }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>
You have no changes in your application plans.
{{ 'Go back to applications' | link_to: urls.applications }}
</p>
{% endif %}
</div>
</div>
Returns the contract on which the changes will apply.
Returns the chosen plan.
Returns the current plan.
Returns the url to confirm the change. The request method must be POST
Returns the url to cancel the change. The request method must be DELETE
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="plan_feature[name]"
value="{{ plan_feature.name }}"
class="{{ plan_feature.errors.name | error_class }}"/>
{{ plan_feature.errors.name | inline_errors }}
Returns the name of the feature.
<h1>Feature {{ feature.name }}</h1>
Returns the description of the feature.
Returns description of the feature or information that there is no description.
{% if feature.has_description? %}
{{ feature.description }}
{% else %}
This feature has no description.
{% endif %}
Returns system name of the feature (system wide unique name).
{% if feature.system_name == 'promo_feature' %}
<div>This feature is available only today!</div>
{% endif %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="post[name]"
value="{{ post.name }}"
class="{{ post.errors.name | error_class }}"/>
{{ post.errors.name | inline_errors }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="post[name]"
value="{{ post.name }}"
class="{{ post.errors.name | error_class }}"/>
{{ post.errors.name | inline_errors }}
Text of the post.
Every post belongs to a topic.
Date when this post created.
{{ post.created_at | date: i18n.short_date }}
The URL of this post within its topic.
Returns the cost per unit of the pricing rule. Example: Using pricing rule drop in liquid.
<h1>Pricing rule</h1>
<div>Min value {{ pricing_rule.min }}</div>
<div>Max value {{ pricing_rule.max }}</div>
<div>Cost per unit {{ pricing_rule.cost_per_unit }}</div>
Returns the minimum value of the pricing rule.
Returns the maximum value of the pricing rule.
Returns plan of pricing rule.
Returns name of your organization. That can be changed via the [admin dashboard][provider-account-edit].
<div>Domain {{ provider.domain }}</div>
{% if provider.multiple_applications_allowed? %}
<div>
<p>Applications</p>
<ul>
{% for app in account.applications %}
<li>{{ app.name }}</li>
{% endfor %}
</ul>
</div>
{% else %}
<div>Application {{ account.applications.first.name }}</div>
{% endif %}
For general questions contact us at {{ provider.support_email }}.
For invoice or payment related questions contact us at {{ provider.finance_support_email }}.
Can be composed by legal address, city and state.
Returns the country.
Returns the payment gateway associated with your organization.
Domain of your developer portal.
Returns timezone that you use. Can be changed in your [administration dashboard][provider-account-edit].
Support email of the account.
Finance support email of the account.
Returns the telephone number of the account.
True if developers can have more separate applications with their own keys, stats, etc. Depends on your 3scale plan.
{% if provider.multiple_applications_allowed? %}
<div>
<p>Applications</p>
<ul>
{% for app in account.applications %}
<li>{{ app.name }}</li>
{% endfor %}
</ul>
</div>
{% else %}
<div>Application {{ account.applications.first.name }}</div>
{% endif %}
Returns the logo URL.
<img src="{{ provider.logo_url }}"/>
True if your 3scale plan allows you to manage multiple APIs as separate [services][support-terminology-service].
{% if provider.multiple_services_allowed? %}
{% for service in provider.services %}
Service {{ service.name }} is available.
{% endfor %}
{% endif %}
True if the developer accounts can have multiple logins associated with them (depends on your 3scale plan) and its visibility has been turned on for your develoeper portal in the [settings][cms-feature-visibility].
{% if provider.multiple_users_allowed? %}
<ul id="subsubmenu">
<li>
{{ 'Users' | link_to: urls.users }}
</li>
<li>
{{ 'Sent invitations' | link_to: urls.invitations }}
</li>
</ul>
{% endif %}
True if the developer accounts are allowed to see published account plans.
{% if provider.account_plans_allowed? %}
{% for plan in account_plans %}
{{ plan.name }}
{% endfor %}
{% endif %}
Returns all published account plans.
<p>We offer following account plans:</p>
<ul>
{% for plan in model.account_plans %}
<li>{{ plan.name }} <input type="radio" name="plans[id]" value="{{ plan.id }}"/></li>
{% endfor %}
</ul>
Returns all defined services.
<p>You can sign up to any of our services!</p>
<ul>
{% for service in provider.services %}
<li>{{ service.name }} <a href="/signup/service/{{ service.system_name }}">Signup!</a></li>
{% endfor %}
You can enable or disable signups in the [usage rules section][usage-rules] of your admin dashboard.
You can enable or disable account management in the [usage rules section][usage-rules].
Returns API spec collection.
<ul>
{% for api_spec in provider.api_specs %}
<li>{{ api_spec.system_name }}</li>
{% endfor %}
</ul>
Example: Using request drop in liquid.
<h1>Request details</h1>
<div>URI {{ request.request_uri }}</div>
<div>Host {{ request.host }}</div>
<div>Host and port {{ request.host_with_port }}</div>
Returns the URI of the request.
Returns the host with port of the request.
Returns the host part of the request URL.
Returns the path part of the request URL.
{% if request.path == '/' %}
Welcome on a landing page!
{% else %}
This is just an ordinary page.
{% endif %}
Returns internal name of the role, important for the system.
Returns description of the role.
Returns the authentication provider name.
{% for authorization in current_user.sso_authorizations %}
<p>{{ authorization.authentication_provider_system_name }}</p>
{% endfor %}
Returns the id_token.
{% for authorization in current_user.sso_authorizations %}
<p>{{ authorization.id_token }}</p>
{% endfor %}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="search[name]"
value="{{ search.name }}"
class="{{ search.errors.name | error_class }}"/>
{{ search.errors.name | inline_errors }}
Returns the searched string.
<h2>{{ search.token }}</h2>
<p>found on {{ search.total_found }} {{ search.item | pluralize }} </p>
<dl>
{% for result in search.results %}
<dt>
<span class="kind"> [ {{ result.kind | capitalize}} ] </span>
{{ result.title | link_to: result.url }}
</dt>
<dd>
{{ result.description }}
</dd>
{% endfor %}
</dl>
Returns the number of matching elements.
Returs an array of results for the search.
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="service[name]"
value="{{ service.name }}"
class="{{ service.errors.name | error_class }}"/>
{{ service.errors.name | inline_errors }}
Returns the name of the service.
Returns the system name of the service.
{% case service.system_name %}
{% when 'api' %}
API is our newest service!
{% when 'old' %}
Unfortunately we dont allow more signups to our old service.
{% endcase %}
Returns the description of the service.
Returns whether the service is subscribed to.
{% if service.subscribed? %}
<p>You already subscribed to this service.</p>
{% endif %}
Returns subscription (ServiceContract
drop) of the currently
logged in user if they are subscribed to this service, Nil otherwise.
{% if service.subscription %}
Your applications for service {{ service.name }} are:
{% for app in service.subscription.applications %}
{{ app.name }}<br/>
{% endfor %}
{% else %}
<p>You are not subscribed to this.</p>
{% endif %}
Returns the published application plans of the service.
{% for service in model.services %}
<h3>{{ service.name }} application plans:</h3>
<dl>
{% for application_plan in service.application_plans %}
<dt>{{ application_plan.name }}</dt>
<dd>{{ application_plan.system_name }}</dd>
{% endfor %}
</dl>
{% endfor %}
Returns the published service plans of the service.
<p>We offer following service plans:</p>
<dl>
{% for service in model.services %}
{% for service_plan in service.service_plans %}
<dt>{{ service_plan.name }}</dt>
<dd>{{ service_plan.system_name }}</dd>
{% endfor %}
{% endfor %}
</dl>
Returns the application plans of the service.
Returns the visible features of the service.
{% if service.features.size > 0 %}
<p>{{ service.name }} has following features:</p>
<ul>
{% for feature in service.features %}
<li>{{ feature.name }}</li>
{% endfor %}
</ul>
{% else %}
<p>Unfortunately, {{ service.name }} currently has no features.</p>
{% endif %}
Depending on the authentication mode set, returns either 'ID', 'API key' or 'Client ID' for OAuth authentication.
{{ service.application_key_name }}
Returns the metrics of the service.
<p>On {{ service.name }} we measure following metrics:</p>
<ul>
{% for metric in service.metrics %}
<li>{{ metric.name }}</li>
{% endfor %}
</ul>
Support email of the service.
Returns API spec collection.
<ul>
{% for api_spec in service.api_specs %}
<li>{{ api_spec.system_name }}</li>
{% endfor %}
</ul>
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="service_contract[name]"
value="{{ service_contract.name }}"
class="{{ service_contract.errors.name | error_class }}"/>
{{ service_contract.errors.name | inline_errors }}
Returns true if any change is possible.
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect existing contracts.
There are three possible states:
- pending
- live
- suspended
Number of days left in the trial period.
Returns the plan of the contract.
Returns name of the allowed action.
Returns a warning message for the allowed action.
Exposes specific rights of the current user for that subscription.
{% if subscription.can.change_plan? %}
...
{% endif %}
Returns whether the plan is selected.
{% if plan.selected? %}
<p>You will signup to {{ plan.name }}</p>
{% endif %}
Returns whether the plan is bought.
{% if plan.bought? %}
<p>You are on this plan already!</p>
{% endif %}
Returns the visible features of the plan.
{% if plan == my_free_plan %}
<p>These plans are the same.</p>
{% else %}
<p>These plans are not the same.</p>
{% endif %}
Returns the setup fee of the plan.
Returns the name of the plan.
<h1>We offer you a new {{ plan.name }} plan!</h1>
Returns the system name of the plan.
{% for plan in available_plans %}
{% if plan.system_name == 'my_free_plan' %}
<input type="hidden" name="plans[system_name]" value="{{ plan.system_name }}"/>
<p>You will buy our only free plan!</p>
{% endif %}
{% endfor %}
Returns the plan ID.
The plan is free if it is not 'paid' (see the 'paid?' method).
{% if plan.free? %}
<p>This plan is free of charge.</p>
{% else %}
<div>
<p>Plan costs:</p>
<div>Setup fee {{ plan.setup_fee }}</div>
<div>Flat cost {{ plan.flat_cost }}</div>
</div>
{% endif %}
Returns the number of trial days in a plan.
<p>This plan has a free trial period of {{ plan.trial_period_days }} days.</p>
The plan is 'paid' when it has a non-zero fixed or setup fee or there are pricing rules present.
{% if plan.paid? %}
<p>this plan is a paid one.</p>
{% else %}
<p>this plan is a free one.</p>
{% endif %}
Returns whether the plan requires approval.
{% if plan.approval_required? %}
<p>This plan requires approval.</p>
{% endif %}
Returns the monthly fixed fee of the plan. (including currency)
Returns the monthly fixed fee of the plan.
Example: Using service plan drop in liquid.
<p class="notice">The examples for plan drop apply here</p>
<div>Service of this plan {{ plan.service.name }}</div>
Returns current month (1-12).
Returns current day of the month (1-31).
Returns current year. Example: Create dynamic copyright
<span class="copyright">©{{ today.year }}</span>
Returns the date of beginning of current month.
This month began on {{ today.beginning_of_month | date: '%A' }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="topic[name]"
value="{{ topic.name }}"
class="{{ topic.errors.name | error_class }}"/>
{{ topic.errors.name | inline_errors }}
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="topic[name]"
value="{{ topic.name }}"
class="{{ topic.errors.name | error_class }}"/>
{{ topic.errors.name | inline_errors }}
Name of the topic. Submitted when first post to the thread is posted.
True if the path of the current page is the same as this one
or it's a subpath of it (i.e. extended by ID). For
example with {{ urls.messages_outbox }}
these will return true:
But not these:
See also '#active?', '#current?'.
True if the URL's path is the the same as of the current. Parameters and other components are not taken into account. See also '#active?'.
{% assign url = urls.messages_inbox %}
<!-- => http://awesome.3scale.net/admin/messages/sent -->
<!-- Current page: http://awesome.3scale.net/admin/messages/sent?unread=1 -->
{{ url.current? }} => true
<!-- Current page: http://awesome.3scale.net/admin/messages -->
{{ url.current? }} => false
True if the current page is in the same menu structure as this URL. See also '#current?'.
{% assign url = urls.messages_inbox %}
<!-- => http://awesome.3scale.net/admin/messages/sent -->
<!-- Current page: http://awesome.3scale.net/admin/messages -->
{{ url.active? }} => true
<!-- Current page: http://awesome.3scale.net/admin/messages/trash -->
{{ url.active? }} => true
<!-- Current page: http://awesome.3scale.net/admin/stats -->
{{ url.active? }} => false
<a href="{{ urls.signup }}">sign up here</a>
<a href="{{ urls.service_subscription }}">subscribe to a service here</a>
URL of a signup page. Accessible for everyone.
<a href="{{ urls.signup }}?{{ service_plan | param_filter }}&{{ app_plan | param_filter }}" >Signup Now!</a>
URL which all the search requests should be sent to.
<form action="{{ urls.search }}" method="get">
<input name="q" type="text" title="Search the site" value=""/>
<input type="submit" value="Search" name="commit">
</form>
URL to the service subscription page. Only for logged in users.
<a href="{{ urls.service_subscription }}?{{ service_plan | param_filter }}" >
Subscribe to service {{ service.name }}
</a>
URL to a page that allows the developer to contact provider via the internal messaging system.
URL to a page that allows the developer to contact provider via the internal messaging system.
URL to the list of messages sent by a developer.
URL or Nil if user account management is disabled (check your [usage rules section][usage-rules]).
A page with API key(s) and other authentication information. Depends on the authentication strategy.
Page to invite new users.
List of all the sent invitations.
URL to the list of received messages.
A page to enter credit card details. Differs depending on the payment gateway of your choice.
Example: Using usage limit drop in liquid.
You cannot do more than {{ limit.value }} {{ limit.metric.unit }}s per {{ limit.period }}
Returns the period of the usage limit.
Usually hits
but can be any custom method.
Returns the value of the usage limit.
<h1>User {{ user.display_name }}</h1>
<div>Account {{ user.account.name }}</div>
<div>Username {{ user.username }}</div>
<div>Email {{ user.email }}</div>
<div>Website {{ user.website }}</div>
If a form for this model is rendered after unsuccessful submission, this returns the errors that occurred.
<input name="user[name]"
value="{{ user.name }}"
class="{{ user.errors.name | error_class }}"/>
{{ user.errors.name | inline_errors }}
Returns whether the user is an admin.
{% if user.admin? %}
<p>You are an admin of your account.</p>
{% endif %}
Returns the username of the user, HTML escaped.
Returns the account of the user.
Returns the first and last name of the user.
Returns true if user has stored oauth2 authorizations
Returns the email of the user.
This method will return true
for users using the built-in
Developer Portal authentication mechanisms and false
for
those that are authenticated via Janrain, CAS or other
single-sign-on method.
{{ if user.password_required? }}
<input name="account[user][password]" type="password">
<input name="account[user][password_confirmation]" type="password">
{{ endif }}
Returns the list of sections the user has access to.
{% if user.sections.size > 0 %}
<p>You can access following sections of our portal:</p>
<ul>
{% for section in user.sections %}
<li>{{ section }}</li>
{% endfor %}
</ul>
{% endif %}
Returns the role of the user.
Returns a list of available roles for the user.
{% for role in user.roles_collection %}
<li>
<label for="user_role_{{ role.key }}">
<input
{% if user.role == role.key %}
checked="checked"
{% endif %}
class="users_ids" id="user_role_{{ role.key }}" name="user[role]" type="radio" value="{{ role.key }}">
{{ role.text }}
</label>
</li>
{% endfor %}
Returns the resource URL of the user.
{{ 'Delete' | delete_button: user.url }}
Returns the URL to edit the user.
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
Gives access to permission methods.
{% if user.can.be_managed? %}
<!-- do something -->
{% endif %}
Returns non-hidden extra fields with values for this user. Example: Print all extra fields.
{% for field in user.extra_fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all fields with values for this user. Example: Print all fields.
{% for field in user.fields %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Returns all built-in fields with values for this user.