remove request page and config for UTS

This commit is contained in:
Connor Turland 2017-10-15 22:23:16 -04:00
parent e824dbb8f2
commit 1b7acd72e1
10 changed files with 39 additions and 39 deletions

View file

@ -222,7 +222,6 @@ button.button.btn-no:hover {
}
.new_user{
height: 412px;
margin-left:-166px;
box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.23), 0px 3px 3px rgba(0, 0, 0, 0.16);
font-family: din-medium;

View file

@ -329,15 +329,18 @@ body.unauthenticated.action-home {
color: #dab539;
}
.ctaContainer {
margin: 0 auto;
}
.requestInviteCTA {
display: block;
display: inline-block;
width: 220px;
font-size: 20px;
padding: 16px 0;
text-align: center;
border-radius: 3px;
border: 2px solid #a354cd;
margin: 12px auto;
margin: 12px 12px;
color: #a354cd;
font-family: 'noto-sans-bold', sans-serif;
}

View file

@ -17,8 +17,6 @@ class User < ApplicationRecord
has_many :following, class_name: 'Follow'
after_create :generate_code
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
serialize :settings, UserPreference
@ -36,8 +34,6 @@ class User < ApplicationRecord
validates :name, uniqueness: true # done by devise
validates :email, uniqueness: true # done by devise
validates :joinedwithcode, presence: true, inclusion: { in: $codes, message: '%{value} is not valid' }, on: :create
# This method associates the attribute ":image" with a file attachment
has_attached_file :image, styles: {
thirtytwo: ['32x32#', :png],

View file

@ -8,18 +8,23 @@
<% content_for :title, "Home | Metamaps" %>
<% content_for :mobile_title, "Home" %>
<div class="home">
<div class="homeLogo">METAMAPS</div>
<div id="particles-bg"></div>
<div class="homeWrapper homeText">
<div class="homeTitle">Make sense, together.</div>
<div class="homeIntro">
<div>Untangle complex conversations, expand perspectives, and gain insights
about what matter to you and your communities.
about the things that matter to you.
</div>
<div>Metamaps enables individual and collaborative sensemaking through
<span class="purple">concept mapping</span>, <span class="green">live video + text chat</span>, and a <span class="yellow">shared knowledge graph</span>.
</div>
<a href="/request" class="requestInviteCTA">REQUEST INVITE</a>
<div>The University of Technology Sydney is using Metamaps
to share knowledge, and think better together.
</div>
<div>
<a href="/join" class="requestInviteCTA">SIGN UP</a>
<a href="/login" class="requestInviteCTA">LOG IN</a>
</div>
</div>
</div>
</div><!-- end yield -->

View file

@ -1,10 +0,0 @@
<%#
# @file
# Located at /request
# Shows a form where people can request an invite
#%>
<% content_for :title, "Request Invite | Metamaps" %>
<% content_for :mobile_title, "Request Invite" %>
<div class="requestInviteHeader"></div>
<iframe class="requestInvite" src="https://docs.google.com/forms/d/1lWoKPFHErsDfV5l7-SvcHxwX3vDi9nNNVW0rFMgJwgg/viewform?embedded=true" width="700" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>

View file

@ -3,12 +3,14 @@
<div id="yield">
<%= 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 class="fieldText">Only email addresses at the uts.edu.au domain name will be able to register.</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>
@ -17,13 +19,7 @@
<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.submit "Sign up!" %></div>
<div class = "smallText"><br />Don't have an access code?<br /><a href="/request">Request an Invite</a></div>
<div><%= f.submit "Sign up" %></div>
<% end %>
</div>

View file

@ -4,7 +4,6 @@ Metamaps::Application.routes.draw do
mount ActionCable.server => '/cable'
root to: 'main#home', via: :get
get 'request', to: 'main#requestinvite', as: :request
namespace :explore do
get 'active'

View file

@ -12,19 +12,25 @@ class UpperLeftUI extends Component {
onRequestClick: PropTypes.func
}
static contextTypes = {
location: PropTypes.object
}
render () {
const { map, currentUser, userRequested, requestAnswered, requestApproved, onRequestClick } = this.props
const { pathname } = this.context.location
const unauthedHome = pathname === '/' && !currentUser
return <div className="upperLeftUI">
<div className="homeButton">
{currentUser && <Link to="/">METAMAPS</Link>}
{!currentUser && <a href="/">METAMAPS</a>}
</div>
<div className="sidebarSearch">
{!unauthedHome && <div className="sidebarSearch">
<input type="text" className="sidebarSearchField" placeholder="Search for topics, maps, and mappers..." />
<div id="searchLoading"></div>
<div className="sidebarSearchIcon"></div>
<div className="clearfloat"></div>
</div>
</div>}
{map && !map.authorizeToEdit(currentUser) && <div className="viewOnly">
<div className="eyeball">View Only</div>
{currentUser && !userRequested && <div className="requestAccess requestNotice" onClick={onRequestClick}>Request Access</div>}

View file

@ -18,6 +18,10 @@ class UpperRightUI extends Component {
openInviteLightbox: PropTypes.func
}
static contextTypes = {
location: PropTypes.object
}
constructor(props) {
super(props)
this.state = {
@ -52,6 +56,8 @@ class UpperRightUI extends Component {
notifications, fetchNotifications, openInviteLightbox,
markAsRead, markAsUnread } = this.props
const { accountBoxOpen, notificationsBoxOpen } = this.state
const { pathname } = this.context.location
const unauthedHome = pathname === '/' && !currentUser
return <div className="upperRightUI">
{currentUser && <a href="/maps/new" target="_blank" className="addMap upperRightEl upperRightIcon">
<div className="tooltipsUnder">
@ -69,7 +75,7 @@ class UpperRightUI extends Component {
markAsUnread={markAsUnread}
toggleNotificationsBox={this.toggleNotificationsBox}/>}
</span>}
{!signInPage && <div className="sidebarAccount upperRightEl">
{!signInPage && !unauthedHome && <div className="sidebarAccount upperRightEl">
<div className="sidebarAccountIcon ignore-react-onclickoutside" onClick={this.toggleAccountBox}>
<div className="tooltipsUnder">Account</div>
{currentUser && <img src={currentUser.get('image')} />}

View file

@ -76,12 +76,12 @@ class App extends Component {
mobileTitleWidth={mobileTitleWidth}
onTitleClick={mobileTitleClick}
serverData={serverData} />}
{!unauthedHome && <UpperLeftUI currentUser={currentUser}
map={map}
userRequested={userRequested}
requestAnswered={requestAnswered}
requestApproved={requestApproved}
onRequestClick={onRequestAccess} />}
<UpperLeftUI currentUser={currentUser}
map={map}
userRequested={userRequested}
requestAnswered={requestAnswered}
requestApproved={requestApproved}
onRequestClick={onRequestAccess} />
{!mobile && <UpperRightUI currentUser={currentUser}
unreadNotificationsCount={unreadNotificationsCount}
notifications={notifications}