change erb to js templates part way

This commit is contained in:
Connor Turland 2018-03-03 21:25:42 -05:00
parent 6309d764f9
commit 74ad3d33c8
62 changed files with 648 additions and 647 deletions

View file

@ -75,7 +75,8 @@
id: 10, id: 10,
name: 'Connor', name: 'Connor',
email: 'co@co.com', email: 'co@co.com',
admin: false admin: false,
image: 'https://metamaps-live.s3.amazonaws.com/users/images/555/629/996/sixtyfour/11835c3.png?1417298429'
} }
} }
} }

View file

@ -1,5 +1,5 @@
<%- submit_btn_css ||= 'button red-button' %> {- submit_btn_css ||= 'button red-button' }
<%= form_tag oauth_application_path(application) do %> { form_tag oauth_application_path(application) do }
<input type="hidden" name="_method" value="delete"> <input type="hidden" name="_method" value="delete">
<%= submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css %> { submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css }
<% end %> { end }

View file

@ -1,36 +1,36 @@
<%= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| %> { form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| }
<% if application.errors.any? %> { if application.errors.any? }
<div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div> <div class="alert alert-danger" data-alert><p>{ t('doorkeeper.applications.form.error') }</p></div>
<% end %> { end }
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do %> { content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do }
<%= f.label :name, class: 'col-sm-2 control-label' %> { f.label :name, class: 'col-sm-2 control-label' }
<div class="col-sm-10"> <div class="col-sm-10">
<%= f.text_field :name, class: 'form-control' %> { f.text_field :name, class: 'form-control' }
<%= doorkeeper_errors_for application, :name %> { doorkeeper_errors_for application, :name }
</div> </div>
<% end %> { end }
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:redirect_uri].present?}" do %> { content_tag :div, class: "form-group#{' has-error' if application.errors[:redirect_uri].present?}" do }
<%= f.label :redirect_uri, class: 'col-sm-2 control-label' %> { f.label :redirect_uri, class: 'col-sm-2 control-label' }
<div class="col-sm-10"> <div class="col-sm-10">
<%= f.text_area :redirect_uri, class: 'form-control' %> { f.text_area :redirect_uri, class: 'form-control' }
<%= doorkeeper_errors_for application, :redirect_uri %> { doorkeeper_errors_for application, :redirect_uri }
<span class="help-block"> <span class="help-block">
<%= t('doorkeeper.applications.help.redirect_uri') %>. { t('doorkeeper.applications.help.redirect_uri') }.
</span> </span>
<% if Doorkeeper.configuration.native_redirect_uri %> { if Doorkeeper.configuration.native_redirect_uri }
<span class="help-block"> <span class="help-block">
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{ Doorkeeper.configuration.native_redirect_uri }</code>") %> { raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{ Doorkeeper.configuration.native_redirect_uri }</code>") }
</span> </span>
<% end %> { end }
</div> </div>
<% end %> { end }
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<%= f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" %> { f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" }
<%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "button link-button red-button" %> { link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "button link-button red-button" }
</div> </div>
</div> </div>
<% end %> { end }

View file

@ -1,10 +1,10 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<div class="page-header"> <div class="page-header">
<h2><%= t('.title') %></h2> <h2>{ t('.title') }</h2>
</div> </div>
<%= render 'form', application: @application %> { render 'form', application: @application }
</div> </div>
</div> </div>
<%= render 'script' %> { render 'script' }

View file

@ -1,28 +1,28 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<div class="page-header"> <div class="page-header">
<h2><%= t('.title') %></h2> <h2>{ t('.title') }</h2>
</div> </div>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th><%= t('.name') %></th> <th>{ t('.name') }</th>
<th><%= t('.callback_url') %></th> <th>{ t('.callback_url') }</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% @applications.each do |application| %> { @applications.each do |application| }
<tr id="application_<%= application.id %>"> <tr id="application_{ application.id }">
<td><%= link_to application.name, oauth_application_path(application) %></td> <td>{ link_to application.name, oauth_application_path(application) }</td>
<td><%= application.redirect_uri %></td> <td>{ application.redirect_uri }</td>
<td><%= render 'delete_form', application: application %></td> <td>{ render 'delete_form', application: application }</td>
</tr> </tr>
<% end %> { end }
</tbody> </tbody>
</table> </table>
<%= link_to t('.new'), new_oauth_application_path, class: 'button link-button' %> { link_to t('.new'), new_oauth_application_path, class: 'button link-button' }
</div> </div>
</div> </div>
<%= render 'script' %> { render 'script' }

View file

@ -1,11 +1,11 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' %> { link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' }
<div class="page-header"> <div class="page-header">
<h2><%= t('.title') %></h2> <h2>{ t('.title') }</h2>
</div> </div>
<%= render 'form', application: @application %> { render 'form', application: @application }
</div> </div>
</div> </div>
<%= render 'script' %> { render 'script' }

View file

@ -1,37 +1,37 @@
<div id="yield"> <div id="yield">
<div class="centerContent showApp"> <div class="centerContent showApp">
<%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' %> { link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' }
<div class="page-header"> <div class="page-header">
<h2><%= t('.title', name: @application.name) %></h2> <h2>{ t('.title', name: @application.name) }</h2>
</div> </div>
<h4><%= t('.application_id') %>:</h4> <h4>{ t('.application_id') }:</h4>
<p><code id="application_id"><%= @application.uid %></code></p> <p><code id="application_id">{ @application.uid }</code></p>
<h4><%= t('.secret') %>:</h4> <h4>{ t('.secret') }:</h4>
<p><code id="secret"><%= @application.secret %></code></p> <p><code id="secret">{ @application.secret }</code></p>
<h4><%= t('.callback_urls') %>:</h4> <h4>{ t('.callback_urls') }:</h4>
<table> <table>
<% @application.redirect_uri.split.each do |uri| %> { @application.redirect_uri.split.each do |uri| }
<tr> <tr>
<td> <td>
<code><%= uri %></code> <code>{ uri }</code>
</td> </td>
<td> <td>
<%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), class: 'button link-button', target: '_blank' %> { link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), class: 'button link-button', target: '_blank' }
</td> </td>
</tr> </tr>
<% end %> { end }
</table> </table>
<div class="inline-button"><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), class: 'button link-button' %></div> <div class="inline-button">{ link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), class: 'button link-button' }</div>
<div class="inline-button"><%= render 'delete_form', application: @application, submit_btn_css: 'button red-button' %></div> <div class="inline-button">{ render 'delete_form', application: @application, submit_btn_css: 'button red-button' }</div>
</div> </div>
</div> </div>
<%= render 'script' %> { render 'script' }

View file

@ -1,11 +1,11 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<div class="page-header"> <div class="page-header">
<h2><%= t('doorkeeper.authorizations.error.title') %></h2> <h2>{ t('doorkeeper.authorizations.error.title') }</h2>
</div> </div>
<main role="main"> <main role="main">
<div><%= @pre_auth.error_response.body[:error_description] %></div> <div>{ @pre_auth.error_response.body[:error_description] }</div>
</main> </main>
</div> </div>
</div> </div>

View file

@ -1,46 +1,46 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<header class="page-header" role="banner"> <header class="page-header" role="banner">
<h1><%= t('.title') %></h1> <h1>{ t('.title') }</h1>
</header> </header>
<main role="main"> <main role="main">
<p class="h4"> <p class="h4">
<%= raw t('.prompt', client_name: "<strong class=\"text-info\">#{ @pre_auth.client.name }</strong>") %> { raw t('.prompt', client_name: "<strong class=\"text-info\">#{ @pre_auth.client.name }</strong>") }
</p> </p>
<% if @pre_auth.scopes.count > 0 %> { if @pre_auth.scopes.count > 0 }
<div id="oauth-permissions"> <div id="oauth-permissions">
<p><%= t('.able_to') %>:</p> <p>{ t('.able_to') }:</p>
<ul class="text-info"> <ul class="text-info">
<% @pre_auth.scopes.each do |scope| %> { @pre_auth.scopes.each do |scope| }
<li><%= t scope, scope: [:doorkeeper, :scopes] %></li> <li>{ t scope, scope: [:doorkeeper, :scopes] }</li>
<% end %> { end }
</ul> </ul>
</div> </div>
<% end %> { end }
<div class="actions"> <div class="actions">
<div class="inline-button button-margin-top"> <div class="inline-button button-margin-top">
<%= form_tag oauth_authorization_path, method: :post do %> { form_tag oauth_authorization_path, method: :post do }
<%= hidden_field_tag :client_id, @pre_auth.client.uid %> { hidden_field_tag :client_id, @pre_auth.client.uid }
<%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %> { hidden_field_tag :redirect_uri, @pre_auth.redirect_uri }
<%= hidden_field_tag :state, @pre_auth.state %> { hidden_field_tag :state, @pre_auth.state }
<%= hidden_field_tag :response_type, @pre_auth.response_type %> { hidden_field_tag :response_type, @pre_auth.response_type }
<%= hidden_field_tag :scope, @pre_auth.scope %> { hidden_field_tag :scope, @pre_auth.scope }
<%= submit_tag t('doorkeeper.authorizations.buttons.authorize'), class: "button" %> { submit_tag t('doorkeeper.authorizations.buttons.authorize'), class: "button" }
<% end %> { end }
</div> </div>
<div class="inline-button button-margin-top"> <div class="inline-button button-margin-top">
<%= form_tag oauth_authorization_path, method: :delete do %> { form_tag oauth_authorization_path, method: :delete do }
<%= hidden_field_tag :client_id, @pre_auth.client.uid %> { hidden_field_tag :client_id, @pre_auth.client.uid }
<%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %> { hidden_field_tag :redirect_uri, @pre_auth.redirect_uri }
<%= hidden_field_tag :state, @pre_auth.state %> { hidden_field_tag :state, @pre_auth.state }
<%= hidden_field_tag :response_type, @pre_auth.response_type %> { hidden_field_tag :response_type, @pre_auth.response_type }
<%= hidden_field_tag :scope, @pre_auth.scope %> { hidden_field_tag :scope, @pre_auth.scope }
<%= submit_tag t('doorkeeper.authorizations.buttons.deny'), class: "button red-button" %> { submit_tag t('doorkeeper.authorizations.buttons.deny'), class: "button red-button" }
<% end %> { end }
</div> </div>
</div> </div>
</main> </main>

View file

@ -1,11 +1,11 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<header class="page-header"> <header class="page-header">
<h2><%= t('.title') %></h2> <h2>{ t('.title') }</h2>
</header> </header>
<main role="main"> <main role="main">
<code id="authorization_code"><%= params[:code] %></code> <code id="authorization_code">{ params[:code] }</code>
</main> </main>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<%- submit_btn_css ||= 'button red-button' %> {- submit_btn_css ||= 'button red-button' }
<%= form_tag oauth_authorized_application_path(application) do %> { form_tag oauth_authorized_application_path(application) do }
<input type="hidden" name="_method" value="delete"> <input type="hidden" name="_method" value="delete">
<%= submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css %> { submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css }
<% end %> { end }

View file

@ -1,7 +1,7 @@
<div id="yield"> <div id="yield">
<div class="centerContent"> <div class="centerContent">
<header class="page-header"> <header class="page-header">
<h2><%= t('doorkeeper.authorized_applications.index.title') %></h2> <h2>{ t('doorkeeper.authorized_applications.index.title') }</h2>
</header> </header>
<main role="main"> <main role="main">
@ -10,28 +10,28 @@
There are a number of apps being worked on for Metamaps currently, including the playful Metamapper Slack Bot. Check back here for updates.<br /> There are a number of apps being worked on for Metamaps currently, including the playful Metamapper Slack Bot. Check back here for updates.<br />
If you're a developer interested in building an app for Metamaps, check out <a href="https://metamaps.cc/api" target="_blank">the API docs</a>. If you're a developer interested in building an app for Metamaps, check out <a href="https://metamaps.cc/api" target="_blank">the API docs</a>.
</div><br /> </div><br />
<% if @applications.count > 0 %> { if @applications.count > 0 }
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th><%= t('doorkeeper.authorized_applications.index.application') %></th> <th>{ t('doorkeeper.authorized_applications.index.application') }</th>
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th> <th>{ t('doorkeeper.authorized_applications.index.created_at') }</th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% @applications.each do |application| %> { @applications.each do |application| }
<tr> <tr>
<td><%= application.name %></td> <td>{ application.name }</td>
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td> <td>{ application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) }</td>
<td><%= render 'delete_form', application: application %></td> <td>{ render 'delete_form', application: application }</td>
</tr> </tr>
<% end %> { end }
</tbody> </tbody>
</table> </table>
<% end %> { end }
</main> </main>
</div> </div>
</div> </div>
<%= render 'script' %> { render 'script' }

View file

@ -1,15 +1,15 @@
<% # { #
# @file # @file
# Shows a list of recently active maps # Shows a list of recently active maps
# GET /explore/active(.:format) # GET /explore/active(.:format)
# %> # }
<script> <script>
<% content_for :title, "Explore Active Maps | Metamaps" %> { content_for :title, "Explore Active Maps | Metamaps" }
<% content_for :mobile_title, "Recently Active" %> { content_for :mobile_title, "Recently Active" }
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.currentPage = "active"; Metamaps.currentPage = "active";
Metamaps.ServerData.Active = <%= @maps.to_json.html_safe %>; Metamaps.ServerData.Active = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,15 +1,15 @@
<% # { #
# @file # @file
# Shows a list of featured maps # Shows a list of featured maps
# GET /explore/featured(.:format) # GET /explore/featured(.:format)
# %> # }
<script> <script>
<% content_for :title, "Explore Featured Maps | Metamaps" %> { content_for :title, "Explore Featured Maps | Metamaps" }
<% content_for :mobile_title, "Featured Maps" %> { content_for :mobile_title, "Featured Maps" }
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.currentPage = "featured"; Metamaps.currentPage = "featured";
Metamaps.ServerData.Featured = <%= @maps.to_json.html_safe %>; Metamaps.ServerData.Featured = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,18 +1,18 @@
<% # { #
# @file # @file
# Shows a list of a user's maps # Shows a list of a user's maps
# GET /explore/mapper/:id(.:format) # GET /explore/mapper/:id(.:format)
# %> # }
<script> <script>
<% content_for :title, @user.name + " | Metamaps" %> { content_for :title, @user.name + " | Metamaps" }
<% content_for :mobile_title, @user.name %> { content_for :mobile_title, @user.name }
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.currentPage = "mapper"; Metamaps.currentPage = "mapper";
Metamaps.ServerData.Mapper = { Metamaps.ServerData.Mapper = {
models: <%= @maps.to_json.html_safe %>, models: { @maps.to_json.html_safe },
mapperId: <%= params[:id] %> mapperId: { params[:id] }
}; };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,15 +1,15 @@
<% # { #
# @file # @file
# Shows a list of current user's maps # Shows a list of current user's maps
# GET /explore/mine(.:format) # GET /explore/mine(.:format)
# %> # }
<script> <script>
<% content_for :title, "My Maps | Metamaps" %> { content_for :title, "My Maps | Metamaps" }
<% content_for :mobile_title, "My Maps" %> { content_for :mobile_title, "My Maps" }
Metamaps.currentPage = "mine"; Metamaps.currentPage = "mine";
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.ServerData.Mine = <%= @maps.to_json.html_safe %>; Metamaps.ServerData.Mine = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,15 +1,15 @@
<% # { #
# @file # @file
# Shows a list of current user's maps # Shows a list of current user's maps
# GET /explore/mine(.:format) # GET /explore/mine(.:format)
# %> # }
<script> <script>
<% content_for :title, "Shared Maps | Metamaps" %> { content_for :title, "Shared Maps | Metamaps" }
<% content_for :mobile_title, "Shared With Me" %> { content_for :mobile_title, "Shared With Me" }
Metamaps.currentPage = "shared"; Metamaps.currentPage = "shared";
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.ServerData.Shared = <%= @maps.to_json.html_safe %>; Metamaps.ServerData.Shared = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,15 +1,15 @@
<% # { #
# @file # @file
# Shows a list of current user's starred maps # Shows a list of current user's starred maps
# GET /explore/starred(.:format) # GET /explore/starred(.:format)
# %> # }
<script> <script>
<% content_for :title, "Starred Maps | Metamaps" %> { content_for :title, "Starred Maps | Metamaps" }
<% content_for :mobile_title, "Starred Maps" %> { content_for :mobile_title, "Starred Maps" }
Metamaps.currentPage = "starred"; Metamaps.currentPage = "starred";
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.ServerData.Starred = <%= @maps.to_json.html_safe %>; Metamaps.ServerData.Starred = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus(); Metamaps.GlobalUI.Search.focus();
</script> </script>

View file

@ -1,21 +1,21 @@
<div id="loading"></div> <div id="loading"></div>
<script type="text/javascript"> <script type="text/javascript">
Metamaps.ServerData.unreadNotificationsCount = <%= current_user ? user_unread_notification_count : 0 %> Metamaps.ServerData.unreadNotificationsCount = { current_user ? user_unread_notification_count : 0 }
Metamaps.ServerData.mapIsStarred = <%= current_user && @map && current_user.starred_map?(@map) ? true : false %> Metamaps.ServerData.mapIsStarred = { current_user && @map && current_user.starred_map?(@map) ? true : false }
Metamaps.ServerData.mobileTitle = "<%= yield(:mobile_title) %>" Metamaps.ServerData.mobileTitle = "{ yield(:mobile_title) }"
Metamaps.ServerData.ActiveMapper = <%= current_user ? current_user.to_json({follows: true, email: true, follow_settings: true}).html_safe : nil %> Metamaps.ServerData.ActiveMapper = { current_user ? current_user.to_json({follows: true, email: true, follow_settings: true}).html_safe : nil }
<% if devise_error_messages? %> { if devise_error_messages? }
Metamaps.ServerData.toast = "<%= devise_error_messages! %>" Metamaps.ServerData.toast = "{ devise_error_messages! }"
<% elsif notice %> { elsif notice }
Metamaps.ServerData.toast = "<%= notice %>" Metamaps.ServerData.toast = "{ notice }"
<% elsif alert %> { elsif alert }
Metamaps.ServerData.toast = "<%= alert %>" Metamaps.ServerData.toast = "{ alert }"
<% end %> { end }
Metamaps.Loading.setup() Metamaps.Loading.setup()
</script> </script>
<%= render :partial => 'layouts/lightboxes' %> { render :partial => 'layouts/lightboxes' }
<%= render :partial => 'layouts/templates' %> { render :partial => 'layouts/templates' }
<%= render :partial => 'shared/metacodeCssColors' %> { render :partial => 'shared/metacodeCssColors' }
<%= render :partial => 'layouts/googleanalytics' if ENV["GA_TRACKING_CODE"].present? %> { render :partial => 'layouts/googleanalytics' if ENV["GA_TRACKING_CODE"].present? }
</body> </body>
</html> </html>

View file

@ -1,7 +1,7 @@
<%# {#
# @file # @file
# Google analytics, rendered on every page # Google analytics, rendered on every page
#%> #}
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@ -9,6 +9,6 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '<%= ENV["GA_TRACKING_CODE"] %>', 'auto'); ga('create', '{ ENV["GA_TRACKING_CODE"] }', 'auto');
</script> </script>

View file

@ -12,31 +12,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><%= yield(:title) %></title> <title>{ yield(:title) }</title>
<%= csrf_meta_tags %> { csrf_meta_tags }
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<% if controller.class.name == 'MapsController' && @map %> { if controller.class.name == 'MapsController' && @map }
<meta property="og:title" content="<%= @map.name %>" /> <meta property="og:title" content="{ @map.name }" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:image" content="<%= @map.screenshot_url %>" /> <meta property="og:image" content="{ @map.screenshot_url }" />
<meta property="og:description" content="<%= @map.desc %>" /> <meta property="og:description" content="{ @map.desc }" />
<meta property="og:url" content="<%= request.original_url %>" /> <meta property="og:url" content="{ request.original_url }" />
<meta name="twitter:title" content="<%= @map.name %>" /> <meta name="twitter:title" content="{ @map.name }" />
<meta name="twitter:image" content="<%= @map.screenshot_url %>" /> <meta name="twitter:image" content="{ @map.screenshot_url }" />
<meta name="twitter:description" content="<%= @map.desc %>" /> <meta name="twitter:description" content="{ @map.desc }" />
<meta name="twitter:url" content="<%= request.original_url %>" /> <meta name="twitter:url" content="{ request.original_url }" />
<% end %> { end }
<% if controller_name == 'maps' && action_name == "conversation" %> { if controller_name == 'maps' && action_name == "conversation" }
<%= stylesheet_link_tag "application", :media => "all" %> { stylesheet_link_tag "application", :media => "all" }
<%= stylesheet_link_tag "application-secret", :media => "all" %> { stylesheet_link_tag "application-secret", :media => "all" }
<%= javascript_include_tag "application-secret" %> { javascript_include_tag "application-secret" }
<% else %> { else }
<%= stylesheet_link_tag "application", :media => "all" %> { stylesheet_link_tag "application", :media => "all" }
<%= javascript_include_tag "application" %> { javascript_include_tag "application" }
<% end %> { end }
<!-- typekit for vinyl font --> <!-- typekit for vinyl font -->
<script type="text/javascript" src="https://use.typekit.net/tki2nyo.js"></script> <script type="text/javascript" src="https://use.typekit.net/tki2nyo.js"></script>

View file

@ -1,7 +1,7 @@
<%# {#
# @file # @file
# The inner HTML of the account box that comes up in the bottom left # The inner HTML of the account box that comes up in the bottom left
#%> #}
<div id="lightbox_overlay"> <div id="lightbox_overlay">
<div id="lightbox_main"> <div id="lightbox_main">
<a id="lightbox_close" href="#"></a> <a id="lightbox_close" href="#"></a>
@ -19,9 +19,9 @@
<div id="rightAboutParms"> <div id="rightAboutParms">
<p>PRIVATE BETA</p> <p>PRIVATE BETA</p>
<p><%= METAMAPS_VERSION %></p> <p>{ METAMAPS_VERSION }</p>
<p><%= METAMAPS_BUILD %></p> <p>{ METAMAPS_BUILD }</p>
<p><%= METAMAPS_LAST_UPDATED %></p> <p>{ METAMAPS_LAST_UPDATED }</p>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
@ -83,10 +83,10 @@
</div> </div>
<div class="lightboxContent" id="cheatsheet"> <div class="lightboxContent" id="cheatsheet">
<%= render :partial => 'shared/cheatsheet' %> { render :partial => 'shared/cheatsheet' }
</div> </div>
<% if current_user %> { if current_user }
<div class="lightboxContent" id="invite"> <div class="lightboxContent" id="invite">
<h3>SHARE INVITE</h3> <h3>SHARE INVITE</h3>
@ -95,20 +95,20 @@
<p>As a valued beta tester, you have the ability to invite your peers, colleagues and collaborators onto the platform.</p> <p>As a valued beta tester, you have the ability to invite your peers, colleagues and collaborators onto the platform.</p>
<p>Below is a personal invite link containing your unique access code, which can be used multiple times.</p> <p>Below is a personal invite link containing your unique access code, which can be used multiple times.</p>
<div id="joinCodesBox"> <div id="joinCodesBox">
<p class="joinCodes"><%= invite_link() %> <p class="joinCodes">{ invite_link() }
<button class="button" onclick="Metamaps.GlobalUI.shareInvite('<%= @invite_link %>');">COPY INVITE LINK!</button> <button class="button" onclick="Metamaps.GlobalUI.shareInvite('{ @invite_link }');">COPY INVITE LINK!</button>
</div> </div>
</div> </div>
<div class="lightboxContent" id="forkmap"> <div class="lightboxContent" id="forkmap">
<%= render :partial => 'shared/forkmap' %> { render :partial => 'shared/forkmap' }
</div> </div>
<div class="lightboxContent" id="switchMetacodes"> <div class="lightboxContent" id="switchMetacodes">
<%= render :partial => 'shared/switchmetacodes' %> { render :partial => 'shared/switchmetacodes' }
</div> </div>
<% end %> { end }
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
<%# {#
# @file # @file
# templates for the upper right autocomplete results # templates for the upper right autocomplete results
#%> #}
<div class="templates"> <div class="templates">
<script type="text/template" id="mapInfoBoxTemplate"> <script type="text/template" id="mapInfoBoxTemplate">
@ -85,7 +85,7 @@
<script type="text/template" id="mapSearchTemplate"> <script type="text/template" id="mapSearchTemplate">
<div class="result{{rtype}}"> <div class="result{{rtype}}">
<div class="searchResIconWrapper"> <div class="searchResIconWrapper">
<img class="icon" src="<%= asset_path('metamap36c.png') %>"> <img class="icon" src="{ asset_path('metamap36c.png') }">
</div> </div>
<div class="resultText"> <div class="resultText">
<p class="resultTitle">{{label}}</p> <p class="resultTitle">{{label}}</p>

View file

@ -1,23 +1,23 @@
<%# {#
# @file # @file
# Main application file. Holds scaffolding present on every page. # Main application file. Holds scaffolding present on every page.
# Then a certain non-partial view (no _ preceding filename) will be # Then a certain non-partial view (no _ preceding filename) will be
# displayed within, based on URL # displayed within, based on URL
#%> #}
<%= render :partial => 'layouts/head' %> { render :partial => 'layouts/head' }
<body class="<%= current_user ? "authenticated" : "unauthenticated" %> controller-<%= controller_name %> action-<%= action_name %>"> <body class="{ current_user ? "authenticated" : "unauthenticated" } controller-{ controller_name } action-{ action_name }">
<div class="main" id="react-app"></div> <div class="main" id="react-app"></div>
<%= yield %> { yield }
<% if current_user %> { if current_user }
<% # for creating and pulling in topics and synapses %> { # for creating and pulling in topics and synapses }
<% if controller_name == 'maps' && action_name == "conversation" %> { if controller_name == 'maps' && action_name == "conversation" }
<%= render :partial => 'maps/newtopicsecret' %> { render :partial => 'maps/newtopicsecret' }
<% else %> { else }
<%= render :partial => 'maps/newtopic' %> { render :partial => 'maps/newtopic' }
<% end %> { end }
<%= render :partial => 'maps/newsynapse' %> { render :partial => 'maps/newsynapse' }
<% # for populating the change metacode list on the topic card %> { # for populating the change metacode list on the topic card }
<%= render :partial => 'shared/metacodeoptions' %> { render :partial => 'shared/metacodeoptions' }
<% end %> { end }
<%= render :partial => 'layouts/foot' %> { render :partial => 'layouts/foot' }

View file

@ -1,5 +1,5 @@
<html> <html>
<body> <body>
<%= yield %> { yield }
</body> </body>
</html> </html>

View file

@ -1 +1 @@
<%= yield %> { yield }

View file

@ -1,3 +1,3 @@
<%= form_for Synapse.new, url: synapses_url, remote: true do |form| %> { form_for Synapse.new, url: synapses_url, remote: true do |form| }
<%= form.text_field :desc, :placeholder => "describe the connection..." %> { form.text_field :desc, :placeholder => "describe the connection..." }
<% end %> { end }

View file

@ -1,6 +1,6 @@
<% @metacodes = user_metacodes() %> { @metacodes = user_metacodes() }
<%= form_for Topic.new, url: topics_url, remote: true do |form| %> { form_for Topic.new, url: topics_url, remote: true do |form| }
<div class="openMetacodeSwitcher openLightbox" data-open="switchMetacodes"> <div class="openMetacodeSwitcher openLightbox" data-open="switchMetacodes">
<div class="tooltipsAbove">Switch Metacodes</div> <div class="tooltipsAbove">Switch Metacodes</div>
</div> </div>
@ -11,22 +11,22 @@
</div> </div>
<div id="metacodeImg"> <div id="metacodeImg">
<% @metacodes.each do |metacode| %> { @metacodes.each do |metacode| }
<img class="cloudcarousel" width="40" height="40" src="<%= asset_path metacode.icon %>" alt="<%= metacode.name %>" title="<%= metacode.name %>" data-id="<%= metacode.id %>" /> <img class="cloudcarousel" width="40" height="40" src="{ asset_path metacode.icon }" alt="{ metacode.name }" title="{ metacode.name }" data-id="{ metacode.id }" />
<% end %> { end }
</div> </div>
<%= form.text_field :name, :maxlength => 140, :placeholder => "title..." %> { form.text_field :name, :maxlength => 140, :placeholder => "title..." }
<div id="metacodeImgTitle"></div> <div id="metacodeImgTitle"></div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
<script> <script>
<% @metacodes.each do |metacode| %> { @metacodes.each do |metacode| }
Metamaps.Create.selectedMetacodes.push("<%= metacode.id %>"); Metamaps.Create.selectedMetacodes.push("{ metacode.id }");
Metamaps.Create.newSelectedMetacodes.push("<%= metacode.id %>"); Metamaps.Create.newSelectedMetacodes.push("{ metacode.id }");
Metamaps.Create.selectedMetacodeNames.push("<%= metacode.name %>"); Metamaps.Create.selectedMetacodeNames.push("{ metacode.name }");
Metamaps.Create.newSelectedMetacodeNames.push("<%= metacode.name %>"); Metamaps.Create.newSelectedMetacodeNames.push("{ metacode.name }");
<% end %> { end }
</script> </script>
<% end %> { end }

View file

@ -1,23 +1,23 @@
<%# {#
# @file # @file
# Code to display a map # Code to display a map
# /maps/:id # /maps/:id
#%> #}
<% content_for :title, @map.name + " | Metamaps" %> { content_for :title, @map.name + " | Metamaps" }
<% content_for :mobile_title, @map.name %> { content_for :mobile_title, @map.name }
<script> <script>
Metamaps.currentSection = "map"; Metamaps.currentSection = "map";
Metamaps.currentPage = <%= @map.id.to_s %>; Metamaps.currentPage = { @map.id.to_s };
Metamaps.ServerData = Metamaps.ServerData || {} Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveMap = <%= @map.to_json.html_safe %>; Metamaps.ServerData.ActiveMap = { @map.to_json.html_safe };
Metamaps.ServerData.Mappers = <%= @allmappers.to_json.html_safe %>; Metamaps.ServerData.Mappers = { @allmappers.to_json.html_safe };
Metamaps.ServerData.Collaborators = <%= @allcollaborators.to_json.html_safe %>; Metamaps.ServerData.Collaborators = { @allcollaborators.to_json.html_safe };
Metamaps.ServerData.Topics = <%= @alltopics.to_json(user: current_user).html_safe %>; Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe };
Metamaps.ServerData.Synapses = <%= @allsynapses.to_json.html_safe %>; Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe };
Metamaps.ServerData.Mappings = <%= @allmappings.to_json.html_safe %>; Metamaps.ServerData.Mappings = { @allmappings.to_json.html_safe };
Metamaps.ServerData.Messages = <%= @allmessages.to_json.html_safe %>; Metamaps.ServerData.Messages = { @allmessages.to_json.html_safe };
Metamaps.ServerData.Stars = <%= @allstars.to_json.html_safe %>; Metamaps.ServerData.Stars = { @allstars.to_json.html_safe };
Metamaps.ServerData.requests = <%= @allrequests.to_json.html_safe %>; Metamaps.ServerData.requests = { @allrequests.to_json.html_safe };
Metamaps.ServerData.VisualizeType = "ForceDirected"; Metamaps.ServerData.VisualizeType = "ForceDirected";
</script> </script>

View file

@ -1,24 +1,24 @@
<%= form_for(@metacode_set) do |f| %> { form_for(@metacode_set) do |f| }
<% if @metacode_set.errors.any? %> { if @metacode_set.errors.any? }
<div id="error_explanation"> <div id="error_explanation">
<h2><%= pluralize(@metacode_set.errors.count, "error") %> prohibited this metacode set from being saved:</h2> <h2>{ pluralize(@metacode_set.errors.count, "error") } prohibited this metacode set from being saved:</h2>
<ul> <ul>
<% @metacode_set.errors.full_messages.each do |msg| %> { @metacode_set.errors.full_messages.each do |msg| }
<li><%= msg %></li> <li>{ msg }</li>
<% end %> { end }
</ul> </ul>
</div> </div>
<% end %> { end }
<div class="field"> <div class="field">
<%= f.label :name %> { f.label :name }
<%= f.text_field :name %> { f.text_field :name }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<div class="field"> <div class="field">
<%= f.label :desc, "Description" %> { f.label :desc, "Description" }
<%= f.text_area :desc, :cols => "40", :rows => "4" %> { f.text_area :desc, :cols => "40", :rows => "4" }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
@ -32,58 +32,58 @@
<div class="clearfloat"></div> <div class="clearfloat"></div>
<div class="editMetacodes"> <div class="editMetacodes">
<ul id="filters-one"> <ul id="filters-one">
<% $i = 0 %> { $i = 0 }
<% @m = Metacode.order("name").all %> { @m = Metacode.order("name").all }
<% while $i < (Metacode.all.length / 4) do %> { while $i < (Metacode.all.length / 4) do }
<li id="<%= @m[$i].id %>" <% if not @m[$i].in_metacode_set(@metacode_set) %>class="toggledOff"<% end %> <li id="{ @m[$i].id }" { if not @m[$i].in_metacode_set(@metacode_set) }class="toggledOff"{ end }
onclick="Metamaps.Admin.liClickHandler.call(this);"> onclick="Metamaps.Admin.liClickHandler.call(this);">
<img src="<%= asset_path @m[$i].icon %>" alt="<%= @m[$i].name %>" /> <img src="{ asset_path @m[$i].icon }" alt="{ @m[$i].name }" />
<p><%= @m[$i].name.downcase %></p> <p>{ @m[$i].name.downcase }</p>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% $i += 1 %> { $i += 1 }
<% end %> { end }
</ul> </ul>
<ul id="filters-two"> <ul id="filters-two">
<% while $i < (Metacode.all.length / 4 * 2) do %> { while $i < (Metacode.all.length / 4 * 2) do }
<li id="<%= @m[$i].id %>" <% if not @m[$i].in_metacode_set(@metacode_set) %>class="toggledOff"<% end %> <li id="{ @m[$i].id }" { if not @m[$i].in_metacode_set(@metacode_set) }class="toggledOff"{ end }
onclick="Metamaps.Admin.liClickHandler.call(this);"> onclick="Metamaps.Admin.liClickHandler.call(this);">
<img src="<%= asset_path @m[$i].icon %>" alt="<%= @m[$i].name %>" /> <img src="{ asset_path @m[$i].icon }" alt="{ @m[$i].name }" />
<p><%= @m[$i].name.downcase %></p> <p>{ @m[$i].name.downcase }</p>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% $i += 1 %> { $i += 1 }
<% end %> { end }
</ul> </ul>
<ul id="filters-three"> <ul id="filters-three">
<% while $i < (Metacode.all.length / 4 * 3) do %> { while $i < (Metacode.all.length / 4 * 3) do }
<li id="<%= @m[$i].id %>" <% if not @m[$i].in_metacode_set(@metacode_set) %>class="toggledOff"<% end %> <li id="{ @m[$i].id }" { if not @m[$i].in_metacode_set(@metacode_set) }class="toggledOff"{ end }
onclick="Metamaps.Admin.liClickHandler.call(this);"> onclick="Metamaps.Admin.liClickHandler.call(this);">
<img src="<%= asset_path @m[$i].icon %>" alt="<%= @m[$i].name %>" /> <img src="{ asset_path @m[$i].icon }" alt="{ @m[$i].name }" />
<p><%= @m[$i].name.downcase %></p> <p>{ @m[$i].name.downcase }</p>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% $i += 1 %> { $i += 1 }
<% end %> { end }
</ul> </ul>
<ul id="filters-four"> <ul id="filters-four">
<% while $i < Metacode.all.length do %> { while $i < Metacode.all.length do }
<li id="<%= @m[$i].id %>" <% if not @m[$i].in_metacode_set(@metacode_set) %>class="toggledOff"<% end %> <li id="{ @m[$i].id }" { if not @m[$i].in_metacode_set(@metacode_set) }class="toggledOff"{ end }
onclick="Metamaps.Admin.liClickHandler.call(this);"> onclick="Metamaps.Admin.liClickHandler.call(this);">
<img src="<%= asset_path @m[$i].icon %>" alt="<%= @m[$i].name %>" /> <img src="{ asset_path @m[$i].icon }" alt="{ @m[$i].name }" />
<p><%= @m[$i].name.downcase %></p> <p>{ @m[$i].name.downcase }</p>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% $i += 1 %> { $i += 1 }
<% end %> { end }
</ul> </ul>
</div> </div>
<%= hidden_field(:metacodes, :value, {:value => 0}) %> { hidden_field(:metacodes, :value, {:value => 0}) }
<div class="clearfloat"></div> <div class="clearfloat"></div>
<div class="actions"> <div class="actions">
<%= link_to 'Cancel', metacode_sets_path, { link_to 'Cancel', metacode_sets_path,
{ :class => 'button' } %> { :class => 'button' } }
<%= f.submit :class => 'add', :onclick => "return Metamaps.Admin.validate();" %> { f.submit :class => 'add', :onclick => "return Metamaps.Admin.validate();" }
</div> </div>
<% end %> { end }

View file

@ -1,14 +1,14 @@
<div id="yield"> <div id="yield">
<div class='centerContent'> <div class='centerContent'>
<%= render 'form' %> { render 'form' }
</div> </div>
</div> </div>
<script> <script>
<% Metacode.all.each do |m| %> { Metacode.all.each do |m| }
<% if m.in_metacode_set(@metacode_set) %> { if m.in_metacode_set(@metacode_set) }
Metamaps.Admin.selectMetacodes.push("<%= m.id %>"); Metamaps.Admin.selectMetacodes.push("{ m.id }");
<% end %> { end }
Metamaps.Admin.allMetacodes.push("<%= m.id %>"); Metamaps.Admin.allMetacodes.push("{ m.id }");
<% end %> { end }
</script> </script>

View file

@ -8,29 +8,29 @@
<th>Metacodes</th> <th>Metacodes</th>
</tr> </tr>
<% @metacode_sets.each do |metacode_set| %> { @metacode_sets.each do |metacode_set| }
<tr> <tr>
<td> <td>
<%= metacode_set.name %><br /> { metacode_set.name }<br />
<%= link_to 'Edit', { link_to 'Edit',
edit_metacode_set_path(metacode_set) %> edit_metacode_set_path(metacode_set) }
<br /> <br />
<%= link_to 'Delete', { link_to 'Delete',
metacode_set, method: :delete, metacode_set, method: :delete,
data: { confirm: 'Are you sure?' } %> data: { confirm: 'Are you sure?' } }
</td> </td>
<td class='metacodeSetDesc'><%= metacode_set.desc %></td> <td class='metacodeSetDesc'>{ metacode_set.desc }</td>
<td> <td>
<% metacode_set.metacodes.each_with_index do |metacode, index| %> { metacode_set.metacodes.each_with_index do |metacode, index| }
<img class='metacodeSetImage' src='<%= asset_path metacode.icon %>' /> <img class='metacodeSetImage' src='{ asset_path metacode.icon }' />
<% if (index+1)%4 == 0 %> { if (index+1)%4 == 0 }
<div class='clearfloat'></div> <div class='clearfloat'></div>
<% end %> { end }
<% end %> { end }
<div class='clearfloat'></div> <div class='clearfloat'></div>
</td> </td>
</tr> </tr>
<% end %> { end }
</table> </table>
</div> </div>
</div> </div>

View file

@ -1,14 +1,14 @@
<div id="yield"> <div id="yield">
<div class='centerContent'> <div class='centerContent'>
<%= render 'form' %> { render 'form' }
</div> </div>
</div> </div>
<script> <script>
<% Metacode.all.each do |m| %> { Metacode.all.each do |m| }
<% if m.in_metacode_set(@metacode_set) %> { if m.in_metacode_set(@metacode_set) }
Metamaps.Admin.selectMetacodes.push("<%= m.id %>"); Metamaps.Admin.selectMetacodes.push("{ m.id }");
<% end %> { end }
Metamaps.Admin.allMetacodes.push("<%= m.id %>"); Metamaps.Admin.allMetacodes.push("{ m.id }");
<% end %> { end }
</script> </script>

View file

@ -1,43 +1,43 @@
<%= form_for(@metacode) do |f| %> { form_for(@metacode) do |f| }
<% if @metacode.errors.any? %> { if @metacode.errors.any? }
<div id="error_explanation"> <div id="error_explanation">
<h2><%= pluralize(@metacode.errors.count, "error") %> prohibited this metacode from being saved:</h2> <h2>{ pluralize(@metacode.errors.count, "error") } prohibited this metacode from being saved:</h2>
<ul> <ul>
<% @metacode.errors.full_messages.each do |msg| %> { @metacode.errors.full_messages.each do |msg| }
<li><%= msg %></li> <li>{ msg }</li>
<% end %> { end }
</ul> </ul>
</div> </div>
<% end %> { end }
<div class="field"> <div class="field">
<%= f.label :name %> { f.label :name }
<%= f.text_field :name %> { f.text_field :name }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<% unless @metacode.new_record? %> { unless @metacode.new_record? }
<div class="field"> <div class="field">
<%= f.label 'Current Icon' %> { f.label 'Current Icon' }
<%= image_tag @metacode.icon, width: 96 %> { image_tag @metacode.icon, width: 96 }
</div> </div>
<% end %> { end }
<div class="field"> <div class="field">
<% if @metacode.new_record? %> { if @metacode.new_record? }
<%= f.label 'Icon' %> { f.label 'Icon' }
<% else %> { else }
<%= f.label 'Replace Icon: ' %> { f.label 'Replace Icon: ' }
<% end %> { end }
<%= f.hidden_field :manual_icon, value: nil %> { f.hidden_field :manual_icon, value: nil }
<%= f.file_field :aws_icon %> { f.file_field :aws_icon }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<div class="field"> <div class="field">
<%= f.label :color, "Color (hex with # sign)" %> { f.label :color, "Color (hex with # sign)" }
<%= f.text_field :color %> { f.text_field :color }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<div class="actions"> <div class="actions">
<%= link_to 'Cancel', metacodes_path, { :class => 'button' } %> { link_to 'Cancel', metacodes_path, { :class => 'button' } }
<%= f.submit :class => 'add' %> { f.submit :class => 'add' }
</div> </div>
<% end %> { end }

View file

@ -1,5 +1,5 @@
<div id="yield"> <div id="yield">
<div class='centerContent'> <div class='centerContent'>
<%= render 'form' %> { render 'form' }
</div> </div>
</div> </div>

View file

@ -10,21 +10,21 @@
<th></th> <th></th>
</tr> </tr>
<% @metacodes.each do |metacode| %> { @metacodes.each do |metacode| }
<tr> <tr>
<td><%= metacode.name %></td> <td>{ metacode.name }</td>
<td class="iconURL"><%= metacode.icon %></td> <td class="iconURL">{ metacode.icon }</td>
<% if metacode.color %> { if metacode.color }
<td class="iconColor" style="background-color: <%= metacode.color %>"> <td class="iconColor" style="background-color: { metacode.color }">
<%= metacode.color %> { metacode.color }
</td> </td>
<% else %> { else }
<td></td> <td></td>
<% end %> { end }
<td><%= image_tag metacode.icon, width: 40 %></td> <td>{ image_tag metacode.icon, width: 40 }</td>
<td><%= link_to 'Edit', edit_metacode_path(metacode) %></td> <td>{ link_to 'Edit', edit_metacode_path(metacode) }</td>
</tr> </tr>
<% end %> { end }
</table> </table>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<div id="yield"> <div id="yield">
<div class='centerContent'> <div class='centerContent'>
<%= render 'form' %> { render 'form' }
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<% content_for :title, 'Notifications | Metamaps' %> { content_for :title, 'Notifications | Metamaps' }
<% content_for :mobile_title, 'Notifications' %> { content_for :mobile_title, 'Notifications' }
<div id="yield"> <div id="yield">
<div class="centerContent notificationsPage"> <div class="centerContent notificationsPage">
@ -7,72 +7,72 @@
<h2 class="title">Notifications</h4> <h2 class="title">Notifications</h4>
</header> </header>
<ul class="notifications"> <ul class="notifications">
<% blacklist = [MAP_ACCESS_REQUEST, MAP_ACCESS_APPROVED, MAP_INVITE_TO_EDIT] %> { blacklist = [MAP_ACCESS_REQUEST, MAP_ACCESS_APPROVED, MAP_INVITE_TO_EDIT] }
<% notifications = @notifications.to_a.delete_if{|n| blacklist.include?(n.notification_code) && (n.notified_object.nil? || n.notified_object.map.nil?) }%> { notifications = @notifications.to_a.delete_if{|n| blacklist.include?(n.notification_code) && (n.notified_object.nil? || n.notified_object.map.nil?) }}
<% notifications.each do |notification| %> { notifications.each do |notification| }
<% receipt = @receipts.find_by(notification_id: notification.id) %> { receipt = @receipts.find_by(notification_id: notification.id) }
<li class="notification <%= receipt.is_read? ? 'read' : 'unread' %>" id="notification-<%= notification.id %>"> <li class="notification { receipt.is_read? ? 'read' : 'unread' }" id="notification-{ notification.id }">
<%= link_to notification_path(notification.id) do %> { link_to notification_path(notification.id) do }
<div class="notification-actor"> <div class="notification-actor">
<%= image_tag notification.sender.image(:thirtytwo) %> { image_tag notification.sender.image(:thirtytwo) }
</div> </div>
<div class="notification-body"> <div class="notification-body">
<div class="in-bold"><%= notification.sender.name %></div> <div class="in-bold">{ notification.sender.name }</div>
<% {
case notification.notification_code case notification.notification_code
when MAP_ACCESS_APPROVED %> when MAP_ACCESS_APPROVED }
<% map = notification.notified_object.map %> { map = notification.notified_object.map }
granted your request to edit map <span class="in-bold"><%= map.name %></span> granted your request to edit map <span class="in-bold">{ map.name }</span>
<% when MAP_ACCESS_REQUEST %> { when MAP_ACCESS_REQUEST }
<% map = notification.notified_object.map %> { map = notification.notified_object.map }
wants permission to map with you on <span class="in-bold"><%= map.name %></span> wants permission to map with you on <span class="in-bold">{ map.name }</span>
<% if !notification.notified_object.answered %> { if !notification.notified_object.answered }
&nbsp;&nbsp;<div class="action">Offer a response</div> &nbsp;&nbsp;<div class="action">Offer a response</div>
<% end %> { end }
<% when MAP_INVITE_TO_EDIT %> { when MAP_INVITE_TO_EDIT }
<% map = notification.notified_object.map %> { map = notification.notified_object.map }
gave you edit access to map <span class="in-bold"><%= map.name %></span> gave you edit access to map <span class="in-bold">{ map.name }</span>
<% when TOPIC_ADDED_TO_MAP %> { when TOPIC_ADDED_TO_MAP }
<% topic = notification.notified_object.eventable { topic = notification.notified_object.eventable
map = notification.notified_object.map %> map = notification.notified_object.map }
added topic <span class="in-bold"><%= topic.name %></span> to map <span class="in-bold"><%= map.name %></span> added topic <span class="in-bold">{ topic.name }</span> to map <span class="in-bold">{ map.name }</span>
<% when TOPIC_CONNECTED_1 %> { when TOPIC_CONNECTED_1 }
<% topic1 = notification.notified_object&.topic1 %> { topic1 = notification.notified_object&.topic1 }
<% topic2 = notification.notified_object&.topic2 %> { topic2 = notification.notified_object&.topic2 }
connected <span class="in-bold"><%= topic1&.name %></span> to <span class="in-bold"><%= topic2&.name %></span> connected <span class="in-bold">{ topic1&.name }</span> to <span class="in-bold">{ topic2&.name }</span>
<% when TOPIC_CONNECTED_2 %> { when TOPIC_CONNECTED_2 }
<% topic1 = notification.notified_object&.topic1 %> { topic1 = notification.notified_object&.topic1 }
<% topic2 = notification.notified_object&.topic2 %> { topic2 = notification.notified_object&.topic2 }
connected <span class="in-bold"><%= topic2&.name %></span> to <span class="in-bold"><%= topic1&.name %></span> connected <span class="in-bold">{ topic2&.name }</span> to <span class="in-bold">{ topic1&.name }</span>
<% when MESSAGE_FROM_DEVS %> { when MESSAGE_FROM_DEVS }
<%= notification.subject %> { notification.subject }
<% end %> { end }
</div> </div>
<% end %> { end }
<div class="notification-read-unread"> <div class="notification-read-unread">
<% if receipt.is_read? %> { if receipt.is_read? }
<%= link_to 'mark as unread', mark_unread_notification_path(notification.id), remote: true, method: :put %> { link_to 'mark as unread', mark_unread_notification_path(notification.id), remote: true, method: :put }
<% else %> { else }
<%= link_to 'mark as read', mark_read_notification_path(notification.id), remote: true, method: :put %> { link_to 'mark as read', mark_read_notification_path(notification.id), remote: true, method: :put }
<% end %> { end }
</div> </div>
<div class="notification-date"> <div class="notification-date">
<%= notification.created_at.strftime("%b %d") %> { notification.created_at.strftime("%b %d") }
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% end %> { end }
<% if notifications.count == 0 %> { if notifications.count == 0 }
<div class="emptyInbox"> <div class="emptyInbox">
You have no notifications. More time for dancing. You have no notifications. More time for dancing.
</div> </div>
<% end %> { end }
</ul> </ul>
</div> </div>
<% if @notifications.total_pages > 1 %> { if @notifications.total_pages > 1 }
<div class="centerContent withPadding pagination"> <div class="centerContent withPadding pagination">
<%= paginate @notifications %> { paginate @notifications }
</div> </div>
<% end %> { end }
</div> </div>

View file

@ -1,7 +1,7 @@
$('#notification-<%= @notification.id %> .notification-read-unread > a') $('#notification-{ @notification.id } .notification-read-unread > a')
.text('mark as unread') .text('mark as unread')
.attr('href', '<%= mark_unread_notification_path(@notification.id) %>') .attr('href', '{ mark_unread_notification_path(@notification.id) }')
$('#notification-<%= @notification.id %>') $('#notification-{ @notification.id }')
.removeClass('unread') .removeClass('unread')
.addClass('read') .addClass('read')
Metamaps.GlobalUI.Notifications.decrementUnread(Metamaps.GlobalUI.ReactApp.render) Metamaps.GlobalUI.Notifications.decrementUnread(Metamaps.GlobalUI.ReactApp.render)

View file

@ -1,7 +1,7 @@
$('#notification-<%= @notification.id %> .notification-read-unread > a') $('#notification-{ @notification.id } .notification-read-unread > a')
.text('mark as read') .text('mark as read')
.attr('href', '<%= mark_read_notification_path(@notification.id) %>') .attr('href', '{ mark_read_notification_path(@notification.id) }')
$('#notification-<%= @notification.id %>') $('#notification-{ @notification.id }')
.removeClass('read') .removeClass('read')
.addClass('unread') .addClass('unread')
Metamaps.GlobalUI.Notifications.incrementUnread(Metamaps.GlobalUI.ReactApp.render) Metamaps.GlobalUI.Notifications.incrementUnread(Metamaps.GlobalUI.ReactApp.render)

View file

@ -1,52 +1,52 @@
<% content_for :title, 'Notifications | Metamaps' %> { content_for :title, 'Notifications | Metamaps' }
<% content_for :mobile_title, 'Notifications' %> { content_for :mobile_title, 'Notifications' }
<div id="yield"> <div id="yield">
<div class="centerContent withPadding back"> <div class="centerContent withPadding back">
<%= link_to 'Back to notifications', notifications_path %> { link_to 'Back to notifications', notifications_path }
</div> </div>
<div class="centerContent notificationPage"> <div class="centerContent notificationPage">
<h2 class="notification-title"> <h2 class="notification-title">
<% case @notification.notification_code { case @notification.notification_code
when MAP_ACCESS_REQUEST when MAP_ACCESS_REQUEST
request = @notification.notified_object request = @notification.notified_object
map = request.map %> map = request.map }
<%= image_tag @notification.sender.image(:thirtytwo), class: 'thirty-two-avatar' %> <span style='font-weight:bold;' class='requesterName'><%= request.user.name %></span> wants to collaborate on map <span style='font-weight:bold;'><%= map.name %></span> { image_tag @notification.sender.image(:thirtytwo), class: 'thirty-two-avatar' } <span style='font-weight:bold;' class='requesterName'>{ request.user.name }</span> wants to collaborate on map <span style='font-weight:bold;'>{ map.name }</span>
<% else %> { else }
<%= @notification.subject %> { @notification.subject }
<% end %> { end }
</h2> </h2>
<% case @notification.notification_code { case @notification.notification_code
when MAP_ACCESS_REQUEST %> when MAP_ACCESS_REQUEST }
<div class="notification-body"> <div class="notification-body">
<p class="main-text"> <p class="main-text">
<% if false && request.answered %> { if false && request.answered }
<% if request.approved %> { if request.approved }
You already responded to this access request, and allowed access. You already responded to this access request, and allowed access.
<% elsif !request.approved %> { elsif !request.approved }
You already responded to this access request, and declined access. If you changed your mind, you can still grant You already responded to this access request, and declined access. If you changed your mind, you can still grant
them access by going to the map and adding them as a collaborator. them access by going to the map and adding them as a collaborator.
<% end %> { end }
<% else %> { else }
<%= image_tag asset_path('ellipsis.gif'), class: 'hidden' %> { image_tag asset_path('ellipsis.gif'), class: 'hidden' }
<%= link_to 'Allow', approve_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button allow' %> { link_to 'Allow', approve_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button allow' }
<%= link_to 'Decline', deny_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button decline' %> { link_to 'Decline', deny_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button decline' }
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('.notification-body .button').click(function() { $('.notification-body .button').click(function() {
$(this).html('<img src="<%= asset_path('ellipsis.gif') %>" />') $(this).html('<img src="{ asset_path('ellipsis.gif') }" />')
}) })
}) })
</script> </script>
<% end %> { end }
</p> </p>
<%= link_to 'Go to map', map_url(map) %> { link_to 'Go to map', map_url(map) }
&nbsp;&nbsp;<%= link_to 'View mapper profile', explore_path(id: request.user.id) %> &nbsp;&nbsp;{ link_to 'View mapper profile', explore_path(id: request.user.id) }
</div> </div>
<% else %> { else }
<div class="notification-body"> <div class="notification-body">
<%= raw @notification.body %> { raw @notification.body }
</div> </div>
<% end %> { end }
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
<%# {#
# @file # @file
# The inner HTML of the cheatsheet # The inner HTML of the cheatsheet
#%> #}
<h3>HELP</h3> <h3>HELP</h3>
@ -26,7 +26,7 @@
</ul> </ul>
<div id="csTopicView"> <div id="csTopicView">
<div class="csItem"><span class="csTitle">Enter Topic (radial) View:</span> Click on a Topic result from Search, or click the synapse <img src="<%= asset_path 'synapse16.png' %>" width="16" align="middle" /> icon inside open Topic Card on map</div> <div class="csItem"><span class="csTitle">Enter Topic (radial) View:</span> Click on a Topic result from Search, or click the synapse <img src="{ asset_path 'synapse16.png' }" width="16" align="middle" /> icon inside open Topic Card on map</div>
<div class="csItem"><span class="csTitle">Recenter Topics around chosen Topic:</span> Alt + click on the topic OR Alt + E</div> <div class="csItem"><span class="csTitle">Recenter Topics around chosen Topic:</span> Alt + click on the topic OR Alt + E</div>
<div class="csItem"><span class="csTitle">Reveal the siblings for a Topic:</span> Right-click and choose 'Reveal siblings' OR Alt + R</div> <div class="csItem"><span class="csTitle">Reveal the siblings for a Topic:</span> Right-click and choose 'Reveal siblings' OR Alt + R</div>
<div class="csItem"><span class="csTitle">Center topic and reveal siblings:</span> Alt + T</div> <div class="csItem"><span class="csTitle">Center topic and reveal siblings:</span> Alt + T</div>
@ -64,7 +64,7 @@
<span class="csTitle">Change Topic permission:</span> Click on 'Permission' icon (only for topic creator) <span class="csTitle">Change Topic permission:</span> Click on 'Permission' icon (only for topic creator)
</div> </div>
<div class="csItem indented"> <div class="csItem indented">
<span class="csTitle">Open Topic view:</span> Click on <img src="<%= asset_path 'synapse16.png' %>" width="16" align="middle" /> icon within topic card bar <span class="csTitle">Open Topic view:</span> Click on <img src="{ asset_path 'synapse16.png' }" width="16" align="middle" /> icon within topic card bar
</div> </div>
<div class="csItem indented"> <div class="csItem indented">
<span class="csTitle">Close Topic card:</span> Click on canvas <span class="csTitle">Close Topic card:</span> Click on canvas

View file

@ -1,21 +1,21 @@
<%# {#
# @file # @file
# Partial view, renders a form that creates a new map. # Partial view, renders a form that creates a new map.
#%> #}
<div class="onConsole"> <div class="onConsole">
<%= form_for Map.new, url: maps_url, remote: true, html: { class: "new_map", id: "fork_map" } do |form|%> { form_for Map.new, url: maps_url, remote: true, html: { class: "new_map", id: "fork_map" } do |form|}
<h3 class="forCreateMap">Save To New Map</h3> <h3 class="forCreateMap">Save To New Map</h3>
<div class="inputGroup"> <div class="inputGroup">
<label for="map_name">Name: </label> <label for="map_name">Name: </label>
<%= form.text_field :name, :maxlength => 140 %> { form.text_field :name, :maxlength => 140 }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<div class="inputGroup"> <div class="inputGroup">
<label for="map_desc">Description: </label> <label for="map_desc">Description: </label>
<%= form.text_area :desc, class: "description", :rows => 5, :cols => 43 %> { form.text_area :desc, class: "description", :rows => 5, :cols => 43 }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
@ -58,5 +58,5 @@
<button class="button submitMap">Create!</button> <button class="button submitMap">Create!</button>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
<% end %> { end }
</div> </div>

View file

@ -1,3 +1,3 @@
<div class="unsubscribe-link"> <div class="unsubscribe-link">
<%= link_to 'Unsubscribe from all Metamaps emails', unsubscribe_notifications_url(protocol: Rails.env.production? ? :https : :http) %> { link_to 'Unsubscribe from all Metamaps emails', unsubscribe_notifications_url(protocol: Rails.env.production? ? :https : :http) }
</div> </div>

View file

@ -2,4 +2,4 @@
You can unsubscribe from all Metamaps emails by visiting the following link: You can unsubscribe from all Metamaps emails by visiting the following link:
<%= unsubscribe_notifications_url(protocol: Rails.env.production? ? :https : :http) %> { unsubscribe_notifications_url(protocol: Rails.env.production? ? :https : :http) }

View file

@ -1,10 +1,10 @@
<style> <style>
<% # give text the color of the metacode by adding the class .metacodeColor{metacode-id} %> { # give text the color of the metacode by adding the class .metacodeColor{metacode-id} }
<% Metacode.all.each do |m| %> { Metacode.all.each do |m| }
<% if m.color %> { if m.color }
<%= ".metacodeColor" + m.id.to_s + "{" %> { ".metacodeColor" + m.id.to_s + "{" }
<%= "color:" + m.color + " !important;" %> { "color:" + m.color + " !important;" }
<%= "}" %> { "}" }
<% end %> { end }
<% end %> { end }
</style> </style>

View file

@ -1,9 +1,9 @@
<%# {#
# @file # @file
# this code generates the list of icons that will drop down in the metacode select list on the topic card # this code generates the list of icons that will drop down in the metacode select list on the topic card
#%> #}
<script> <script>
Metamaps.ServerData = Metamaps.ServerData || {} Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.metacodeSets = <%= raw metacode_sets_json %> Metamaps.ServerData.metacodeSets = { raw metacode_sets_json }
</script> </script>

View file

@ -1,12 +1,12 @@
<%# {#
# @file # @file
# The inner HTML for switching your metacode set # The inner HTML for switching your metacode set
#%> #}
<% metacodes = current_user.settings.metacodes %> { metacodes = current_user.settings.metacodes }
<% selectedSet = metacodes[0].include?("metacodeset") ? metacodes[0].sub("metacodeset-","") : "custom" %> { selectedSet = metacodes[0].include?("metacodeset") ? metacodes[0].sub("metacodeset-","") : "custom" }
<% allMetacodeSets = MetacodeSet.order("name").all.to_a %> { allMetacodeSets = MetacodeSet.order("name").all.to_a }
<% if selectedSet == "custom" { if selectedSet == "custom"
index = allMetacodeSets.length + 2 index = allMetacodeSets.length + 2
elsif selectedSet == 'Recent' elsif selectedSet == 'Recent'
index = 0 index = 0
@ -15,7 +15,7 @@
else else
set = MetacodeSet.find(selectedSet.to_i) set = MetacodeSet.find(selectedSet.to_i)
index = allMetacodeSets.index(set) + 2 index = allMetacodeSets.index(set) + 2
end %> end }
<h3>Switch Metacode Set</h3> <h3>Switch Metacode Set</h3>
<p>Use metacode sets to enter different modes of mapping.</p> <p>Use metacode sets to enter different modes of mapping.</p>
@ -24,23 +24,23 @@
<ul> <ul>
<li><a href="#metacodeSwitchTabsRecent" data-set-id="recent" id="metacodeSetRecent">RECENTLY USED</a></li> <li><a href="#metacodeSwitchTabsRecent" data-set-id="recent" id="metacodeSetRecent">RECENTLY USED</a></li>
<li><a href="#metacodeSwitchTabsMost" data-set-id="most" id="metacodeSetMost">MOST USED</a></li> <li><a href="#metacodeSwitchTabsMost" data-set-id="most" id="metacodeSetMost">MOST USED</a></li>
<% allMetacodeSets.each do |m| %> { allMetacodeSets.each do |m| }
<li><a href="#metacodeSwitchTabs<%= m.id %>" data-set-id="<%= m.id %>"><%= m.name %></a></li> <li><a href="#metacodeSwitchTabs{ m.id }" data-set-id="{ m.id }">{ m.name }</a></li>
<% end %> { end }
<li><a href="#metacodeSwitchTabsCustom" data-set-id="custom" id="metacodeSetCustom">CUSTOM SELECTION</a></li> <li><a href="#metacodeSwitchTabsCustom" data-set-id="custom" id="metacodeSetCustom">CUSTOM SELECTION</a></li>
</ul> </ul>
<% recent = user_recent_metacodes() %> { recent = user_recent_metacodes() }
<div id="metacodeSwitchTabsRecent" <div id="metacodeSwitchTabsRecent"
data-metacodes="<%= recent.map(&:id).join(',') %>"> data-metacodes="{ recent.map(&:id).join(',') }">
<% @list = '' %> { @list = '' }
<% recent.each_with_index do |m, index| %> { recent.each_with_index do |m, index| }
<% @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> { @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' }
<% end %> { end }
<div class="metacodeSwitchTab"> <div class="metacodeSwitchTab">
<p class="setDesc">The 5 Metacodes you've used most recently.</p> <p class="setDesc">The 5 Metacodes you've used most recently.</p>
<div class="metacodeSetList"> <div class="metacodeSetList">
<ul> <ul>
<%= @list.html_safe %> { @list.html_safe }
</ul> </ul>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
@ -49,18 +49,18 @@
Switch Set Switch Set
</button> </button>
</div> </div>
<% most_used = user_most_used_metacodes() %> { most_used = user_most_used_metacodes() }
<div id="metacodeSwitchTabsMost" <div id="metacodeSwitchTabsMost"
data-metacodes="<%= most_used.map(&:id).join(',') %>"> data-metacodes="{ most_used.map(&:id).join(',') }">
<% @list = '' %> { @list = '' }
<% most_used.each_with_index do |m, index| %> { most_used.each_with_index do |m, index| }
<% @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> { @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' }
<% end %> { end }
<div class="metacodeSwitchTab"> <div class="metacodeSwitchTab">
<p class="setDesc">The 5 Metacodes you've used the most.</p> <p class="setDesc">The 5 Metacodes you've used the most.</p>
<div class="metacodeSetList"> <div class="metacodeSetList">
<ul> <ul>
<%= @list.html_safe %> { @list.html_safe }
</ul> </ul>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
@ -69,45 +69,45 @@
Switch Set Switch Set
</button> </button>
</div> </div>
<% allMetacodeSets.each_with_index do |m, localindex| %> { allMetacodeSets.each_with_index do |m, localindex| }
<div id="metacodeSwitchTabs<%= m.id %>" <div id="metacodeSwitchTabs{ m.id }"
data-metacodes="<%= m.metacodes.map(&:id).join(',') %>"> data-metacodes="{ m.metacodes.map(&:id).join(',') }">
<% @list = '' %> { @list = '' }
<% m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| %> { m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| }
<% @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> { @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' }
<% end %> { end }
<div class="metacodeSwitchTab"> <div class="metacodeSwitchTab">
<p class="setDesc"><%= m.desc %></p> <p class="setDesc">{ m.desc }</p>
<div class="metacodeSetList"> <div class="metacodeSetList">
<ul> <ul>
<%= @list.html_safe %> { @list.html_safe }
</ul> </ul>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
</div> </div>
<button class="button" onclick="Metamaps.Create.updateMetacodeSet(<%= m.id %>, <%= localindex + 2 %>, false);"> <button class="button" onclick="Metamaps.Create.updateMetacodeSet({ m.id }, { localindex + 2 }, false);">
Switch Set Switch Set
</button> </button>
</div> </div>
<% end %> { end }
<div id="metacodeSwitchTabsCustom"> <div id="metacodeSwitchTabsCustom">
<div class="setDesc">Choose Your Metacodes</div> <div class="setDesc">Choose Your Metacodes</div>
<div class="selectNone">NONE</div> <div class="selectNone">NONE</div>
<div class="selectAll">ALL</div> <div class="selectAll">ALL</div>
<% @list = '' %> { @list = '' }
<% metacodesInUse = user_metacodes() %> { metacodesInUse = user_metacodes() }
<% Metacode.order("name").all.each_with_index do |m, index| %> { Metacode.order("name").all.each_with_index do |m, index| }
<% mClass = metacodesInUse.index(m) == nil ? "toggledOff" : "" %> { mClass = metacodesInUse.index(m) == nil ? "toggledOff" : "" }
<% @list += '<li id="' + m.id.to_s + '" data-name="' + m.name + '" class="' + mClass + '"><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> { @list += '<li id="' + m.id.to_s + '" data-name="' + m.name + '" class="' + mClass + '"><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' }
<% end %> { end }
<div class="customMetacodeList"> <div class="customMetacodeList">
<ul> <ul>
<%= @list.html_safe %> { @list.html_safe }
</ul> </ul>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<button class="button" onclick="Metamaps.Create.updateMetacodeSet('custom', <%= allMetacodeSets.length + 2 %>, true);"> <button class="button" onclick="Metamaps.Create.updateMetacodeSet('custom', { allMetacodeSets.length + 2 }, true);">
Switch to Custom Set Switch to Custom Set
</button> </button>
</div> </div>
@ -116,6 +116,6 @@
<div class="clearfloat"></div> <div class="clearfloat"></div>
<script> <script>
Metamaps.Create.selectedMetacodeSet = "metacodeset-<%= selectedSet %>" Metamaps.Create.selectedMetacodeSet = "metacodeset-{ selectedSet }"
Metamaps.Create.selectedMetacodeSetIndex = <%= index %> Metamaps.Create.selectedMetacodeSetIndex = { index }
</script> </script>

View file

@ -1,5 +1,5 @@
<%= form_for @token, url: '/api/v2/tokens', method: :post do |form| %> { form_for @token, url: '/api/v2/tokens', method: :post do |form| }
<h4>Request new API Token</h4> <h4>Request new API Token</h4>
<%= form.text_field :description, placeholder: "Token description..." %> { form.text_field :description, placeholder: "Token description..." }
<%= form.submit %> { form.submit }
<% end %> { end }

View file

@ -1,20 +1,20 @@
<%# {#
# #
# @file # @file
# This shows a topic and its siblings. # This shows a topic and its siblings.
# URL: /topics/<topicid> # URL: /topics/<topicid>
# #
%> }
<% content_for :title, @topic.name + " | Metamaps" %> { content_for :title, @topic.name + " | Metamaps" }
<% content_for :mobile_title, @topic.name %> { content_for :mobile_title, @topic.name }
<script> <script>
Metamaps.currentSection = "topic" Metamaps.currentSection = "topic"
Metamaps.currentPage = <%= @topic.id.to_s %> Metamaps.currentPage = { @topic.id.to_s }
Metamaps.ServerData = Metamaps.ServerData || {} Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveTopic = <%= @topic.to_json(user: current_user).html_safe %> Metamaps.ServerData.ActiveTopic = { @topic.to_json(user: current_user).html_safe }
Metamaps.ServerData.Creators = <%= @allcreators.to_json.html_safe %> Metamaps.ServerData.Creators = { @allcreators.to_json.html_safe }
Metamaps.ServerData.Topics = <%= @alltopics.to_json(user: current_user).html_safe %> Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe }
Metamaps.ServerData.Synapses = <%= @allsynapses.to_json.html_safe %> Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe }
Metamaps.ServerData.VisualizeType = "RGraph" Metamaps.ServerData.VisualizeType = "RGraph"
</script> </script>

View file

@ -1,12 +1,12 @@
<h2>Resend confirmation instructions</h2> <h2>Resend confirmation instructions</h2>
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> { form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| }
<%= devise_error_messages! %> { devise_error_messages! }
<div><%= f.label :email %><br /> <div>{ f.label :email }<br />
<%= f.email_field :email, :autofocus => true %></div> { f.email_field :email, :autofocus => true }</div>
<div><%= f.submit "Resend confirmation instructions" %></div> <div>{ f.submit "Resend confirmation instructions" }</div>
<% end %> { end }
<%= render "devise/shared/links" %> { render "devise/shared/links" }

View file

@ -1,17 +1,17 @@
<%# {#
# @file # @file
# /users/:id/edit # /users/:id/edit
# User edit form # User edit form
#%> #}
<% content_for :title, @user.name + "'s Settings | Metamaps" %> { content_for :title, @user.name + "'s Settings | Metamaps" }
<% content_for :mobile_title, "Account Settings" %> { content_for :mobile_title, "Account Settings" }
<div id="yield"> <div id="yield">
<%= form_for @user, url: user_url, :html =>{ :multipart => true, :class => "edit_user centerGreyForm"} do |form| %> { form_for @user, url: user_url, :html =>{ :multipart => true, :class => "edit_user centerGreyForm"} do |form| }
<h3>Edit Settings</h3> <h3>Edit Settings</h3>
<div class="userImage"> <div class="userImage">
<div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()"> <div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()">
<%= image_tag @user.image.url(:ninetysix), :size => "84x84" %> { image_tag @user.image.url(:ninetysix), :size => "84x84" }
<div class="editPhoto"></div> <div class="editPhoto"></div>
</div> </div>
<div class="userImageMenu"> <div class="userImageMenu">
@ -19,9 +19,9 @@
<ul> <ul>
<li class="upload"> <li class="upload">
Upload Photo Upload Photo
<%= hidden_field_tag "remove_image", "0" %> { hidden_field_tag "remove_image", "0" }
<%= form.file_field :image %> { form.file_field :image }
<%= form.label :image %> { form.label :image }
</li> </li>
<li class="remove" onclick="Metamaps.Account.removePicture()">Remove</li> <li class="remove" onclick="Metamaps.Account.removePicture()">Remove</li>
<li class="cancel" onclick="Metamaps.Account.closeChangePicture()">Cancel</li> <li class="cancel" onclick="Metamaps.Account.closeChangePicture()">Cancel</li>
@ -30,58 +30,58 @@
</div> </div>
<div class="accountName" onclick="Metamaps.Account.changeName()"> <div class="accountName" onclick="Metamaps.Account.changeName()">
<div class="nameEdit"><%= @user.name %></div> <div class="nameEdit">{ @user.name }</div>
</div> </div>
<div class="changeName"> <div class="changeName">
<%= form.label :name, "Name:", class: 'firstFieldText' %> { form.label :name, "Name:", class: 'firstFieldText' }
<%= form.text_field :name %> { form.text_field :name }
</div> </div>
<div> <div>
<%= form.label :email, "Email:", class: 'firstFieldText' %> { form.label :email, "Email:", class: 'firstFieldText' }
<%= form.email_field :email %> { form.email_field :email }
</div> </div>
<div> <div>
<%= form.label :emails_allowed, class: 'firstFieldText' do %> { form.label :emails_allowed, class: 'firstFieldText' do }
<%= form.check_box :emails_allowed, class: 'inline' %> { form.check_box :emails_allowed, class: 'inline' }
Send Metamaps notifications to my email. Send Metamaps notifications to my email.
<% end %> { end }
<%= fields_for :settings, @user.settings do |settings| %> { fields_for :settings, @user.settings do |settings| }
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %> { settings.label :follow_topic_on_created, class: 'firstFieldText' do }
<%= settings.check_box :follow_topic_on_created, class: 'inline' %> { settings.check_box :follow_topic_on_created, class: 'inline' }
Auto-follow topics you create. Auto-follow topics you create.
<% end %> { end }
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %> { settings.label :follow_topic_on_contributed, class: 'firstFieldText' do }
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %> { settings.check_box :follow_topic_on_contributed, class: 'inline' }
Auto-follow topics you edit. Auto-follow topics you edit.
<% end %> { end }
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %> { settings.label :follow_map_on_created, class: 'firstFieldText' do }
<%= settings.check_box :follow_map_on_created, class: 'inline' %> { settings.check_box :follow_map_on_created, class: 'inline' }
Auto-follow maps you create. Auto-follow maps you create.
<% end %> { end }
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %> { settings.label :follow_map_on_contributed, class: 'firstFieldText' do }
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %> { settings.check_box :follow_map_on_contributed, class: 'inline' }
Auto-follow maps you edit. Auto-follow maps you edit.
<% end %> { end }
<% end %> { end }
</div> </div>
<div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div> <div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div>
<div class="toHide"> <div class="toHide">
<div> <div>
<%= form.label :current_password, "Current Password:", :class => "firstFieldText" %> { form.label :current_password, "Current Password:", :class => "firstFieldText" }
<%= password_field_tag :current_password, params[:current_password] %> { password_field_tag :current_password, params[:current_password] }
</div> </div>
<div> <div>
<%= form.label :password, "New Password:", :class => "firstFieldText" %> { form.label :password, "New Password:", :class => "firstFieldText" }
<%= form.password_field :password, :autocomplete => :off%> { form.password_field :password, :autocomplete => :off}
</div> </div>
<div> <div>
<%= form.label :password_confirmation, "Confirm New Password:", :class => "firstFieldText" %> { form.label :password_confirmation, "Confirm New Password:", :class => "firstFieldText" }
<%= form.password_field :password_confirmation, :autocomplete => :off%> { form.password_field :password_confirmation, :autocomplete => :off}
</div> </div>
<div class="noChangePass" onclick="Metamaps.Account.hidePass()">Oops, don't change password</div> <div class="noChangePass" onclick="Metamaps.Account.hidePass()">Oops, don't change password</div>
</div> </div>
<div id="accountPageLoading"></div> <div id="accountPageLoading"></div>
<%= form.submit "Update", class: "update", onclick: "Metamaps.Account.showLoading()" %> { form.submit "Update", class: "update", onclick: "Metamaps.Account.showLoading()" }
<div class="clearfloat"></div> <div class="clearfloat"></div>
<% end %> { end }
</div> </div>

View file

@ -1,5 +1,5 @@
<p>Welcome <%= @email %>!</p> <p>Welcome { @email }!</p>
<p>You can confirm your account email through the link below:</p> <p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p> <p>{ link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) }</p>

View file

@ -1,4 +1,4 @@
<p>Hey there Metamapper with email <%= @resource.email %>!</p> <p>Hey there Metamapper with email { @resource.email }!</p>
<p>Please create a new password. Your password needs to contain a capital letter, a number, an emoji, 7 elements from the Periodic Table, and a plot containing a protagonist with some character development and a surprise twist ending.</p> <p>Please create a new password. Your password needs to contain a capital letter, a number, an emoji, 7 elements from the Periodic Table, and a plot containing a protagonist with some character development and a surprise twist ending.</p>
@ -6,6 +6,6 @@
<p>Change your password using the link below.</p> <p>Change your password using the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p> <p>{ link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) }</p>
<p>If you didn't request this, click your heels three times and pretend nothing ever happened.</p> <p>If you didn't request this, click your heels three times and pretend nothing ever happened.</p>

View file

@ -1,7 +1,7 @@
<p>Hello <%= @resource.email %>!</p> <p>Hello { @resource.email }!</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
<p>Click the link below to unlock your account:</p> <p>Click the link below to unlock your account:</p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p> <p>{ link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) }</p>

View file

@ -1,20 +1,20 @@
<% content_for :title, "Change Password | Metamaps" %> { content_for :title, "Change Password | Metamaps" }
<% content_for :mobile_title, "Change Password" %> { content_for :mobile_title, "Change Password" }
<div id="yield"> <div id="yield">
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "forgotPassword centerGreyForm forgotPasswordReset" }) do |f| %> { form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "forgotPassword centerGreyForm forgotPasswordReset" }) do |f| }
<%= f.hidden_field :reset_password_token %> { f.hidden_field :reset_password_token }
<h3>Change password</h3> <h3>Change password</h3>
<div><%= f.label :password, "New password", :class => "firstFieldText" %> <div>{ f.label :password, "New password", :class => "firstFieldText" }
<%= f.password_field :password, :autofocus => true %></div> { f.password_field :password, :autofocus => true }</div>
<div><%= f.label :password_confirmation, "Confirm new password", :class => "firstFieldText" %> <div>{ f.label :password_confirmation, "Confirm new password", :class => "firstFieldText" }
<%= f.password_field :password_confirmation %></div> { f.password_field :password_confirmation }</div>
<div><%= f.submit "Change my password" %></div> <div>{ f.submit "Change my password" }</div>
<% end %> { end }
</div> </div>

View file

@ -1,17 +1,17 @@
<% content_for :title, "Password Reset | Metamaps" %> { content_for :title, "Password Reset | Metamaps" }
<% content_for :mobile_title, "Password Reset" %> { content_for :mobile_title, "Password Reset" }
<div id="yield"> <div id="yield">
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => "forgotPassword centerGreyForm" }) do |f| %> { form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => "forgotPassword centerGreyForm" }) do |f| }
<h3>FORGOT PASSWORD?</h3> <h3>FORGOT PASSWORD?</h3>
<div><%= f.label :email, "Enter your email:", :class => "firstFieldText" %> <div>{ f.label :email, "Enter your email:", :class => "firstFieldText" }
<%= f.email_field :email, :autofocus => true %></div> { f.email_field :email, :autofocus => true }</div>
<div><%= f.submit "Send Password Reset Instructions" %></div> <div>{ f.submit "Send Password Reset Instructions" }</div>
<% end %> { end }
</div> </div>

View file

@ -1,29 +1,29 @@
<h2>Edit <%= resource_name.to_s.humanize %></h2> <h2>Edit { resource_name.to_s.humanize }</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> { form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| }
<%= devise_error_messages! %> { devise_error_messages! }
<div><%= f.label :email %><br /> <div>{ f.label :email }<br />
<%= f.email_field :email, :autofocus => true %></div> { f.email_field :email, :autofocus => true }</div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> { if devise_mapping.confirmable? && resource.pending_reconfirmation? }
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> <div>Currently waiting confirmation for: { resource.unconfirmed_email }</div>
<% end %> { end }
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> <div>{ f.label :password } <i>(leave blank if you don't want to change it)</i><br />
<%= f.password_field :password, :autocomplete => "off" %></div> { f.password_field :password, :autocomplete => "off" }</div>
<div><%= f.label :password_confirmation %><br /> <div>{ f.label :password_confirmation }<br />
<%= f.password_field :password_confirmation %></div> { f.password_field :password_confirmation }</div>
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> <div>{ f.label :current_password } <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password %></div> { f.password_field :current_password }</div>
<div><%= f.submit "Update" %></div> <div>{ f.submit "Update" }</div>
<% end %> { end }
<h3>Cancel my account</h3> <h3>Cancel my account</h3>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p> <p>Unhappy? { button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete }.</p>
<%= link_to "Back", :back %> { link_to "Back", :back }

View file

@ -1,29 +1,29 @@
<% content_for :title, "Sign Up | Metamaps" %> { content_for :title, "Sign Up | Metamaps" }
<% content_for :mobile_title, "Join" %> { content_for :mobile_title, "Join" }
<div id="yield"> <div id="yield">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :post, :class => "new_user centerGreyForm" }) do |f| %> { form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :post, :class => "new_user centerGreyForm" }) do |f| }
<h3>Sign Up</h3> <h3>Sign Up</h3>
<div><%= f.label :name, "Name:", :class => "firstFieldText" %> <div>{ f.label :name, "Name:", :class => "firstFieldText" }
<%= f.text_field :name, :autofocus => true %></div> { f.text_field :name, :autofocus => true }</div>
<div><%= f.label :email, "Email:", :class => "fieldText" %> <div>{ f.label :email, "Email:", :class => "fieldText" }
<%= f.email_field :email %></div> { f.email_field :email }</div>
<div><%= f.label :password, "Password:", :class => "fieldText" %> <div>{ f.label :password, "Password:", :class => "fieldText" }
<%= f.password_field :password %></div> { f.password_field :password }</div>
<div><%= f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" %> <div>{ f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" }
<%= f.password_field :password_confirmation %></div> { f.password_field :password_confirmation }</div>
<div><%= f.label "Access Code:", :class => "fieldText" %> <div>{ f.label "Access Code:", :class => "fieldText" }
<%= f.text_field :joinedwithcode, :value => params[:code] %></div> { f.text_field :joinedwithcode, :value => params[:code] }</div>
<div><%= f.submit "Sign up!" %></div> <div>{ f.submit "Sign up!" }</div>
<div class = "smallText"><br />Don't have an access code?<br /><a href="/request">Request an Invite</a></div> <div class = "smallText"><br />Don't have an access code?<br /><a href="/request">Request an Invite</a></div>
<% end %> { end }
</div> </div>

View file

@ -1,32 +1,32 @@
<% content_for :title, "Sign In | Metamaps" %> { content_for :title, "Sign In | Metamaps" }
<% content_for :mobile_title, "Login" %> { content_for :mobile_title, "Login" }
<div id="yield"> <div id="yield">
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :method => :post, :class => "centerGreyForm login" }) do |f| %> { form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :method => :post, :class => "centerGreyForm login" }) do |f| }
<h3>SIGN IN</h3> <h3>SIGN IN</h3>
<div class="accountImage"></div> <div class="accountImage"></div>
<div> <div>
<%= f.email_field :email, :autofocus => true, :placeholder => "Email" %></div> { f.email_field :email, :autofocus => true, :placeholder => "Email" }</div>
<div> <div>
<%= f.password_field :password, :placeholder => "Password" %></div> { f.password_field :password, :placeholder => "Password" }</div>
<div class="accountSubmit"><%= f.submit "Sign in" %></div> <div class="accountSubmit">{ f.submit "Sign in" }</div>
<% if devise_mapping.rememberable? -%> { if devise_mapping.rememberable? -}
<div class="accountRememberMe"> <div class="accountRememberMe">
<%= f.label :remember_me, "Stay signed in" %> { f.label :remember_me, "Stay signed in" }
<%= f.check_box :remember_me %> { f.check_box :remember_me }
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
<% end -%> { end -}
<div class="clearfloat"></div> <div class="clearfloat"></div>
<div class="accountForgotPass"> <div class="accountForgotPass">
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> {- if devise_mapping.recoverable? && controller_name != 'passwords' }
<%= link_to "Forgot password?", new_password_path(resource_name) %> { link_to "Forgot password?", new_password_path(resource_name) }
<% end -%> { end -}
</div> </div>
<% end %> { end }
</div> </div>

View file

@ -1,25 +1,25 @@
<%- if controller_name != 'sessions' %> {- if controller_name != 'sessions' }
<%= link_to "Sign in", new_session_path(resource_name) %><br /> { link_to "Sign in", new_session_path(resource_name) }<br />
<% end -%> { end -}
<%- if devise_mapping.registerable? && controller_name != 'registrations' %> {- if devise_mapping.registerable? && controller_name != 'registrations' }
<%= link_to "Sign up", new_user_path(resource_name) %><br /> { link_to "Sign up", new_user_path(resource_name) }<br />
<% end -%> { end -}
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> {- if devise_mapping.recoverable? && controller_name != 'passwords' }
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> { link_to "Forgot your password?", new_password_path(resource_name) }<br />
<% end -%> { end -}
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> {- if devise_mapping.confirmable? && controller_name != 'confirmations' }
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> { link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) }<br />
<% end -%> { end -}
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> {- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' }
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br /> { link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) }<br />
<% end -%> { end -}
<%- if devise_mapping.omniauthable? %> {- if devise_mapping.omniauthable? }
<%- resource_class.omniauth_providers.each do |provider| %> {- resource_class.omniauth_providers.each do |provider| }
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br /> { link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) }<br />
<% end -%> { end -}
<% end -%> { end -}

View file

@ -1,12 +1,12 @@
<h2>Resend unlock instructions</h2> <h2>Resend unlock instructions</h2>
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> { form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| }
<%= devise_error_messages! %> { devise_error_messages! }
<div><%= f.label :email %><br /> <div>{ f.label :email }<br />
<%= f.email_field :email, :autofocus => true %></div> { f.email_field :email, :autofocus => true }</div>
<div><%= f.submit "Resend unlock instructions" %></div> <div>{ f.submit "Resend unlock instructions" }</div>
<% end %> { end }
<%= render "devise/shared/links" %> { render "devise/shared/links" }