mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 13:21:29 +00:00
Added teams edit page styling
This commit is contained in:
parent
005a16b484
commit
dc0603153c
3 changed files with 91 additions and 52 deletions
|
@ -46,6 +46,7 @@ form {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: em(10);
|
margin-right: em(10);
|
||||||
|
float: left;
|
||||||
|
|
||||||
select {
|
select {
|
||||||
@include appearance(none);
|
@include appearance(none);
|
||||||
|
@ -234,18 +235,32 @@ form.square {
|
||||||
line-height: em(16);
|
line-height: em(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputs,
|
|
||||||
input[type=text],
|
input[type=text],
|
||||||
input[type=password],
|
input[type=password],
|
||||||
input[type=email],
|
input[type=email],
|
||||||
textarea {
|
textarea {
|
||||||
@include span-columns(9);
|
@include span-columns(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inputs {
|
||||||
|
@include span-columns(9);
|
||||||
|
|
||||||
|
input[type=text],
|
||||||
|
input[type=password],
|
||||||
|
input[type=email] {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
@include span-columns(9);
|
@include span-columns(9);
|
||||||
@include shift(3);
|
@include shift(3);
|
||||||
|
|
||||||
|
&.inline {
|
||||||
|
margin-left: 0;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,18 @@
|
||||||
width: 20%;
|
width: 20%;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.edit {
|
||||||
|
@include span-columns(12);
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbed-contents {
|
||||||
|
margin-bottom: em(20);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,56 +1,58 @@
|
||||||
<h1>Editing team: <%= h @team.name %></h1>
|
<div id="teams" class="tabbed edit">
|
||||||
|
<h1>Manage Team: <%=h @team.name %></h1>
|
||||||
|
|
||||||
<div id="teamsTab">
|
<ul id="teams-nav" class="tabs">
|
||||||
<ul id="teamsTab-nav" class="tabs">
|
<li><a href="#details">Details</a></li>
|
||||||
<li><a href="#detailsTab">Details</a></li>
|
<li><a href="#members">Members</a></li>
|
||||||
<li><a href="#membersTab">Members</a></li>
|
<li><a href="#contests">Contests</a></li>
|
||||||
<li><a href="#contestsTab">Contests</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="box wide tabs">
|
<div class="tabbed-contents">
|
||||||
<div id="detailsTab" class="tab">
|
<div id="details" class="tab">
|
||||||
<%= form_for @team, :html => {:multipart => true} do |f| %>
|
<%= form_for @team, html: { multipart: true, class: 'square' } do |f| %>
|
||||||
<%= f.error_messages %>
|
<%= f.error_messages %>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :name %><br />
|
<%= f.label :name %>
|
||||||
<%= f.text_field :name %>
|
<%= f.text_field :name %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :irc %><br />
|
<%= f.label :irc %>
|
||||||
<%= f.text_field :irc %>
|
<%= f.text_field :irc %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :web %><br />
|
<%= f.label :web %>
|
||||||
<%= f.text_field :web %>
|
<%= f.text_field :web %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :tag %><br />
|
<%= f.label :tag %>
|
||||||
<%= f.text_field :tag %>
|
<%= f.text_field :tag %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :country %><br />
|
<%= f.label :country %>
|
||||||
<%= country_code_select :team, :country %>
|
<%= country_code_select :team, :country %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :comment %><br />
|
<%= f.label :comment %>
|
||||||
<%= f.text_field :comment %>
|
<%= f.text_field :comment %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :recruiting %><br />
|
<%= f.label :recruiting %>
|
||||||
<%= f.text_field :recruiting %><br />
|
<div class="inputs">
|
||||||
Leave empty if you are not recruiting, otherwise write the recruiting criteria above.
|
<%= f.text_field :recruiting %>
|
||||||
</p>
|
<p>Leave empty if you are not recruiting, otherwise write the recruiting criteria above.</p>
|
||||||
<p>
|
</div>
|
||||||
<%= f.label :logo %><br />
|
</div>
|
||||||
<%= f.file_field :logo %><br />
|
<div class="fields horizontal">
|
||||||
</p>
|
<%= f.label :logo %>
|
||||||
<p>
|
<%= f.file_field :logo %>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
<%= f.submit "Update" %>
|
<%= f.submit "Update" %>
|
||||||
</p>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="membersTab" class="tab">
|
<div id="members" class="tab">
|
||||||
<%= form_for @team do |f| %>
|
<%= form_for @team do |f| %>
|
||||||
<table class="data">
|
<table class="data">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -60,8 +62,8 @@
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% @team.teamers.present.each do |member| %>
|
<% @team.teamers.present.each do |member| %>
|
||||||
<tr class="<%= cycle('even', 'odd') %>">
|
<tr class="fields">
|
||||||
<td <% if member.team_id == member.user.team_id %>id="teamsPrimary"<% end %>>
|
<td id="<%= 'primary' if member.team_id == member.user.team_id %>">
|
||||||
<%= link_to (h member.user.username), member.user %>
|
<%= link_to (h member.user.username), member.user %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -71,23 +73,31 @@
|
||||||
<%= select_tag "rank[#{member.id}]", options_for_select(member.ranks.invert, member.rank) %>
|
<%= select_tag "rank[#{member.id}]", options_for_select(member.ranks.invert, member.rank) %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to 'Remove', member, :confirm => 'Are you sure?', :method => :delete%>
|
<%= link_to member, confirm: 'Are you sure?', method: :delete, class: 'button tiny' do %>
|
||||||
|
<%= icon 'times' %> Remove
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<div class="controls">
|
||||||
<%= f.submit "Update" %>
|
<%= f.submit "Update" %>
|
||||||
</p>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="contestsTab" class="tab">
|
<div id="contests" class="tab">
|
||||||
<p>
|
<p>
|
||||||
<%= form_for @team.contesters.build do |f| %>
|
<%= form_for @team.contesters.build, html: { class: 'square' } do |f| %>
|
||||||
<%= f.hidden_field :team_id %>
|
<%= f.hidden_field :team_id %>
|
||||||
<%= f.collection_select :contest_id, Contest.active, :id, :name %>
|
|
||||||
<%= f.submit "Join" %>
|
<div class="fields inline">
|
||||||
|
<%= f.collection_select :contest_id, Contest.active, :id, :name %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="controls inline">
|
||||||
|
<%= f.submit "Join" %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,8 +105,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var tabber1 = new Yetii({id: 'teamsTab'});
|
new Yetii({
|
||||||
|
id: 'teams'
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<%= link_to 'Show', @team %> |
|
<%= link_to 'Show', @team, class: 'button' %>
|
||||||
<%= link_to 'Back', teams_path %>
|
<%= link_to 'Back', teams_path, class: 'button' %>
|
||||||
|
|
Loading…
Reference in a new issue