Commit 45cb0dd9 by Thanh Hung Pham

Fix comment - change <%- -%> to <% %>

parent 6300126d
<%- provide('title', 'Industries') -%>
<% provide('title', 'Industries') %>
<div class="well">
<h3> Industry list </h3>
<div class="list_categories">
<div class="row">
<%- @categories.each do |category| -%>
<%- if category.job_category.count > 0 -%>
<% @categories.each do |category| %>
<% if category.job_category.count > 0 %>
<div class="col-md-3">
<%= link_to category.name, category_path(category.id) %>
(<%= pluralize(category.job_category.count, 'job') %>)
</div>
<%- end -%>
<%- end -%>
<% end %>
<% end %>
</div>
</div>
</div>
<%- provide(:title, 'Cities') -%>
<% provide(:title, 'Cities') %>
<div class="well">
<h3> City list </h3>
<div class="list_areas">
<div class="row">
<%- @areas.each do |area| -%>
<% @areas.each do |area| %>
<div class="col-md-6">
<h4><%= area.name %></h4>
</div>
<%- end -%>
<% end %>
</div>
</div>
</div>
<%- @areas.each do |area| -%>
<% @areas.each do |area| %>
<div class="well">
<h3> <%= area.name %> </h3>
<div class="row">
<%- Area.get_city_by_area(area).each do |city| -%>
<%- if city.job.count > 0 -%>
<% Area.get_city_by_area(area).each do |city| %>
<% if city.job.count > 0 %>
<div class="col-md-4">
<%= link_to city.name, city_path(city.id) %>
(<%= pluralize(city.job.count, 'job') %>)
</div>
<%- end -%>
<%- end -%>
<% end %>
<% end %>
</div>
</div>
<%- end -%>
<% end %>
<%- provide(:title, 'Complete information') -%>
<% provide(:title, 'Complete information') %>
<div class="well">
<h2>Register</h2>
......@@ -34,5 +34,5 @@
<div class="actions">
<%= f.submit "Register", class: 'btn btn-primary' %>
</div>
<%- end -%>
<% end %>
</div>
<%- provide(:title, 'Invalid link') -%>
<% provide(:title, 'Invalid link') %>
<div class="well">
<h2>Register</h2>
<p>
......
<%- provide(:title, 'Change password') -%>
<% provide(:title, 'Change password') %>
<div class="well">
<h2>Change your password</h2>
......
<%- provide(:title, 'Forgot password') -%>
<% provide(:title, 'Forgot password') %>
<div class="well">
<h2>Forgot your password?</h2>
......
<%- provide(:title, 'My Page') -%>
<% provide(:title, 'My Page') %>
<div class="well">
<h2>My Page</h2>
......
<%- provide(:title, 'Register') -%>
<% provide(:title, 'Register') %>
<div class="well">
<h2>Register</h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
......
<%- provide(:title, 'My Page') -%>
<% provide(:title, 'My Page') %>
<div class="well">
<h2>My Page</h2>
......
<%- provide(:title, 'Login') -%>
<% provide(:title, 'Login') %>
<div class="well">
<h2>Log in</h2>
......@@ -11,9 +11,9 @@
<div class="form-group">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<% if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end -%>
<% end %>
</div>
<div class="form_group">
......
<%- if controller_name != 'sessions' %>
<% if controller_name != 'sessions' %>
<%= link_to "Log in", new_session_path(resource_name) %><br />
<% end -%>
<% end %>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<% if devise_mapping.omniauthable? %>
<% resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
<% end -%>
<% end -%>
<% end %>
<% end %>
<%- provide(:title, 'Errors') -%>
<% provide(:title, 'Errors') %>
<div class="well">
<h2>404 - Not Found</h2>
</div>
<%- provide(:title, 'Applied jobs') -%>
<% provide(:title, 'Applied jobs') %>
<div class="well">
<h2>Applied Jobs</h2>
......@@ -12,7 +12,7 @@
<th style="width: 100px;"> Applied At </th>
</thead>
<tbody>
<%- @applied_jobs.each do |apply| -%>
<% @applied_jobs.each do |apply| %>
<tr>
<td> <%= link_to apply.job.name, job_path(apply.job.id) %> </td>
<td> <%= truncate(apply.job.description, length: 250) %> </td>
......@@ -21,7 +21,7 @@
<td> <%= apply.applied_at.strftime('%F') %> </td>
<td> </td>
</tr>
<%- end -%>
<% end %>
</tbody>
</table>
</div>
......
<%- provide(:title, 'Job Apply') -%>
<% provide(:title, 'Job Apply') %>
<div class="well">
<div>
<strong><%= link_to 'Apply New', jobs_apply_path %></strong>
......@@ -27,5 +27,5 @@
<div class="form-group">
<%= f.submit 'Confirm', class: 'btn btn-primary' %>
</div>
<%- end -%>
<% end %>
</div>
<%- provide(:title, 'Confirmation') -%>
<% provide(:title, 'Confirmation') %>
<div class="well">
<div>
<%= link_to 'Apply New', jobs_apply_path %>
......@@ -27,5 +27,5 @@
<%= link_to 'Edit', jobs_apply_path, class: 'btn btn-primary' %>
<%= f.submit 'Done', class: 'btn btn-primary' %>
</div>
<%- end -%>
<% end %>
</div>
<%- provide(:title, 'Apply Done') -%>
<% provide(:title, 'Apply Done') %>
<div class="well">
<div>
<%= link_to 'Apply New', jobs_apply_path %>
......
<%- provide(:title, 'Favorited Jobs') -%>
<% provide(:title, 'Favorited Jobs') %>
<div class="well">
<h2>Favorited Jobs</h2>
<div class="table-responsive">
......@@ -11,7 +11,7 @@
<th></th>
</thead>
<tbody>
<%- @favorited_jobs.each do |favorite| -%>
<% @favorited_jobs.each do |favorite| %>
<tr id="favorite_remove_<%= favorite.job.id %>">
<td> <%= link_to favorite.job.name, job_path(favorite.job.id) %> </td>
<td> <%= truncate(favorite.job.description, length: 250) %> </td>
......@@ -22,7 +22,7 @@
<input type="hidden" id="job_id" name="job_id" value="<%= favorite.job.id %>">
</td>
</tr>
<%- end -%>
<% end %>
</tbody>
</table>
</div>
......
<%- provide(:title, 'History Jobs') -%>
<% provide(:title, 'History Jobs') %>
<div class="well">
<h2>History Jobs</h2>
<div class="table-responsive">
......@@ -10,14 +10,14 @@
<th> Salary </th>
</thead>
<tbody>
<%- @history_jobs.each do |history| -%>
<% @history_jobs.each do |history| %>
<tr>
<td> <%= link_to history.job.name, job_path(history.job.id) %> </td>
<td> <%= truncate(history.job.description, length: 250) %> </td>
<td> <%= history.job.city.try(:name) %> </td>
<td> <%= history.job.salary %> </td>
</tr>
<%- end -%>
<% end %>
</tbody>
</table>
</div>
......
<%- provide(:title, 'Job list') -%>
<% provide(:title, 'Job list') %>
<div class="well">
<%= render 'layouts/search.html.erb' %>
</div>
......@@ -27,26 +27,26 @@
</tr>
</thead>
<tbody>
<%- @jobs.each do |job| -%>
<% @jobs.each do |job| %>
<tr>
<td> <%= link_to job.name, job_path(job.id) %> </td>
<td> <%= truncate(job.description, length: 250) %> </td>
<td> <%= job.city.try(:name) %> </td>
<td> <%= job.salary %> </td>
<td>
<%- if Favorite.where(user: current_user, job: job).blank? -%>
<% if Favorite.where(user: current_user, job: job).blank? %>
<div class="col-md-3" id="favorite_<%= job.id %>">
<%- if user_signed_in? -%>
<% if user_signed_in? %>
<%= link_to 'Favorite', jobs_favorite_path(job_id: job.id, format: 'js'), remote: true, class: 'favorite_add' %>
<%- else -%>
<% else %>
<%= link_to 'Favorite', new_user_session_path %>
<%- end -%>
<% end %>
<input type="hidden" id="job_id" name="job_id" value="<%= job.id %>">
</div>
<%- end -%>
<% end %>
</td>
</tr>
<%- end -%>
<% end %>
</tbody>
</table>
</div>
......
<%- provide(:title, 'Job Detail') -%>
<% provide(:title, 'Job Detail') %>
<div class="well">
<h2><%= @job.name %></h2>
<div class="row form-group">
......@@ -21,38 +21,38 @@
</div>
</div>
<div class="col-md-2">
<%- if user_signed_in? -%>
<%- if Apply.where(user: current_user, job: @job).blank? -%>
<% if user_signed_in? %>
<% if Apply.where(user: current_user, job: @job).blank? %>
<%= link_to 'Apply', jobs_apply_path(job_id: @job.id), class: 'btn btn-primary' %>
<%- else -%>
<% else %>
<%= link_to 'Applied', '#', class: 'btn btn-primary' %>
<%- end -%>
<%- else -%>
<% end %>
<% else %>
<%= link_to 'Apply', new_user_session_path, class: 'btn btn-primary' %>
<%- end -%>
<% end %>
</div>
</div>
<div class="row">
<div class="col-md-offset-3 ">
<%- if user_signed_in? -%>
<%- if Apply.where(user: current_user, job: @job).blank? -%>
<% if user_signed_in? %>
<% if Apply.where(user: current_user, job: @job).blank? %>
<%= link_to 'Apply', jobs_apply_path(job_id: @job.id), class: 'btn btn-primary' %>
<%- else -%>
<% else %>
<%= link_to 'Applied', '#', class: 'btn btn-primary' %>
<%- end -%>
<%- else -%>
<% end %>
<% else %>
<%= link_to 'Apply', new_user_session_path, class: 'btn btn-primary' %>
<%- end -%>
<% end %>
<%- if user_signed_in? -%>
<%- if Favorite.where(user: current_user, job: @job).blank? -%>
<% if user_signed_in? %>
<% if Favorite.where(user: current_user, job: @job).blank? %>
<%= link_to 'Favorite', '#', class: 'favorite_add btn btn-primary' %>
<%- else -%>
<% else %>
<%= link_to 'Favorite', '#', class: 'favorite_add btn btn-primary', disabled: true %>
<%- end -%>
<%- else -%>
<% end %>
<% else %>
<%= link_to 'Favorite', new_user_session_path, class: 'btn btn-primary' %>
<%- end -%>
<% end %>
<input type="hidden" id="job_id" name="job_id" value="<%= @job.id %>">
</div>
</div>
......
......@@ -3,18 +3,17 @@
<%= link_to image_tag('http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg', width: '100px'), root_path, id: 'logo'%>
<nav>
<ul class="nav navbar-nav navbar-right">
<%- if user_signed_in? -%>
<% if user_signed_in? %>
<li> <%= link_to 'My profile', registrations_show_path %> </li>
<li> <%= link_to 'Log out', destroy_user_session_path, method: :delete %> </li>
<li> <%= link_to 'Favorite', jobs_favorited_jobs_path %> </li>
<li> <%= link_to 'History', jobs_history_jobs_path %> </li>
<%- else -%>
<% else %>
<li> <%= link_to 'Login', new_user_session_path %> </li>
<li> <%= link_to 'Register', new_user_registration_path %> </li>
<li> <%= link_to 'Favorite', new_user_session_path %> </li>
<li> <%= link_to 'History', new_user_session_path %> </li>
<%- end -%>
<% end %>
</ul>
</nav>
</div>
......
<%- provide(:title, 'Login') -%>
<% provide(:title, 'Login') %>
<div class="well">
<h2>Log in</h2>
<%= form_for(:session, url: login_path) do |f| %>
......@@ -29,5 +29,5 @@
<%= link_to 'Register', register_path, class: 'btn btn-primary' %>
</div>
</div>
<%- end -%>
<% end %>
</div>
<%- provide(:title, 'Home') -%>
<% provide(:title, 'Home') %>
<div class="well">
<div class="banner">
<%= image_tag('http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg', width: '100%')%>
......@@ -23,14 +23,14 @@
</tr>
</thead>
<tbody>
<%- @latest_jobs.each do |job| -%>
<% @latest_jobs.each do |job| %>
<tr>
<td> <%= job.name %> </td>
<td> <%= job.salary %> </td>
<td> <%= job.city.try(:name) %> </td>
<td> <%= truncate(job.description, length: 250) %> </td>
</tr>
<%- end -%>
<% end %>
</tbody>
</table>
</div>
......@@ -39,12 +39,12 @@
<h3> Top cities <%= link_to 'All cities', cities_path %> </h3>
<div class="top_cities">
<div class="row">
<%- @top_cities.each do |city| -%>
<% @top_cities.each do |city| %>
<div class="col-md-4">
<%= city.name %>
(<%= pluralize(city.job.count, 'job') %>)
</div>
<%- end -%>
<% end %>
</div>
</div>
</div>
......@@ -52,12 +52,12 @@
<h3> Top industries <%= link_to 'All industries', categories_path -%> </h3>
<div class="top_industries">
<div class="row">
<%- @top_categories.each do |category| -%>
<% @top_categories.each do |category| %>
<div class="col-md-4">
<%= category.name %>
(<%= pluralize(category.job_category.count, 'job') %>)
</div>
<%- end -%>
<% end %>
</div>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment