Skip to content

Commit

Permalink
Merge branch 'dev' into new-check-page
Browse files Browse the repository at this point in the history
  • Loading branch information
radscheit committed Feb 9, 2017
2 parents c0a707c + 7d548a5 commit 4ec1187
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 13 deletions.
Binary file added app/assets/images/banner.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.css
Expand Up @@ -29,6 +29,11 @@ body, footer, main, .front-section {
width: 100%;
}

.banner {
background-position: center;
background-size: cover;
}

.m-l-1 { margin-left: 15px; }
.m-r-1 { margin-right: 15px; }
.m-t-1 { margin-top: 15px; }
Expand Down
Expand Up @@ -74,7 +74,7 @@
@import "twitter/bootstrap/utilities.less";
@import "twitter/bootstrap/responsive-utilities.less";

body {
body:not(.wsp-home), .wsp-home .banner.front-section {
padding-top: 120px;
}

Expand Down Expand Up @@ -184,6 +184,10 @@ a:hover h1, a:hover h2, a:hover h3, a:hover h4 {

padding-top: 0px !important;

h1, h4, p {
color: #FFF;
}

ul {
list-style: none;
float: left;
Expand Down
12 changes: 8 additions & 4 deletions app/mailers/portal_mailer.rb
@@ -1,15 +1,19 @@
class PortalMailer < ApplicationMailer

include ApplicationHelper

# @param recipients [Array<String>] - email addresses of recipients - can be a string of comma separated email adresses too
# @param reply_to [Array<String>] - email addresses of recipient of the answer - can be a string of comma separated email adresses too
# @param subject [String] - subject of the mail
# @param content [String] - content of the mail
# @param some_attachments - array of hashes with name and content
# @return [ActionMailer::MessageDelivery] a mail object with the given parameters.
def generic_email(recipients, reply_to, subject, content, some_attachments = [])
some_attachments.each do |attachment|
def generic_email(recipients, reply_to, subject, content, attached_files = [])
attached_files.each do | attachment |
attachments[attachment[:name]] = attachment[:content]
end
mail(to: recipients, reply_to: reply_to, subject: subject, body: content)
mail(to: recipients, reply_to: reply_to, subject: subject) do | format |
format.html { markdown content }
format.text { content }
end
end
end
3 changes: 2 additions & 1 deletion app/views/application/index.html.erb
@@ -1,5 +1,6 @@
<section class="front-section">
<section class="front-section banner" style="background-image: url('<%= image_path('banner.jpg') %>')">
<div class="container" id="wsp-welcome">
<%= bootstrap_flash %>
<div class="row">
<div class="col-md-6">
<div class="row">
Expand Down
13 changes: 8 additions & 5 deletions app/views/emails/_email_form.erb
Expand Up @@ -43,12 +43,15 @@
<div class="col-sm-10">
<%= f.text_area :content, class: 'email-content form-control', rows: 15 %>
<%= f.error_span(:content) %>
<%= t('markdown.supports_markdown_html', href: link_to(t('markdown.supports_markdown_link'), 'https://daringfireball.net/projects/markdown/syntax')) %>
</div>
</div>
<div class="btn-group pull-right" role="group">
<% unless @send_generic %>
<%= f.submit t('.save_template'), name: 'save', class: 'email-submit btn btn-default' %>
<% end %>
<%= f.submit t('.send'), name: 'send', class: 'email-submit btn btn-primary' %>
<div class="form-group" role="group">
<div class="btn-group pull-right">
<% unless @send_generic %>
<%= f.submit t('.save_template'), name: 'save', class: 'email-submit btn btn-default' %>
<% end %>
<%= f.submit t('.send'), name: 'send', class: 'email-submit btn btn-primary' %>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/events/_form.html.erb
Expand Up @@ -46,7 +46,7 @@
var EVENT_DESCRIPTION_PLACEHOLDER = '<%= I18n.t "events.description_placeholder" %>';
</script>
<%=f.error_span(:description) %>
Dieser Editor unterstüzt <a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>
<%= t('markdown.supports_markdown_html', href: link_to(t('markdown.supports_markdown_link'), 'https://daringfireball.net/projects/markdown/syntax')) %>
</div>
</div>

Expand Down
8 changes: 7 additions & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -32,10 +32,16 @@
<% end %>
<% end %>
<%# https://github.com/seyhunak/twitter-bootstrap-rails#flash-helper %>
<%# https://github.com/seyhunak/twitter-bootstrap-rails#flash-helper
due to the background image in the top banner that needs to attach
to the top navbar, we can't display any elements betweeen the first
section and the navbar. our flashs are instead displayed in the
`application/index` template %>
<% if not current_page?('/') %>
<div class="container">
<%= bootstrap_flash %>
</div>
<% end %>

<main>
<% if not local_assigns[:full_width] %>
Expand Down
3 changes: 3 additions & 0 deletions config/locales/de.yml
Expand Up @@ -77,3 +77,6 @@ de:
forward: Weiter
top: oben
bottom: unten
markdown:
supports_markdown_html: 'Dieser Editor unterstützt %{href}.'
supports_markdown_link: 'Markdown'

0 comments on commit 4ec1187

Please sign in to comment.