Skip to content

Commit e9fdd34

Browse files
committed
Add tabs to problem settings
1 parent 64ecf29 commit e9fdd34

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

app/assets/stylesheets/custom_styles.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,29 @@ h1 h2 h3 h4 h5 h6 {
3737
}
3838
}
3939

40+
/* tabs for problem settings */
41+
.panel.panel-problem-settings {
42+
background-color: #f0f3f5;
43+
border-color: #96a3b7;
44+
}
45+
.panel-problem-settings > .panel-heading {
46+
background-color: #6683b7;
47+
padding: 5px 10px 0 10px;
48+
}
49+
.panel-problem-settings .nav-tabs {
50+
border: none;
51+
}
52+
.panel-problem-settings .nav-tabs > li.active > a {
53+
background-color: #f0f3f5;
54+
color: #555555;
55+
}
56+
.panel-problem-settings .nav-tabs > li > a {
57+
color: #f0f3f5;
58+
}
59+
.panel-problem-settings .nav-tabs > li > a:hover {
60+
color: #555555;
61+
}
62+
4063
/* slider (dashboard) */
4164
.ui-slider {
4265
background: #f5f5f5;

app/views/problems/_form.html.erb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
<%= nested_form_for @problem, html: {class: 'form', id: 'problem-form'} do |f| %>
88
<%= render partial: "shared/errors", locals: {errors: @problem.errors, item: 'problem'} %>
99

10+
11+
<div class="panel with-nav-tabs panel-problem-settings">
12+
<div class="panel-heading">
13+
<ul class="nav nav-tabs">
14+
<li class="active"><a href="#general-settings-tab" data-toggle="tab">General Settings</a></li>
15+
<li><a href="#judge-settings-tab" data-toggle="tab">Judge Settings</a></li>
16+
</ul>
17+
</div>
18+
<div class="panel-body">
19+
<div class="tab-content">
20+
<div class="tab-pane fade in active" id="general-settings-tab">
21+
1022
<div class="row">
1123
<div class="col-md-12">
1224
<div class="form-group">
@@ -101,7 +113,9 @@
101113
<%= f.select :discussion_visibility, Problem.discussion_visibilities.keys.map.with_index {|x, index| ["[#{index}] #{discussion_visibility_desc_map[x]}", x]},
102114
{}, {class: 'form-control flat'} %>
103115
</div>
116+
</div>
104117

118+
<div class="tab-pane fade" id="judge-settings-tab">
105119
<div class="form-group">
106120
<%= f.label :compilers do %>
107121
Banned compilers
@@ -426,6 +440,11 @@
426440
</div>
427441
</div>
428442

443+
</div>
444+
</div>
445+
</div>
446+
</div>
447+
429448
<hr>
430449
<div class="actions">
431450
<span class="flex-container-bottom-align">

0 commit comments

Comments
 (0)