-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from s-ohnishi/v5compatible
Changes to increase compatibility with v5
- Loading branch information
Showing
23 changed files
with
219 additions
and
224 deletions.
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
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<form action="/companies/create" role="form" method="post"> | ||
<form action="{{ url('companies/create') }}" role="form" method="post"> | ||
<ul class="pager"> | ||
<li class="previous pull-left"> | ||
{{ link_to("products", "← Go Back") }} | ||
{{ tag.a(url('companies'), '← Go Back', [], true) }} | ||
</li> | ||
<li class="pull-right"> | ||
{{ submit_button("Save", "class": "btn btn-success") }} | ||
{{ tag.inputSubmit('Save', 'Save', ['class': 'btn btn-success', 'id':null, 'name':null]) }} | ||
</li> | ||
</ul> | ||
|
||
<fieldset> | ||
{% for element in form %} | ||
{% if is_a(element, 'Phalcon\Forms\Element\Hidden') %} | ||
{{ element }} | ||
{% else %} | ||
<div class="form-group"> | ||
{{ element.label() }} | ||
{{ element.render(['class': 'form-control']) }} | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
{% for element in form %} | ||
{% if is_a(element, 'Phalcon\Forms\Element\Hidden') %} | ||
{{ element }} | ||
{% else %} | ||
<div class="form-group"> | ||
{{ element.label() }} | ||
{{ element.render(['class': 'form-control']) }} | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</fieldset> | ||
</form> |
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 |
---|---|---|
@@ -1,52 +1,50 @@ | ||
<ul class="pager"> | ||
<li class="previous pull-left"> | ||
{{ link_to("companies/index", "← Go Back") }} | ||
{{ tag.a(url('companies'), '← Go Back', [], true) }} | ||
</li> | ||
<li class="pull-right"> | ||
{{ link_to("companies/new", "Create companies") }} | ||
{{ tag.a(url('companies/new'), 'Create companies') }} | ||
</li> | ||
</ul> | ||
|
||
{% for company in page.items %} | ||
{% if loop.first %} | ||
<table class="table table-bordered table-striped" align="center"> | ||
<thead> | ||
{% if loop.first %} | ||
<table class="table table-bordered table-striped" align="center"> | ||
<thead> | ||
<tr> | ||
<th>Id</th> | ||
<th>Name</th> | ||
<th>Telephone</th> | ||
<th>Address</th> | ||
<th>City</th> | ||
</tr> | ||
</thead> | ||
{% endif %} | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>{{ company.id }}</td> | ||
<td>{{ company.name }}</td> | ||
<td>{{ company.telephone }}</td> | ||
<td>{{ company.address }}</td> | ||
<td>{{ company.city }}</td> | ||
<td width="7%">{{ link_to("companies/edit/" ~ company.id, '<i class="glyphicon glyphicon-edit"></i> Edit', "class": "btn btn-default") }}</td> | ||
<td width="7%">{{ link_to("companies/delete/" ~ company.id, '<i class="glyphicon glyphicon-remove"></i> Delete', "class": "btn btn-default") }}</td> | ||
</tr> | ||
</tbody> | ||
{% if loop.last %} | ||
<tbody> | ||
{% endif %} | ||
<tr> | ||
<td>{{ company.id }}</td> | ||
<td>{{ company.name }}</td> | ||
<td>{{ company.telephone }}</td> | ||
<td>{{ company.address }}</td> | ||
<td>{{ company.city }}</td> | ||
<td width="7%">{{ tag.a(url('companies/edit/' ~ company.id), "<i class=\"glyphicon glyphicon-edit\"></i> Edit", ['class': 'btn btn-default'], true) }}</td> | ||
<td width="7%">{{ tag.a(url('companies/delete/' ~ company.id), "<i class=\"glyphicon glyphicon-remove\"></i> Delete", ['class': 'btn btn-default'], true) }}</td> | ||
</tr> | ||
{% if loop.last %} | ||
<tr> | ||
<td colspan="7" align="right"> | ||
<div class="btn-group"> | ||
{{ link_to("companies/search", '<i class="icon-fast-backward"></i> First', "class": "btn btn-default") }} | ||
{{ link_to("companies/search?page=" ~ page.getPrevious(), '<i class="icon-step-backward"></i> Previous', "class": "btn btn-default") }} | ||
{{ link_to("companies/search?page=" ~ page.getNext(), '<i class="icon-step-forward"></i> Next', "class": "btn btn-default") }} | ||
{{ link_to("companies/search?page=" ~ page.getLast(), '<i class="icon-fast-forward"></i> Last', "class": "btn btn-default") }} | ||
{{ tag.a(url('companies/search'), "<i class=\"icon-fast-backward\"></i> First", ['class': 'btn btn-default'], true) }} | ||
{{ tag.a(url('companies/search?page=') ~ page.getPrevious(), "<i class=\"icon-step-backward\"></i> Previous", ['class': 'btn btn-default'], true) }} | ||
{{ tag.a(url('companies/search?page=') ~ page.getNext(), "<i class=\"icon-step-forward\"></i> Next", ['class': 'btn btn-default'], true) }} | ||
{{ tag.a(url('companies/search?page=') ~ page.getLast(), "<i class=\"icon-fast-forward\"></i> Last", ['class': 'btn btn-default'], true) }} | ||
<span class="help-inline">{{ page.getCurrent() }}/{{ page.getLast() }}</span> | ||
</div> | ||
</td> | ||
</tr> | ||
<tbody> | ||
</table> | ||
{% endif %} | ||
<tbody> | ||
</table> | ||
{% endif %} | ||
{% else %} | ||
No companies were found... | ||
{% endfor %} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="jumbotron"> | ||
<h1>Unauthorized</h1> | ||
<p>You don't have access to this option. Contact an administrator</p> | ||
<p>{{ link_to('index', 'Home', 'class': 'btn btn-primary') }}</p> | ||
<p>{{ tag.a(url('index'), 'Home', ['class':'btn btn-primary']) }}</p> | ||
</div> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="jumbotron"> | ||
<h1>Page not found</h1> | ||
<p>Sorry, you have accessed a page that does not exist or was moved</p> | ||
<p>{{ link_to('index', 'Home', 'class': 'btn btn-primary') }}</p> | ||
<p>{{ tag.a(url('index'), 'Home', ['class':'btn btn-primary']) }}</p> | ||
</div> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="jumbotron"> | ||
<h1>Internal Error</h1> | ||
<p>Something went wrong, if the error continue please contact us</p> | ||
<p>{{ link_to('index', 'Home', 'class': 'btn btn-primary') }}</p> | ||
<p>{{ tag.a(url('index'), 'Home', ['class':'btn btn-primary']) }}</p> | ||
</div> |
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
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<h2 class="mb-3">Update your profile</h2> | ||
|
||
<form action="/invoices/profile" role="form" method="post" id="profileForm"> | ||
<form action="{{ url('invoices/profile') }}" role="form" method="post" id="profileForm"> | ||
<div class="form-group"> | ||
{{ form.label('name', ['class': 'control-label']) }} | ||
{{ form.render('name', ['class': 'form-control']) }} | ||
{{ form.label('name', ['class': 'control-label']) }} | ||
{{ form.render('name', ['class': 'form-control']) }} | ||
<div class="alert alert-warning" id="name_alert"> | ||
<strong>Warning!</strong> Please enter your full name | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
{{ form.label('email', ['class': 'control-label']) }} | ||
{{ form.render('email', ['class': 'form-control']) }} | ||
{{ form.label('email', ['class': 'control-label']) }} | ||
{{ form.render('email', ['class': 'form-control']) }} | ||
<div class="alert alert-warning" id="email_alert"> | ||
<strong>Warning!</strong> Please enter your email | ||
</div> | ||
</div> | ||
|
||
<input type="button" value="Update" class="btn btn-primary btn-large btn-info" onclick="Profile.validate()"> | ||
{{ link_to('invoices/index', 'Cancel', "class": "btn btn-default") }} | ||
{{ tag.a(url('invoices/index'), 'Cancel', ['class':'btn btn-default']) }} | ||
</form> |
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
Oops, something went wrong.