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,
name: 'Connor',
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' %>
<%= form_tag oauth_application_path(application) do %>
{- submit_btn_css ||= 'button red-button' }
{ form_tag oauth_application_path(application) do }
<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 %>
<% end %>
{ submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css }
{ end }

View file

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

View file

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

View file

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

View file

@ -1,11 +1,11 @@
<div id="yield">
<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">
<h2><%= t('.title') %></h2>
<h2>{ t('.title') }</h2>
</div>
<%= render 'form', application: @application %>
{ render 'form', application: @application }
</div>
</div>
<%= render 'script' %>
{ render 'script' }

View file

@ -1,37 +1,37 @@
<div id="yield">
<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">
<h2><%= t('.title', name: @application.name) %></h2>
<h2>{ t('.title', name: @application.name) }</h2>
</div>
<h4><%= t('.application_id') %>:</h4>
<p><code id="application_id"><%= @application.uid %></code></p>
<h4>{ t('.application_id') }:</h4>
<p><code id="application_id">{ @application.uid }</code></p>
<h4><%= t('.secret') %>:</h4>
<p><code id="secret"><%= @application.secret %></code></p>
<h4>{ t('.secret') }:</h4>
<p><code id="secret">{ @application.secret }</code></p>
<h4><%= t('.callback_urls') %>:</h4>
<h4>{ t('.callback_urls') }:</h4>
<table>
<% @application.redirect_uri.split.each do |uri| %>
{ @application.redirect_uri.split.each do |uri| }
<tr>
<td>
<code><%= uri %></code>
<code>{ uri }</code>
</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>
</tr>
<% end %>
{ end }
</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>
<%= render 'script' %>
{ render 'script' }

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
<%- submit_btn_css ||= 'button red-button' %>
<%= form_tag oauth_authorized_application_path(application) do %>
{- submit_btn_css ||= 'button red-button' }
{ form_tag oauth_authorized_application_path(application) do }
<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 %>
<% end %>
{ submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css }
{ end }

View file

@ -1,7 +1,7 @@
<div id="yield">
<div class="centerContent">
<header class="page-header">
<h2><%= t('doorkeeper.authorized_applications.index.title') %></h2>
<h2>{ t('doorkeeper.authorized_applications.index.title') }</h2>
</header>
<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 />
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 />
<% if @applications.count > 0 %>
{ if @applications.count > 0 }
<table class="table table-striped">
<thead>
<tr>
<th><%= t('doorkeeper.authorized_applications.index.application') %></th>
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th>
<th>{ t('doorkeeper.authorized_applications.index.application') }</th>
<th>{ t('doorkeeper.authorized_applications.index.created_at') }</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @applications.each do |application| %>
{ @applications.each do |application| }
<tr>
<td><%= application.name %></td>
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td>
<td><%= render 'delete_form', application: application %></td>
<td>{ application.name }</td>
<td>{ application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) }</td>
<td>{ render 'delete_form', application: application }</td>
</tr>
<% end %>
{ end }
</tbody>
</table>
<% end %>
{ end }
</main>
</div>
</div>
<%= render 'script' %>
{ render 'script' }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
<%#
{#
# @file
# Google analytics, rendered on every page
#%>
#}
<script>
(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)
})(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>

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
<html>
<body>
<%= yield %>
{ yield }
</body>
</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.text_field :desc, :placeholder => "describe the connection..." %>
<% end %>
{ form_for Synapse.new, url: synapses_url, remote: true do |form| }
{ form.text_field :desc, :placeholder => "describe the connection..." }
{ 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="tooltipsAbove">Switch Metacodes</div>
</div>
@ -11,22 +11,22 @@
</div>
<div id="metacodeImg">
<% @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 %>" />
<% end %>
{ @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 }" />
{ end }
</div>
<%= form.text_field :name, :maxlength => 140, :placeholder => "title..." %>
{ form.text_field :name, :maxlength => 140, :placeholder => "title..." }
<div id="metacodeImgTitle"></div>
<div class="clearfloat"></div>
<script>
<% @metacodes.each do |metacode| %>
Metamaps.Create.selectedMetacodes.push("<%= metacode.id %>");
Metamaps.Create.newSelectedMetacodes.push("<%= metacode.id %>");
Metamaps.Create.selectedMetacodeNames.push("<%= metacode.name %>");
Metamaps.Create.newSelectedMetacodeNames.push("<%= metacode.name %>");
<% end %>
{ @metacodes.each do |metacode| }
Metamaps.Create.selectedMetacodes.push("{ metacode.id }");
Metamaps.Create.newSelectedMetacodes.push("{ metacode.id }");
Metamaps.Create.selectedMetacodeNames.push("{ metacode.name }");
Metamaps.Create.newSelectedMetacodeNames.push("{ metacode.name }");
{ end }
</script>
<% end %>
{ end }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,52 +1,52 @@
<% content_for :title, 'Notifications | Metamaps' %>
<% content_for :mobile_title, 'Notifications' %>
{ content_for :title, 'Notifications | Metamaps' }
{ content_for :mobile_title, 'Notifications' }
<div id="yield">
<div class="centerContent withPadding back">
<%= link_to 'Back to notifications', notifications_path %>
{ link_to 'Back to notifications', notifications_path }
</div>
<div class="centerContent notificationPage">
<h2 class="notification-title">
<% case @notification.notification_code
{ case @notification.notification_code
when MAP_ACCESS_REQUEST
request = @notification.notified_object
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>
<% else %>
<%= @notification.subject %>
<% end %>
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>
{ else }
{ @notification.subject }
{ end }
</h2>
<% case @notification.notification_code
when MAP_ACCESS_REQUEST %>
{ case @notification.notification_code
when MAP_ACCESS_REQUEST }
<div class="notification-body">
<p class="main-text">
<% if false && request.answered %>
<% if request.approved %>
{ if false && request.answered }
{ if request.approved }
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
them access by going to the map and adding them as a collaborator.
<% end %>
<% else %>
<%= 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 'Decline', deny_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button decline' %>
{ end }
{ else }
{ 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 'Decline', deny_access_post_map_path(id: map.id, request_id: request.id), remote: true, method: :post, class: 'button decline' }
<script>
$(document).ready(function() {
$('.notification-body .button').click(function() {
$(this).html('<img src="<%= asset_path('ellipsis.gif') %>" />')
$(this).html('<img src="{ asset_path('ellipsis.gif') }" />')
})
})
</script>
<% end %>
{ end }
</p>
<%= link_to 'Go to map', map_url(map) %>
&nbsp;&nbsp;<%= link_to 'View mapper profile', explore_path(id: request.user.id) %>
{ link_to 'Go to map', map_url(map) }
&nbsp;&nbsp;{ link_to 'View mapper profile', explore_path(id: request.user.id) }
</div>
<% else %>
{ else }
<div class="notification-body">
<%= raw @notification.body %>
{ raw @notification.body }
</div>
<% end %>
{ end }
</div>
</div>

View file

@ -1,7 +1,7 @@
<%#
{#
# @file
# The inner HTML of the cheatsheet
#%>
#}
<h3>HELP</h3>
@ -26,7 +26,7 @@
</ul>
<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">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>
@ -64,7 +64,7 @@
<span class="csTitle">Change Topic permission:</span> Click on 'Permission' icon (only for topic creator)
</div>
<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 class="csItem indented">
<span class="csTitle">Close Topic card:</span> Click on canvas

View file

@ -1,21 +1,21 @@
<%#
{#
# @file
# Partial view, renders a form that creates a new map.
#%>
#}
<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>
<div class="inputGroup">
<label for="map_name">Name: </label>
<%= form.text_field :name, :maxlength => 140 %>
{ form.text_field :name, :maxlength => 140 }
<div class="clearfloat"></div>
</div>
<div class="inputGroup">
<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>
@ -58,5 +58,5 @@
<button class="button submitMap">Create!</button>
</div>
<div class="clearfloat"></div>
<% end %>
{ end }
</div>

View file

@ -1,3 +1,3 @@
<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>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,17 +1,17 @@
<%#
{#
# @file
# /users/:id/edit
# User edit form
#%>
#}
<% content_for :title, @user.name + "'s Settings | Metamaps" %>
<% content_for :mobile_title, "Account Settings" %>
{ content_for :title, @user.name + "'s Settings | Metamaps" }
{ content_for :mobile_title, "Account Settings" }
<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>
<div class="userImage">
<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>
<div class="userImageMenu">
@ -19,9 +19,9 @@
<ul>
<li class="upload">
Upload Photo
<%= hidden_field_tag "remove_image", "0" %>
<%= form.file_field :image %>
<%= form.label :image %>
{ hidden_field_tag "remove_image", "0" }
{ form.file_field :image }
{ form.label :image }
</li>
<li class="remove" onclick="Metamaps.Account.removePicture()">Remove</li>
<li class="cancel" onclick="Metamaps.Account.closeChangePicture()">Cancel</li>
@ -30,58 +30,58 @@
</div>
<div class="accountName" onclick="Metamaps.Account.changeName()">
<div class="nameEdit"><%= @user.name %></div>
<div class="nameEdit">{ @user.name }</div>
</div>
<div class="changeName">
<%= form.label :name, "Name:", class: 'firstFieldText' %>
<%= form.text_field :name %>
{ form.label :name, "Name:", class: 'firstFieldText' }
{ form.text_field :name }
</div>
<div>
<%= form.label :email, "Email:", class: 'firstFieldText' %>
<%= form.email_field :email %>
{ form.label :email, "Email:", class: 'firstFieldText' }
{ form.email_field :email }
</div>
<div>
<%= form.label :emails_allowed, class: 'firstFieldText' do %>
<%= form.check_box :emails_allowed, class: 'inline' %>
{ form.label :emails_allowed, class: 'firstFieldText' do }
{ form.check_box :emails_allowed, class: 'inline' }
Send Metamaps notifications to my email.
<% end %>
<%= fields_for :settings, @user.settings do |settings| %>
<%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %>
<%= settings.check_box :follow_topic_on_created, class: 'inline' %>
{ end }
{ fields_for :settings, @user.settings do |settings| }
{ settings.label :follow_topic_on_created, class: 'firstFieldText' do }
{ settings.check_box :follow_topic_on_created, class: 'inline' }
Auto-follow topics you create.
<% end %>
<%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %>
<%= settings.check_box :follow_topic_on_contributed, class: 'inline' %>
{ end }
{ settings.label :follow_topic_on_contributed, class: 'firstFieldText' do }
{ settings.check_box :follow_topic_on_contributed, class: 'inline' }
Auto-follow topics you edit.
<% end %>
<%= settings.label :follow_map_on_created, class: 'firstFieldText' do %>
<%= settings.check_box :follow_map_on_created, class: 'inline' %>
{ end }
{ settings.label :follow_map_on_created, class: 'firstFieldText' do }
{ settings.check_box :follow_map_on_created, class: 'inline' }
Auto-follow maps you create.
<% end %>
<%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %>
<%= settings.check_box :follow_map_on_contributed, class: 'inline' %>
{ end }
{ settings.label :follow_map_on_contributed, class: 'firstFieldText' do }
{ settings.check_box :follow_map_on_contributed, class: 'inline' }
Auto-follow maps you edit.
<% end %>
<% end %>
{ end }
{ end }
</div>
<div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div>
<div class="toHide">
<div>
<%= form.label :current_password, "Current Password:", :class => "firstFieldText" %>
<%= password_field_tag :current_password, params[:current_password] %>
{ form.label :current_password, "Current Password:", :class => "firstFieldText" }
{ password_field_tag :current_password, params[:current_password] }
</div>
<div>
<%= form.label :password, "New Password:", :class => "firstFieldText" %>
<%= form.password_field :password, :autocomplete => :off%>
{ form.label :password, "New Password:", :class => "firstFieldText" }
{ form.password_field :password, :autocomplete => :off}
</div>
<div>
<%= form.label :password_confirmation, "Confirm New Password:", :class => "firstFieldText" %>
<%= form.password_field :password_confirmation, :autocomplete => :off%>
{ form.label :password_confirmation, "Confirm New Password:", :class => "firstFieldText" }
{ form.password_field :password_confirmation, :autocomplete => :off}
</div>
<div class="noChangePass" onclick="Metamaps.Account.hidePass()">Oops, don't change password</div>
</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>
<% end %>
{ end }
</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><%= 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>
@ -6,6 +6,6 @@
<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>

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>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 :mobile_title, "Change Password" %>
{ content_for :title, "Change Password | Metamaps" }
{ content_for :mobile_title, "Change Password" }
<div id="yield">
<%= 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 %>
{ 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 }
<h3>Change password</h3>
<div><%= f.label :password, "New password", :class => "firstFieldText" %>
<%= f.password_field :password, :autofocus => true %></div>
<div>{ f.label :password, "New password", :class => "firstFieldText" }
{ f.password_field :password, :autofocus => true }</div>
<div><%= f.label :password_confirmation, "Confirm new password", :class => "firstFieldText" %>
<%= f.password_field :password_confirmation %></div>
<div>{ f.label :password_confirmation, "Confirm new password", :class => "firstFieldText" }
{ f.password_field :password_confirmation }</div>
<div><%= f.submit "Change my password" %></div>
<div>{ f.submit "Change my password" }</div>
<% end %>
{ end }
</div>

View file

@ -1,17 +1,17 @@
<% content_for :title, "Password Reset | Metamaps" %>
<% content_for :mobile_title, "Password Reset" %>
{ content_for :title, "Password Reset | Metamaps" }
{ content_for :mobile_title, "Password Reset" }
<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>
<div><%= f.label :email, "Enter your email:", :class => "firstFieldText" %>
<%= f.email_field :email, :autofocus => true %></div>
<div>{ f.label :email, "Enter your email:", :class => "firstFieldText" }
{ 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>

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| %>
<%= devise_error_messages! %>
{ form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| }
{ devise_error_messages! }
<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<div>{ f.label :email }<br />
{ f.email_field :email, :autofocus => true }</div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
{ if devise_mapping.confirmable? && resource.pending_reconfirmation? }
<div>Currently waiting confirmation for: { resource.unconfirmed_email }</div>
{ end }
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
<%= f.password_field :password, :autocomplete => "off" %></div>
<div>{ f.label :password } <i>(leave blank if you don't want to change it)</i><br />
{ f.password_field :password, :autocomplete => "off" }</div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>
<div>{ f.label :password_confirmation }<br />
{ f.password_field :password_confirmation }</div>
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password %></div>
<div>{ f.label :current_password } <i>(we need your current password to confirm your changes)</i><br />
{ f.password_field :current_password }</div>
<div><%= f.submit "Update" %></div>
<% end %>
<div>{ f.submit "Update" }</div>
{ end }
<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 :mobile_title, "Join" %>
{ content_for :title, "Sign Up | Metamaps" }
{ content_for :mobile_title, "Join" }
<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>
<div><%= f.label :name, "Name:", :class => "firstFieldText" %>
<%= f.text_field :name, :autofocus => true %></div>
<div>{ f.label :name, "Name:", :class => "firstFieldText" }
{ f.text_field :name, :autofocus => true }</div>
<div><%= f.label :email, "Email:", :class => "fieldText" %>
<%= f.email_field :email %></div>
<div>{ f.label :email, "Email:", :class => "fieldText" }
{ f.email_field :email }</div>
<div><%= f.label :password, "Password:", :class => "fieldText" %>
<%= f.password_field :password %></div>
<div>{ f.label :password, "Password:", :class => "fieldText" }
{ f.password_field :password }</div>
<div><%= f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" %>
<%= f.password_field :password_confirmation %></div>
<div>{ f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" }
{ f.password_field :password_confirmation }</div>
<div><%= f.label "Access Code:", :class => "fieldText" %>
<%= f.text_field :joinedwithcode, :value => params[:code] %></div>
<div>{ f.label "Access Code:", :class => "fieldText" }
{ 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>
<% end %>
{ end }
</div>

View file

@ -1,32 +1,32 @@
<% content_for :title, "Sign In | Metamaps" %>
<% content_for :mobile_title, "Login" %>
{ content_for :title, "Sign In | Metamaps" }
{ content_for :mobile_title, "Login" }
<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>
<div class="accountImage"></div>
<div>
<%= f.email_field :email, :autofocus => true, :placeholder => "Email" %></div>
{ f.email_field :email, :autofocus => true, :placeholder => "Email" }</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">
<%= f.label :remember_me, "Stay signed in" %>
<%= f.check_box :remember_me %>
{ f.label :remember_me, "Stay signed in" }
{ f.check_box :remember_me }
<div class="clearfloat"></div>
</div>
<% end -%>
{ end -}
<div class="clearfloat"></div>
<div class="accountForgotPass">
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to "Forgot password?", new_password_path(resource_name) %>
<% end -%>
{- if devise_mapping.recoverable? && controller_name != 'passwords' }
{ link_to "Forgot password?", new_password_path(resource_name) }
{ end -}
</div>
<% end %>
{ end }
</div>

View file

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

View file

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