Showing 2 changed files with 153 additions and 40 deletions
+112 -1
public/css/bootstrap.css
... ...
@@ -930,6 +930,33 @@ button.close {
930 930
   background-color: #408140 \9;
931 931
 }
932 932
 
933
+.btn-danger {
934
+  color: #ffffff;
935
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
936
+  background-color: #da4f49;
937
+  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
938
+  background-repeat: repeat-x;
939
+  border-color: #bd362f #bd362f #802420;
940
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
941
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
942
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
943
+}
944
+
945
+.btn-danger:hover,
946
+.btn-danger:focus,
947
+.btn-danger:active,
948
+.btn-danger.active,
949
+.btn-danger.disabled,
950
+.btn-danger[disabled] {
951
+  color: #ffffff;
952
+  background-color: #bd362f;
953
+}
954
+
955
+.btn-danger:active,
956
+.btn-danger.active {
957
+  background-color: #942a25 \9;
958
+}
959
+
933 960
 /* alert */
934 961
 .alert {
935 962
   padding: 8px 35px 8px 14px;
... ...
@@ -2056,4 +2083,88 @@ button.close {
2056 2083
 .header-bottom {
2057 2084
   margin-bottom:15px;
2058 2085
   min-height:1px;
2059
-}
2086
+}
2087
+
2088
+.project-settings {
2089
+  overflow:hidden;
2090
+}
2091
+
2092
+.project-settings .left {
2093
+  float:left;
2094
+  width:15%;
2095
+  padding-right:10px;
2096
+}
2097
+
2098
+.project-settings .left li {
2099
+  border:1px solid #d8d8d8;
2100
+  border-top:none;
2101
+  padding:5px 10px;
2102
+}
2103
+
2104
+.project-settings .left li:first-child {
2105
+  border-top:1px solid #d8d8d8;
2106
+}
2107
+
2108
+.project-settings .right {
2109
+  float:left;
2110
+  width:85%;
2111
+}
2112
+
2113
+.project-settings-main {
2114
+  margin-bottom:20px;
2115
+}
2116
+
2117
+.project-settings-main li {
2118
+  border:1px solid #d8d8d8;
2119
+  border-top:none;
2120
+  padding:10px 10px;
2121
+}
2122
+
2123
+.project-settings-main li:first-child {
2124
+  border-top:1px solid #d8d8d8;
2125
+  background: #eee;
2126
+  border-radius:3px 3px 0 0;
2127
+  font-size:17px;
2128
+}
2129
+
2130
+.project-settings-main input[type=text] {
2131
+    border:1px solid #d8d8d8;
2132
+    border-radius: 3px;
2133
+    padding:6px 5px;
2134
+    width:100%;
2135
+    margin:5px 0;
2136
+}
2137
+
2138
+.project-settings-main input[type=checkbox] {
2139
+  margin:0 5px;
2140
+}
2141
+
2142
+.project-settings-main select {
2143
+    border:1px solid #d8d8d8;
2144
+    border-radius: 3px;
2145
+    padding:6px 5px;
2146
+    width:30%;
2147
+    margin:5px 0;
2148
+}
2149
+
2150
+.project-settings-danger li {
2151
+  border:1px solid #d8d8d8;
2152
+  border-top:none;
2153
+  padding:10px 10px;
2154
+}
2155
+
2156
+.project-settings-danger li:first-child {
2157
+  border-top:1px solid #d8d8d8;
2158
+  background: #eee;
2159
+  border-radius:3px 3px 0 0;
2160
+  font-size:17px;
2161
+  background:red;
2162
+}
2163
+
2164
+#delete-confirm input {
2165
+  border:1px solid #d8d8d8;
2166
+  border-radius: 3px;
2167
+  padding:6px 5px;
2168
+  margin:5px 0;
2169
+  width:70%;
2170
+}
+41 -39
templates/settings.html.ep
... ...
@@ -172,71 +172,73 @@
172 172
     %= include '/include/errors', errors => $errors;
173 173
     %= include '/include/message', message => flash('message');
174 174
     
175
-    <div class="row">
176
-      <div class="span2">
177
-        <ul class="unstyled" style="font-size:13px;">
178
-          <li class="border-gray" style="padding:5px;"><b>Options</b></li>
179
-          <li class="border-gray" style="border-top:none;padding:6px;"><a href="<%= url_for("/$user/$project/settings/collaboration") %>">Collaborators</a></li>
175
+    <div class="project-settings">
176
+      <div class="left">
177
+        <ul>
178
+          <li><b>Options</b></li>
179
+          <li><a href="<%= url_for("/$user/$project/settings/collaboration") %>">Collaborators</a></li>
180 180
         </ul>
181 181
       </div>
182
-      <div class="span10">
183
-        <div style="margin-bottom:20px">
184
-          <div class="border-gray bk-gray-light radius-top" style="padding-left:5px">
182
+      <div class="right">
183
+        <ul class="project-settings-main">
184
+          <li>
185 185
             <h4>
186 186
               Settings
187 187
             </h4>
188
-          </div>
189
-          <div class="border-gray" style="padding:5px 10px;border-top:none">
190
-            <form id="form-rename-project" action="<%= url_for->query(op => 'rename-project') %>" method="post" style="margin-bottom:0px">
188
+          </li>
189
+          <li>
190
+            <form id="form-rename-project" action="<%= url_for->query(op => 'rename-project') %>" method="post">
191 191
               <div >Repository Name</div>
192 192
               <div>
193
-                %= text_field 'to-project' => $project, style => 'margin-top:9px';
193
+                %= text_field 'to-project' => $project;
194 194
                 <a href="#rename-confirm" role="button" class="btn" data-toggle="modal">
195 195
                   Rename
196 196
                 </a>
197 197
               </div>
198 198
             </form>
199
-          </div>
200
-          <div class="border-gray" style="padding:5px 10px;border-top:none">
201
-            <form action="<%= url_for->query(op => 'change-description') %>" method="post" style="margin-bottom:0px">
199
+          </li>
200
+          <li>
201
+            <form action="<%= url_for->query(op => 'change-description') %>" method="post">
202 202
               <div >Description</div>
203 203
               <div>
204 204
                 % my $description = $git->description($user, $project);
205 205
                 % $description = '' unless defined $description;
206
-                %= text_field 'description' => $description, class => 'span8', style => 'margin-top:9px';
206
+                %= text_field 'description' => $description;
207 207
                 <input type="submit" class="btn" value="Save">
208 208
               </div>
209 209
             </form>
210
-          </div>
211
-          <div class="border-gray radius-bottom" style="padding:5px 10px;border-top:none;">
212
-            <form id="form-default-branch" action="<%= url_for->query(op => 'default-branch') %>" method="post" style="margin-bottom:0px">
210
+          </li>
211
+          <li>
212
+            <form id="form-default-branch" action="<%= url_for->query(op => 'default-branch') %>" method="post">
213 213
               Default Branch
214
-              % my $branches = $git->branches($user, $project);
215
-              % my $branch_names = [map { $_->{name} } @$branches];
216
-              % my $default_branch = app->manager->default_branch($user, $project);
217
-              % push @$branch_names, $default_branch unless @$branch_names;
218
-              % param('default-branch', $default_branch);
219
-              %= select_field 'default-branch' => $branch_names, style => 'margin-top:5px';
214
+              <%
215
+                my $branches = $git->branches($user, $project);
216
+                my $branch_names = [map { $_->{name} } @$branches];
217
+                my $default_branch = app->manager->default_branch($user, $project);
218
+                push @$branch_names, $default_branch unless @$branch_names;
219
+                param('default-branch', $default_branch);
220
+              %>
221
+              %= select_field 'default-branch' => $branch_names;
220 222
             </form>
221
-          </div>
222
-          <div class="border-gray radius-bottom" style="padding:5px 10px;border-top:none;">
223
-            <form id="form-default-branch" action="<%= url_for->query(op => 'private') %>" method="post" style="margin-bottom:0px">
223
+          </li>
224
+          <li>
225
+            <form id="form-default-branch" action="<%= url_for->query(op => 'private') %>" method="post">
224 226
               <span>Make this repository private</span>
225 227
               % my $private = app->manager->is_private_project($user, $project);
226 228
               % if ($private) {
227 229
                 % param('private', 1);
228 230
               % }
229
-              %= check_box 'private' => 1, style => 'margin-top:0px;margin-left:5px;margin-right:10px';
231
+              %= check_box 'private' => 1;
230 232
               <input type="submit" class="btn" value="Save">
231 233
             </form>
232
-          </div>
233
-        </div>
234
+          </li>
235
+        </ul>
234 236
         
235
-        <div style="margin-bottom:30px">
236
-          <div class="border-gray bk-gray-light radius-top" style="background:red;padding-left:5px">
237
+        <ul class="project-settings-danger">
238
+          <li style="background:red;padding-left:5px">
237 239
             <h4 style="color:white">Danger Zone</h4>
238
-          </div>
239
-          <div class="border-gray radius-bottom" style="padding:5px 10px;border-top:none">
240
+          </li>
241
+          <li class="border-gray radius-bottom" style="padding:5px 10px;border-top:none">
240 242
             <form id="form-delete-project" action="<%= url_for->query(op => 'delete-project') %>" method="post">
241 243
               <div><b>Delete this repository</b></div>
242 244
               <span class="muted">
... ...
@@ -248,8 +250,8 @@
248 250
               %= hidden_field user => $user;
249 251
               %= hidden_field project => $project;
250 252
             </form>
251
-          </div>
252
-        </div>
253
+          </li>
254
+        </ul>
253 255
       </div>
254 256
     </div>
255 257
   </div>
... ...
@@ -266,7 +268,7 @@
266 268
   <div id="rename-confirm" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="rename-confirm-label" aria-hidden="true">
267 269
     <div class="modal-header">
268 270
       <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
269
-      <div style="font-weight:bold">Are you sure you want to rename?</div>
271
+      <div style="font-weight:bold;">Are you sure you want to rename?</div>
270 272
     </div>
271 273
     <div class="modal-body">
272 274
       <p>
... ...
@@ -304,7 +306,7 @@
304 306
       <p>
305 307
         Please type in the name of the repository(<b><%= $project %></b>) to confirm.
306 308
       </p>
307
-      %= text_field 'deleted-project', class => 'span5';
309
+      %= text_field 'deleted-project';
308 310
     </div>
309 311
     <div class="modal-footer">
310 312
       <button id="delete" class="btn btn-danger disabled" disabled data-dismiss="modal" aria-hidden="true">