diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js b/app/assets/javascripts/src/Metamaps.GlobalUI.js index 055ec38d..66850cc5 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js @@ -55,6 +55,9 @@ $(document).ready(function () { } } + if (Metamaps.Active.Mapper) { + Metamaps.GlobalUI.Search.authInit(); + } }); Metamaps.GlobalUI = { @@ -63,9 +66,11 @@ Metamaps.GlobalUI = { init: function () { var self = Metamaps.GlobalUI; - self.Search.init(); - self.CreateMap.init(); - self.Account.init(); + if (Metamaps.Active.Mapper) { + self.Search.init(); + self.CreateMap.init(); + self.Account.init(); + } //bind lightbox clicks $('.openLightbox').click(function (event) { diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index c6002195..75f071ac 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -71,7 +71,7 @@ body, height: 100%; } .homePage .famousYield { - background: url(homepage-bg.png) no-repeat -515px -40px; + } .wrapper.mapPage { overflow: hidden; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bd95bd64..bcaa16d4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,7 @@ class ApplicationController < ActionController::Base protect_from_forgery + + before_filter :require_user # this is for global login include ContentHelper @@ -32,9 +34,10 @@ private def require_user unless authenticated? - flash[:warning] = "You must be logged in." - store_location and redirect_to new_user_session_path - return false + unless request.env["REQUEST_URI"] == root_url + store_location_for(:user, request.env["PATH_INFO"]) and redirect_to root_url + return false + end end end diff --git a/app/controllers/mappings_controller.rb b/app/controllers/mappings_controller.rb index b28c7638..315cfc8f 100644 --- a/app/controllers/mappings_controller.rb +++ b/app/controllers/mappings_controller.rb @@ -1,7 +1,5 @@ class MappingsController < ApplicationController - - before_filter :require_user, only: [:create, :update, :destroy] - + respond_to :json # GET /mappings/1.json diff --git a/app/controllers/maps_controller.rb b/app/controllers/maps_controller.rb index 72d81656..17c6c71f 100644 --- a/app/controllers/maps_controller.rb +++ b/app/controllers/maps_controller.rb @@ -1,7 +1,5 @@ class MapsController < ApplicationController - before_filter :require_user, only: [:create, :update, :destroy] - respond_to :html, :json autocomplete :map, :name, :full => true, :extra_data => [:user_id] diff --git a/app/controllers/synapses_controller.rb b/app/controllers/synapses_controller.rb index c048627c..45fc4eda 100644 --- a/app/controllers/synapses_controller.rb +++ b/app/controllers/synapses_controller.rb @@ -1,7 +1,5 @@ class SynapsesController < ApplicationController include TopicsHelper - - before_filter :require_user, only: [:create, :update, :destroy] respond_to :json diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index c2690756..388322cf 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -1,8 +1,6 @@ class TopicsController < ApplicationController include TopicsHelper - before_filter :require_user, only: [:create, :update, :destroy] - respond_to :html, :js, :json # GET /topics/autocomplete_topic diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 26085e6b..f4ae90c9 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,6 +1,4 @@ class UsersController < ApplicationController - - before_filter :require_user, only: [:edit, :update, :updatemetacodes] respond_to :html, :json diff --git a/app/views/layouts/_account.html.erb b/app/views/layouts/_account.html.erb index ffe69b7e..e1e73cd6 100644 --- a/app/views/layouts/_account.html.erb +++ b/app/views/layouts/_account.html.erb @@ -3,7 +3,6 @@ # The inner HTML of the account box that comes up in the bottom left #%> -<% if authenticated? %> <% account = current_user %> <%= image_tag user.image.url(:thumb), :size => "48x48", :class => "sidebarAccountImage" %>

<%= account.name.split[0...1][0] %>

@@ -18,40 +17,8 @@ <%= link_to "Admin", metacodes_path, :data => { :bypass => 'true'} %> <% end %> -
  • -
    - Share Invite -
  • <%= link_to "Sign Out", "/logout", id: "Logout", :data => { :bypass => 'true'} %>
  • - -<% else %> - <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { class: "loginAnywhere" }) do |f| %> -
    -
    - <%= f.email_field :email, :placeholder => "Email" %> -
    -
    - <%= f.password_field :password, :placeholder => "Password" %> -
    -
    <%= f.submit "SIGN IN" %>
    - <% if devise_mapping.rememberable? -%> -
    - <%= f.label :remember_me, "Stay signed in" %> - <%= f.check_box :remember_me %> -
    -
    - <% end -%> -
    -
    - <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> - <%= link_to "Forgot password?", new_password_path(resource_name), - :data => { :bypass => 'true'} %> - <% end -%> -
    - <% end %> -<% end %> - -<% # Rails.logger.info(stored_location_for(:user)) %> + \ No newline at end of file diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 9ace06a0..de7de582 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -154,44 +154,6 @@

    While it's downloading, explore our blog,
    watch the tutorials, or visit our knowledge base! - - -

    -

    GET INVOLVED!

    -
    - -

    Want to help us with design, code, marketing and management for Metamaps? We are an open value network, which for us means that we want to invite and empower peers to participate in creating value together.

    - -

    We welcome contributions in many forms. One of the easiest and best things you can do is to keep on mapping your ideas into the commons on the platform!

    - -

    We welcome people of all skillsets to contribute to the project in different ways. Designers, researchers, academics, strategists, and facilitators can get in touch about opportunities to contribute to the project. If you're a developer, help us advance the code and take a look around our Github.

    - -

    Financial contributions are greatly appreciated in support of our work. All financial contributions are transparently governed and recorded in our value accounting system.

    - -
    -
    - -
    -
    - - -
    -
    -

    Please Donate To Bitcoin Address: [[address]]

    -

    -
    -
    - Donation of [[value]] BTC Received. Thank You. -
    -
    - [[error]] -
    -
    - -
    -

    Tutorial

    @@ -203,20 +165,6 @@
    <% if authenticated? %> -
    -

    SHARE INVITE

    - -
    -

    The Metamaps platform is currently in an invite-only beta with the express purpose of creating a high value knowledge ecosystem, as well as building a community of contributors. As a valued beta tester, you have the ability to invite your peers, colleagues and collaborators onto the platform.

    -

    Copy and send the link + access code below. The access code below is your personal code and can be used multiple times.

    -
    -

    HTTP://METAMAPS.CC/JOIN

    - <% mapper = current_user %> -

    ACCESS CODE: <%= mapper.code %>

    -
    - -
    - <% # this is the create new map form %>
    <%= render :partial => 'layouts/newmap' %> diff --git a/app/views/layouts/_upperelements.html.erb b/app/views/layouts/_upperelements.html.erb index 07aea898..f2bbd85f 100644 --- a/app/views/layouts/_upperelements.html.erb +++ b/app/views/layouts/_upperelements.html.erb @@ -4,7 +4,7 @@
    @@ -19,7 +19,6 @@
    - <% if authenticated? %>
    @@ -39,7 +38,6 @@
    - <% end %>
    @@ -49,37 +47,27 @@
    - <% if authenticated? %>
    - <% end %>
    - <% if authenticated? %>
    - <% end %> - <% if !(controller_name == "sessions" && action_name == "new") %>
    - <% if user && user.image %> <%= image_tag user.image.url(:thumb), :size => "32x32" %> - <% elsif !authenticated? %> - SIGN IN -
    - <% end %>
    <%= render :partial => 'layouts/account' %>
    - <% end %> +
    \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 87f8829d..97da10cd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -51,19 +51,21 @@
    + <% if authenticated? %> <%= render :partial => 'layouts/upperelements' %> + <% end %> <%= yield %> -
    <% if authenticated? %> - <% # for creating and pulling in topics and synapses %> - <%= render :partial => 'maps/newtopic' %> - <%= render :partial => 'maps/newsynapse' %> - <% # for populating the change metacode list on the topic card %> - <%= render :partial => 'shared/metacodeoptions' %> +
    + <% # for creating and pulling in topics and synapses %> + <%= render :partial => 'maps/newtopic' %> + <%= render :partial => 'maps/newsynapse' %> + <% # for populating the change metacode list on the topic card %> + <%= render :partial => 'shared/metacodeoptions' %> + <%= render :partial => 'layouts/lowermapelements' %> <% end %> - <%= render :partial => 'layouts/lowermapelements' %>
    diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index 71dd5e5b..62affb41 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -8,22 +8,33 @@ <% content_for :title, "Home | Metamaps" %>
    -
    EXPERIENCE METAMAPS
    -
    - metamaps.cc is a free and open source platform. It enables individuals, communities, and organizations to build and visualize their shared knowledge and unlock their collective intelligence... -
    - - +
    THE VALUE WEB
    + + <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { class: "loginAnywhere" }) do |f| %> +
    + <%= f.email_field :email, :placeholder => "Email" %> +
    +
    + <%= f.password_field :password, :placeholder => "Password" %> +
    +
    <%= f.submit "SIGN IN" %>
    + <% if devise_mapping.rememberable? -%> +
    + <%= f.label :remember_me, "Stay signed in" %> + <%= f.check_box :remember_me %> +
    +
    + <% end -%> +
    +
    + <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> + <%= link_to "Forgot password?", new_password_path(resource_name), + :data => { :bypass => 'true'} %> + <% end -%> +
    + <% end %>
    -
    -
    - -
    +