Skip to content

Commit

Permalink
t push
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:ZeusWPI/Gandalf
  • Loading branch information
TomNaessens committed Mar 31, 2014
2 parents 294f687 + 3ec035f commit 964e3a8
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ footer {
.nowrap {
white-space: nowrap;
}

71 changes: 71 additions & 0 deletions app/assets/stylesheets/jumbotron-narrow.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
padding-right: 15px;
padding-left: 15px;
}

/* Custom page header */
.header {
border-bottom: 1px solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
padding-bottom: 19px;
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
}

/* Custom page footer */
.footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}

/* Customize container */
@media (min-width: 768px) {
.container-index {
max-width: 730px;
margin: 0 auto;
}
}
.container-narrow > hr {
margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
text-align: center;
border-bottom: 1px solid #e5e5e5;
padding-top: 30px;
}

/* Supporting marketing content */
.marketing, #resultscontainer {
margin: 40px 0;
}
.marketing p + h4 {
margin-top: 28px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
/* Remove the padding we set earlier */
.header,
.marketing,
.footer {
padding-right: 0;
padding-left: 0;
}
/* Space out the masthead */
.header {
margin-bottom: 30px;
}
/* Remove the bottom border on the jumbotron for visual effect */
.jumbotron {
border-bottom: 0;
}
}
6 changes: 4 additions & 2 deletions app/views/access_levels/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
<td width="130px"><%= form_check_box f, :member_only %></td>
<td><div class="checkbox"><%= f.check_box :has_comment %></div></td>
<td><div class="checkbox"><%= f.check_box :hidden %></div></td>
<td><input type="hidden" name="_method" value="<%= (button_name == 'Save') ? 'put' : 'post' %>"><%= f.button button_name, class: 'btn btn-sm btn-primary' %></td>
<td><%= f.button button_name, class: 'btn btn-sm btn-primary' %></td>
<%= javascript_tag do %>
var id = "#<%=dom_id(f.object) %>";
var id = "#<% if button_name == 'Save' %>edit_<% end %><%= dom_id(f.object) %>";
var inputs = $(id).parent().find('input');

$(id).parent().find('button').on('click', function(e) {
e.preventDefault();
$(id).append(inputs.clone());
$(id).append('<input type="hidden" name="_method" value="<%= (button_name == 'Save') ? 'put' : 'post' %>">');
$(id).submit();
});
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/access_levels/update.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
<% else %>
$('#access-level-errors').html('')
$('#edit_<%= dom_id(@access_level) %>').parent().replaceWith("<%=j render @access_level, advanced: false %>");

var id = "#new_access_level";
var inputs = $(id).parent().find('input');
<% end %>
6 changes: 4 additions & 2 deletions app/views/partners/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
<td><%= f.email_field :email, class: 'form-control' %></td>
<td><%= f.collection_select :access_level, object.event.access_levels, :id, :name_with_price, {}, { class: "form-control" } %></td>
<td></td>
<td><input type="hidden" name="_method" value="<%= action %>"><%= f.button button_name, class: 'btn btn-sm btn-primary' %></td>
<td><%= f.button button_name, class: 'btn btn-sm btn-primary' %></td>
<%= javascript_tag do %>
var id = "#<%= dom_id(f.object) %>";
var id = "#<% if button_name == 'Save' %>edit_<% end %><%= dom_id(f.object) %>";
var inputs = $(id).parent().find('input');
var select = $(id).parent().find('select');

$(id).parent().find('button').on('click', function(e) {
e.preventDefault();
$(id).append(inputs.clone());
$(id).append("<input type'hidden' name='partner[access_level]' value='" + select.val() + "'>");
$(id).append('<input type="hidden" name="_method" value="<%= (button_name == 'Save') ? 'put' : 'post' %>">');
$(id).submit();
});
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/partners/update.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
<% else %>
$('#partner-errors').html('')
$('#edit_<%= dom_id(@partner) %>').parent().replaceWith("<%= j render @partner %>");

var id = "#new_partner";
var inputs = $(id).parent().find('input');
<% end %>
21 changes: 17 additions & 4 deletions app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
<%= render partial: 'flash' %>

<h1>Welcome!</h1>
<div class="container-index">
<div class="jumbotron">
<h1>Welcome!</h1>
<p>Welcome to Gandalf, an online event management service brought to you by <a href="http://zeus.ugent.be/" target="_blank">Zeus WPI</a> and <a href="http://www.fkgent.be/" target="_blank">FaculteitenKonvent Gent</a>.</p>
</div>

<div class="row marketing">
<div class="col-lg-6">
<h4>Guests</h4>
<p>Click on <%= link_to "Events", events_path %> in the menu to register or buy tickets for an event.</p>
</div>

<p>Welcome to Gandalf, an online event management service brought to you by <a href="http://zeus.ugent.be/" target="_blank">Zeus WPI</a> and <a href="http://www.fkgent.be/" target="_blank">FaculteitenKonvent Gent</a></p>
<div class="col-lg-6">
<h4>FK Praesidia</h4>
<p>FK Praesidia can <%= link_to "log in", new_user_session_path %> using their UGent credentials and create events.</p>
</div>
</div>
</div>

<p>Click on <%= link_to "Events", events_path %> in the menu to register or buy tickets for an event.</p>

0 comments on commit 964e3a8

Please sign in to comment.