diff --git a/app/assets/stylesheets/apps.css.erb b/app/assets/stylesheets/apps.css.erb index f3f444c7..46fa64b7 100644 --- a/app/assets/stylesheets/apps.css.erb +++ b/app/assets/stylesheets/apps.css.erb @@ -1,8 +1,8 @@ .centerContent { position: relative; - margin: 92px auto 0 auto; - padding: 20px 0 60px 20px; - width: 760px; + margin: 0 auto; + width: auto; + max-width: 960px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24); background: #fff; @@ -10,7 +10,7 @@ -moz-border-radius: 3px; border-radius: 3px; border: 1px solid #dcdcdc; - margin-bottom: 10px; + box-sizing: border-box; padding: 15px; } @@ -130,10 +130,8 @@ border-radius: 2px; } -.back-to-mapping { - margin: 1em auto; - width: auto; - max-width: 960px; - box-sizing: border-box; +.centerContent.withPadding { + margin-top: 1em; + margin-bottom: 1em; } diff --git a/app/assets/stylesheets/clean.css.erb b/app/assets/stylesheets/clean.css.erb index fb55b29f..3970f877 100644 --- a/app/assets/stylesheets/clean.css.erb +++ b/app/assets/stylesheets/clean.css.erb @@ -28,6 +28,8 @@ position: absolute; width: 100%; height: 100%; + box-sizing: border-box; + padding-top: 92px; } /*.animations { diff --git a/app/assets/stylesheets/mobile.scss.erb b/app/assets/stylesheets/mobile.scss.erb index e7eb9a7d..8cdb3ae6 100644 --- a/app/assets/stylesheets/mobile.scss.erb +++ b/app/assets/stylesheets/mobile.scss.erb @@ -2,7 +2,7 @@ display: none; } -@media only screen and (max-width : 720px) and (min-width : 504px) { +@media only screen and (max-width : 752px) and (min-width : 504px) { .sidebarSearch .tt-hint, .sidebarSearch .sidebarSearchField { width: 160px !important; } @@ -57,7 +57,7 @@ } #yield { - height: 100%; + padding-top: 50px; } .new_session, .new_user, .edit_user, .login, .forgotPassword { @@ -66,7 +66,7 @@ left: auto; width: 78%; padding: 16px 10%; - margin: 50px auto 0 auto; + margin: 0 auto; } .centerGreyForm input[type="text"], .centerGreyForm input[type="email"], .centerGreyForm input[type="password"] { diff --git a/app/assets/stylesheets/notifications.scss.erb b/app/assets/stylesheets/notifications.scss.erb index d7942135..d9602804 100644 --- a/app/assets/stylesheets/notifications.scss.erb +++ b/app/assets/stylesheets/notifications.scss.erb @@ -20,16 +20,14 @@ $unread_notifications_dot_size: 8px; list-style: none; } - $menu_bar_height: 6em; .notificationPage, .notificationsPage { - width: auto; - max-width: 960px; - box-sizing: border-box; - margin: 1em auto; - margin-top: 1em + $menu_bar_height; font-family: 'din-regular', Sans-Serif; + & a:hover { + text-decoration: none; + } + & > .notification-title { border-bottom: 1px solid #eee; padding-bottom: 0.25em; @@ -41,34 +39,62 @@ $unread_notifications_dot_size: 8px; } } - - .notificationsPage .notification { - .notification-subject { - width: 25%; - } - .notification-body { - width: 50%; - } - .notification-read-unread { - width: 10%; + .notificationsPage { + header { + margin-bottom: 0; } - .notification-body, - .notification-subject, - .notification-read-unread { - display: inline-block; - vertical-align: top; + .notification:first-child { + border-top: none; + } + .notification:last-child { + border-bottom: 1px solid #DCDCDC; } - &.unread { - .notification-body, - .notification-subject, + .notification { + padding: 10px; + border:1px solid #DCDCDC; + border-bottom: none; + + &:hover { + background: #F6F6F6; + } + + & > a { + float: left; + width: 85%; + box-sizing: border-box; + padding-right: 10px; + } + .notification-read-unread { - font-family: 'din-medium', Sans-Serif; + float: left; + width: 15%; + } + + .notification-body, + .notification-subject { + display: inline-block; + vertical-align: top; + } + + .notification-body { + margin-left: 15px; + } + + &.unread { + .notification-body, + .notification-subject, + .notification-read-unread { + font-family: 'din-medium', Sans-Serif; + } } } + } + + .notificationPage .notification-body { p, div { margin: 1em auto; diff --git a/app/views/doorkeeper/authorized_applications/index.html.erb b/app/views/doorkeeper/authorized_applications/index.html.erb index 42c3127d..948efa30 100644 --- a/app/views/doorkeeper/authorized_applications/index.html.erb +++ b/app/views/doorkeeper/authorized_applications/index.html.erb @@ -33,5 +33,6 @@ <% end %> +<%= render partial: 'shared/back_to_mapping' %> <%= render 'script' %> diff --git a/app/views/layouts/_upperelements.html.erb b/app/views/layouts/_upperelements.html.erb index 1f499615..7ef76bad 100644 --- a/app/views/layouts/_upperelements.html.erb +++ b/app/views/layouts/_upperelements.html.erb @@ -4,7 +4,7 @@
- <%= 'data-router=true' %><% end %>>METAMAPS + <%= 'data-router=true' %><% end %>>METAMAPS
@@ -78,7 +78,7 @@ <%= link_to notifications_path, class: "notificationsIcon upperRightEl upperRightIcon #{user_unread_notification_count > 0 ? 'unread' : 'read'}" do %>
- Notifications (<%= user_unread_notification_count %> unread) + Notifications
<% if user_unread_notification_count > 0 %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d48ec0a1..2dd2a463 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -30,7 +30,7 @@
- <%= render :partial => 'layouts/upperelements', :locals => { :appsPage => false } %> + <%= render :partial => 'layouts/upperelements', :locals => { :noHardHomeLink => controller_name == "notifications" ? true : false } %> <%= yield %> diff --git a/app/views/layouts/doorkeeper.html.erb b/app/views/layouts/doorkeeper.html.erb index a6a74f41..960502d9 100644 --- a/app/views/layouts/doorkeeper.html.erb +++ b/app/views/layouts/doorkeeper.html.erb @@ -22,7 +22,7 @@
- <%= render :partial => 'layouts/upperelements', :locals => {:appsPage => true } %> + <%= render :partial => 'layouts/upperelements', :locals => {:noHardHomeLink => true } %> <%= yield %> @@ -50,7 +50,6 @@ <% end %>

- <%= render partial: 'shared/back_to_mapping' %>
<% end %> diff --git a/app/views/mailboxer/notification_mailer/new_notification_email.html.erb b/app/views/mailboxer/notification_mailer/new_notification_email.html.erb index 87d8da33..7f680869 100644 --- a/app/views/mailboxer/notification_mailer/new_notification_email.html.erb +++ b/app/views/mailboxer/notification_mailer/new_notification_email.html.erb @@ -1,6 +1,10 @@ <% mail = ApplicationMailer.mail_for_notification(@notification) %> -<% if mail %> - <% @notification.update(body: mail.html_part&.body&.decoded) %> - <%= raw mail.html_part&.body&.decoded %> -<% end %> +
+ <% if mail %> + <% @notification.update(body: mail.html_part&.body&.decoded) %> + <%= raw mail.html_part&.body&.decoded %> + <% end %> +

Make sense with Metamaps

+ <%= render partial: 'shared/mailer_unsubscribe_link' %> +
diff --git a/app/views/mailboxer/notification_mailer/new_notification_email.text.erb b/app/views/mailboxer/notification_mailer/new_notification_email.text.erb index 58623b16..a98af833 100644 --- a/app/views/mailboxer/notification_mailer/new_notification_email.text.erb +++ b/app/views/mailboxer/notification_mailer/new_notification_email.text.erb @@ -2,3 +2,7 @@ <% if mail %> <%= mail.text_part&.body&.decoded %> <% end %> + +Make sense with Metamaps + +<%= render partial: 'shared/mailer_unsubscribe_link' %> diff --git a/app/views/map_mailer/access_request_email.html.erb b/app/views/map_mailer/access_request_email.html.erb index 2e89eb6e..74d666bd 100644 --- a/app/views/map_mailer/access_request_email.html.erb +++ b/app/views/map_mailer/access_request_email.html.erb @@ -1,16 +1,6 @@ -
- <% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %> - -

<%= @request.user.name %> is requesting access to collaboratively edit the following map:

- -

<%= @map.name %>

- -

<%= link_to "Allow", approve_access_map_url(id: @map.id, request_id: @request.id), target: "_blank", style: "font-size: 18px; text-decoration: none; color: #4fc059;" %> -

<%= link_to "Decline", deny_access_map_url(id: @map.id, request_id: @request.id), target: "_blank", style: "font-size: 18px; text-decoration: none; color: #DB5D5D;" %>

- - <%= link_to 'Open in Metamaps', map_url(@map), target: "_blank", style: button_style %> - -

Make sense with Metamaps

- - <%= render partial: 'shared/mailer_unsubscribe_link' %> -
+<% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %> +

<%= @request.user.name %> is requesting access to collaboratively edit the following map:

+

<%= @map.name %>

+

<%= link_to "Allow", approve_access_map_url(id: @map.id, request_id: @request.id), style: "font-size: 18px; text-decoration: none; color: #4fc059;" %> +

<%= link_to "Decline", deny_access_map_url(id: @map.id, request_id: @request.id), style: "font-size: 18px; text-decoration: none; color: #DB5D5D;" %>

+<%= link_to 'Go to Map', map_url(@map), style: button_style %> diff --git a/app/views/map_mailer/access_request_email.text.erb b/app/views/map_mailer/access_request_email.text.erb index 25ccb2bd..ef302a8b 100644 --- a/app/views/map_mailer/access_request_email.text.erb +++ b/app/views/map_mailer/access_request_email.text.erb @@ -5,6 +5,4 @@ Allow [<%= approve_access_map_url(id: @map.id, request_id: @request.id) %>] Decline [<%= deny_access_map_url(id: @map.id, request_id: @request.id) %>] -Make sense with Metamaps -<%= render partial: 'shared/mailer_unsubscribe_link' %> diff --git a/app/views/map_mailer/invite_to_edit_email.html.erb b/app/views/map_mailer/invite_to_edit_email.html.erb index cd2b7b2e..aba7cfd4 100644 --- a/app/views/map_mailer/invite_to_edit_email.html.erb +++ b/app/views/map_mailer/invite_to_edit_email.html.erb @@ -1,15 +1,7 @@ -
- <% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %> - -

<%= @inviter.name %> has invited you to collaboratively edit the following map:

-

<%= link_to @map.name, map_url(@map), target: "_blank", style: "font-size: 18px; text-decoration: none; color: #4fc059;" %>

- <% if @map.desc %> -

<%= @map.desc %>

- <% end %> - - <%= link_to 'Open in Metamaps', map_url(@map), target: "_blank", style: button_style %> - -

Make sense with Metamaps

- - <%= render partial: 'shared/mailer_unsubscribe_link' %> -
+<% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %> +

<%= @inviter.name %> has invited you to collaboratively edit the following map:

+

<%= link_to @map.name, map_url(@map), style: "font-size: 18px; text-decoration: none; color: #4fc059;" %>

+<% if @map.desc %> +

<%= @map.desc %>

+<% end %> +<%= link_to 'Go to Map', map_url(@map), style: button_style %> diff --git a/app/views/map_mailer/invite_to_edit_email.text.erb b/app/views/map_mailer/invite_to_edit_email.text.erb index 7d3bf397..4e822842 100644 --- a/app/views/map_mailer/invite_to_edit_email.text.erb +++ b/app/views/map_mailer/invite_to_edit_email.text.erb @@ -1,7 +1,3 @@ <%= @inviter.name %> has invited you to collaboratively edit the following map: <%= @map.name %> [<%= map_url(@map) %>] - -Make sense with Metamaps - -<%= render partial: 'shared/mailer_unsubscribe_link' %> diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index e030e483..f2c98adf 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -3,7 +3,9 @@
-

My Notifications

+
    <% @notifications.each do |notification| %> <% receipt = @receipts.find_by(notification_id: notification.id) %> @@ -23,6 +25,7 @@ <%= link_to 'mark as read', mark_read_notification_path(notification.id), remote: true, method: :put %> <% end %>
+
<% end %> <% if @notifications.count == 0 %> @@ -32,7 +35,7 @@
<% if @notifications.total_pages > 1 %> -
-
- <%= link_to 'Back', notifications_path %> +
+ <%= link_to 'Back to notifications', notifications_path %>
<%= render partial: 'shared/back_to_mapping' %> diff --git a/app/views/shared/_back_to_mapping.html.erb b/app/views/shared/_back_to_mapping.html.erb index 682a71e6..342fd186 100644 --- a/app/views/shared/_back_to_mapping.html.erb +++ b/app/views/shared/_back_to_mapping.html.erb @@ -1,3 +1,3 @@ -
+ diff --git a/frontend/src/components/NotificationIcon.js b/frontend/src/components/NotificationIcon.js index 5a1e820f..e7225f04 100644 --- a/frontend/src/components/NotificationIcon.js +++ b/frontend/src/components/NotificationIcon.js @@ -20,7 +20,7 @@ class NotificationIcon extends Component { return (
- Notifications ({this.props.unreadNotificationsCount} unread) + Notifications
{this.props.unreadNotificationsCount === 0 ? null : (