Skip to content

Commit b109a7d

Browse files
committed
Bug 1192854: change tabs on user preferences from horizontal to vertical layout
1 parent 56c61ae commit b109a7d

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

skins/standard/admin.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,49 @@ th.title {
179179
cursor: default;
180180
}
181181

182+
/* User Preferences Page */
183+
184+
#prefmain {
185+
margin: 1em 0;
186+
}
187+
188+
#prefnav {
189+
width: 14em;
190+
float: left;
191+
}
192+
193+
#prefcontent {
194+
margin-left: 15em;
195+
padding: .2em 1.5em 1.5em 1.5em;
196+
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
197+
background: #FFF none repeat scroll 0% 0%;
198+
}
199+
200+
#prefnav, #prefcontent {
201+
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
202+
}
203+
204+
#prefnav ul {
205+
margin: 0;
206+
padding: 0;
207+
list-style: none;
208+
}
209+
210+
#prefnav li {
211+
padding: .6em 1em;
212+
background: rgba(255, 255, 255, 0.5);
213+
}
214+
215+
#prefnav li a {
216+
display: block;
217+
text-decoration: none;
218+
}
219+
220+
#prefnav li a:hover {
221+
text-decoration: underline;
222+
}
223+
224+
#prefnav li.selected {
225+
font-weight: bold;
226+
background: #fff;
227+
}

template/en/default/account/prefs/prefs.html.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
END;
9696
%]
9797

98-
[% WRAPPER global/tabs.html.tmpl
98+
[% WRAPPER account/prefs/tabs.html.tmpl
9999
tabs = tabs
100100
current_tab = current_tab
101101
%]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[%# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
#
5+
# This Source Code Form is "Incompatible With Secondary Licenses", as
6+
# defined by the Mozilla Public License, v. 2.0.
7+
#%]
8+
9+
[%# INTERFACE:
10+
# tabs: List of hashes. Must have at least one item. Each hash has:
11+
# name: string. Name of the tab.
12+
# link: string. relative URL to the tab's resource on this installation.
13+
# label: string. text displayed in the tab.
14+
# current_tab_name: string. name of the currently selected tab
15+
#%]
16+
17+
<div id="prefmain">
18+
<div id="prefnav">
19+
<ul>
20+
[% FOREACH tab = tabs %]
21+
<li [%= IF tab.name == current_tab_name %]class="selected"[% END %]>
22+
<a href="[% tab.link FILTER html %]">[% tab.label FILTER html %]</a>
23+
</li>
24+
[% END %]
25+
</ul>
26+
</div>
27+
<div id="prefcontent">
28+
[% content FILTER none %]
29+
</div>
30+
</div>

0 commit comments

Comments
 (0)