Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
7a8e51cb
Commit
7a8e51cb
authored
Feb 15, 2007
by
Martyn Smith
Committed by
Martyn Smith
Feb 15, 2007
Browse files
The reworking of the sidebars
parent
abc98039
Changes
40
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/theme/default/editpost.tpl
View file @
7a8e51cb
...
...
@@ -6,9 +6,8 @@
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.blog"
tag
=
$pagetitle
}
</h2>
{
$textinputform
}
...
...
htdocs/artefact/blog/theme/default/list.tpl
View file @
7a8e51cb
...
...
@@ -7,9 +7,7 @@
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<div
id=
"myblogs"
>
...
...
htdocs/artefact/blog/theme/default/new.tpl
View file @
7a8e51cb
...
...
@@ -6,9 +6,8 @@
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.blog"
tag
=
"newblog"
}
</h2>
{
$newblogform
}
...
...
htdocs/artefact/blog/theme/default/newpost.tpl
View file @
7a8e51cb
...
...
@@ -6,9 +6,8 @@
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.blog"
tag
=
"newblogpost"
}
</h2>
{
$newpostform
}
...
...
htdocs/artefact/blog/theme/default/settings.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.blog"
tag
=
"blogsettings"
}
</h2>
...
...
htdocs/artefact/blog/theme/default/view.tpl
View file @
7a8e51cb
...
...
@@ -6,9 +6,7 @@
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.blog"
tag
=
"viewblog"
}
-
{
$blog
->
get
(
'title'
)|
escape
}
</h2>
...
...
htdocs/artefact/file/index.php
View file @
7a8e51cb
...
...
@@ -42,8 +42,20 @@ browser.changedircallback = uploader.updatedestination;
JAVASCRIPT;
$smarty
=
smarty
(
array
(
'tablerenderer'
,
'artefact/file/js/file.js'
));
$smarty
=
smarty
(
array
(
'tablerenderer'
,
'artefact/file/js/file.js'
),
array
(),
array
(),
array
(
'sideblocks'
=>
array
(
array
(
'name'
=>
'quota'
,
'weight'
=>
-
10
,
'data'
=>
array
(),
),
),
)
);
$smarty
->
assign
(
'INLINEJAVASCRIPT'
,
$javascript
);
$smarty
->
display
(
'artefact:file:index.tpl'
);
...
...
htdocs/artefact/file/theme/default/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"quota.tpl"
}
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.file"
tag
=
"myfiles"
}
</h2>
...
...
htdocs/artefact/internal/profileicons.php
View file @
7a8e51cb
...
...
@@ -28,7 +28,20 @@ define('INTERNAL', 1);
define
(
'MENUITEM'
,
'myprofile'
);
require
(
dirname
(
dirname
(
dirname
(
__FILE__
)))
.
'/init.php'
);
define
(
'TITLE'
,
get_string
(
'profileicons'
,
'artefact.internal'
));
$smarty
=
smarty
(
array
(
'tablerenderer'
));
$smarty
=
smarty
(
array
(
'tablerenderer'
),
array
(),
array
(),
array
(
'sideblocks'
=>
array
(
array
(
'name'
=>
'quota'
,
'weight'
=>
-
10
,
'data'
=>
array
(),
),
),
)
);
$settingsform
=
new
Pieform
(
array
(
'name'
=>
'settings'
,
...
...
htdocs/artefact/internal/theme/default/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
{
include
file
=
"sidebar.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"columnleftstart.tpl"
}
<div
class=
"fr leftrightlink"
><a
href=
"profileicons.php"
id=
"editprofileicons"
>
{
str
tag
=
"editprofileicons"
section
=
"artefact.internal"
}
»
</a></div>
...
...
htdocs/artefact/internal/theme/default/profileicons.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"quota.tpl"
}
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
...
...
htdocs/artefact/internal/theme/default/validate.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
{
include
file
=
"sidebar.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
section
=
"artefact.internal"
tag
=
"emailactivation"
}
</h2>
<p>
...
...
htdocs/auth/lib.php
View file @
7a8e51cb
...
...
@@ -699,6 +699,72 @@ function auth_handle_account_expiries() {
}
}
function
auth_generate_login_form
()
{
require_once
(
'pieforms/pieform.php'
);
$institutions
=
get_records_menu
(
'institution'
,
''
,
''
,
'name, displayname'
);
$defaultinstitution
=
get_cookie
(
'institution'
);
if
(
!
$defaultinstitution
)
{
$defaultinstitution
=
'mahara'
;
}
$loginform
=
get_login_form_js
(
pieform
(
array
(
'name'
=>
'login'
,
'renderer'
=>
'div'
,
'submit'
=>
false
,
'plugintype'
=>
'auth'
,
'pluginname'
=>
'internal'
,
'elements'
=>
array
(
'login'
=>
array
(
'type'
=>
'fieldset'
,
'legend'
=>
get_string
(
'login'
),
'elements'
=>
array
(
'login_username'
=>
array
(
'type'
=>
'text'
,
'title'
=>
get_string
(
'username'
)
.
':'
,
'description'
=>
get_string
(
'usernamedescription'
),
'rules'
=>
array
(
'required'
=>
true
)
),
'login_password'
=>
array
(
'type'
=>
'password'
,
'title'
=>
get_string
(
'password'
)
.
':'
,
'description'
=>
get_string
(
'passworddescription'
),
'value'
=>
''
,
'rules'
=>
array
(
'required'
=>
true
)
),
'login_institution'
=>
array
(
'type'
=>
'select'
,
'title'
=>
get_string
(
'institution'
)
.
':'
,
'defaultvalue'
=>
$defaultinstitution
,
'options'
=>
$institutions
,
'rules'
=>
array
(
'required'
=>
true
),
'ignore'
=>
count
(
$institutions
)
==
1
,
'help'
=>
true
,
),
'chelp'
=>
array
(
'value'
=>
get_help_icon
(
'core'
,
'login'
,
null
,
null
,
null
,
'loginbox'
),
),
)
),
'submit'
=>
array
(
'type'
=>
'submit'
,
'value'
=>
get_string
(
'login'
)
),
'register'
=>
array
(
'value'
=>
'<div><a href="'
.
get_config
(
'wwwroot'
)
.
'register.php" tabindex="2">'
.
get_string
(
'register'
)
.
'</a>'
.
'<br><a href="'
.
get_config
(
'wwwroot'
)
.
'forgotpass.php" tabindex="2">'
.
get_string
(
'passwordreminder'
)
.
'</a></div>'
)
)
)));
return
$loginform
;
}
class
PluginAuth
extends
Plugin
{
...
...
htdocs/index.php
View file @
7a8e51cb
...
...
@@ -33,67 +33,6 @@ define('TITLE', get_string('home'));
// Check for whether the user is logged in, before processing the page. After
// this, we can guarantee whether the user is logged in or not for this page.
if
(
!
$USER
->
is_logged_in
())
{
require_once
(
'pieforms/pieform.php'
);
$institutions
=
get_records_menu
(
'institution'
,
''
,
''
,
'name, displayname'
);
$defaultinstitution
=
get_cookie
(
'institution'
);
if
(
!
$defaultinstitution
)
{
$defaultinstitution
=
'mahara'
;
}
$loginform
=
get_login_form_js
(
pieform
(
array
(
'name'
=>
'login'
,
'renderer'
=>
'div'
,
'submit'
=>
false
,
'plugintype'
=>
'auth'
,
'pluginname'
=>
'internal'
,
'elements'
=>
array
(
'login'
=>
array
(
'type'
=>
'fieldset'
,
'legend'
=>
get_string
(
'login'
),
'elements'
=>
array
(
'login_username'
=>
array
(
'type'
=>
'text'
,
'title'
=>
get_string
(
'username'
)
.
':'
,
'description'
=>
get_string
(
'usernamedescription'
),
'rules'
=>
array
(
'required'
=>
true
)
),
'login_password'
=>
array
(
'type'
=>
'password'
,
'title'
=>
get_string
(
'password'
)
.
':'
,
'description'
=>
get_string
(
'passworddescription'
),
'value'
=>
''
,
'rules'
=>
array
(
'required'
=>
true
)
),
'login_institution'
=>
array
(
'type'
=>
'select'
,
'title'
=>
get_string
(
'institution'
)
.
':'
,
'defaultvalue'
=>
$defaultinstitution
,
'options'
=>
$institutions
,
'rules'
=>
array
(
'required'
=>
true
),
'ignore'
=>
count
(
$institutions
)
==
1
,
'help'
=>
true
,
),
'chelp'
=>
array
(
'value'
=>
get_help_icon
(
'core'
,
'login'
,
null
,
null
,
null
,
'loginbox'
),
),
)
),
'submit'
=>
array
(
'type'
=>
'submit'
,
'value'
=>
get_string
(
'login'
)
),
'register'
=>
array
(
'value'
=>
'<div><a href="'
.
get_config
(
'wwwroot'
)
.
'register.php" tabindex="2">'
.
get_string
(
'register'
)
.
'</a>'
.
'<br><a href="'
.
get_config
(
'wwwroot'
)
.
'forgotpass.php" tabindex="2">'
.
get_string
(
'passwordreminder'
)
.
'</a></div>'
)
)
)));
$pagename
=
'loggedouthome'
;
}
else
{
...
...
@@ -101,9 +40,6 @@ else {
}
$smarty
=
smarty
();
if
(
!
$USER
->
is_logged_in
())
{
$smarty
->
assign
(
'login_form'
,
$loginform
);
}
$smarty
->
assign
(
'page_content'
,
get_site_page_content
(
$pagename
));
$smarty
->
display
(
'index.tpl'
);
...
...
htdocs/lib/web.php
View file @
7a8e51cb
...
...
@@ -54,6 +54,7 @@ defined('INTERNAL') || die();
//smarty(array('js/tablerenderer.js', 'artefact/file/js/filebrowser.js'))
function
&
smarty
(
$javascript
=
array
(),
$headers
=
array
(),
$pagestrings
=
array
(),
$extraconfig
=
array
())
{
global
$USER
,
$SESSION
;
$SIDEBLOCKS
=
array
();
require_once
(
get_config
(
'libroot'
)
.
'smarty/Smarty.class.php'
);
$wwwroot
=
get_config
(
'wwwroot'
);
...
...
@@ -207,9 +208,6 @@ EOF;
$smarty
->
compile_dir
=
get_config
(
'dataroot'
)
.
'smarty/compile'
;
$smarty
->
cache_dir
=
get_config
(
'dataroot'
)
.
'smarty/cache'
;
if
(
get_config
(
'installed'
))
{
$smarty
->
assign
(
'SITEMENU'
,
site_menu
());
}
$smarty
->
assign
(
'THEMEURL'
,
get_config
(
'themeurl'
));
$smarty
->
assign
(
'STYLESHEETLIST'
,
array_reverse
(
theme_get_url
(
'style/style.css'
,
null
,
true
)));
$smarty
->
assign
(
'WWWROOT'
,
$wwwroot
);
...
...
@@ -252,6 +250,37 @@ EOF;
$smarty
->
assign
(
'PAGEHELPICON'
,
$help
[
1
]);
}
// ---------- sideblock stuff ----------
if
(
get_config
(
'installed'
))
{
$smarty
->
assign
(
'SITEMENU'
,
site_menu
());
$SIDEBLOCKS
[]
=
array
(
'name'
=>
'mainmenu'
,
'weight'
=>
10
,
'data'
=>
site_menu
(),
);
}
if
(
!
$USER
->
is_logged_in
())
{
$SIDEBLOCKS
[]
=
array
(
'name'
=>
'login'
,
'weight'
=>
-
10
,
'id'
=>
'loginbox'
,
'data'
=>
array
(
'loginform'
=>
auth_generate_login_form
(),
),
);
}
if
(
isset
(
$extraconfig
[
'sideblocks'
])
&&
is_array
(
$extraconfig
[
'sideblocks'
]))
{
foreach
(
$extraconfig
[
'sideblocks'
]
as
$sideblock
)
{
$SIDEBLOCKS
[]
=
$sideblock
;
}
}
usort
(
$SIDEBLOCKS
,
create_function
(
'$a,$b'
,
'if ($a["weight"] == $b["weight"]) return 0; return ($a["weight"] < $b["weight"]) ? -1 : 1;'
));
$smarty
->
assign
(
'SIDEBLOCKS'
,
$SIDEBLOCKS
);
return
$smarty
;
}
...
...
htdocs/theme/default/static/style/style.css
View file @
7a8e51cb
...
...
@@ -500,13 +500,16 @@ div.sidebar p {
/* LOGIN FOR COLUMN RIGHT ONLY BEGINS */
.
loginbox
-botcorners
{
.
sidebar
-botcorners
{
margin-left
:
-10px
;
}
#loginbox
.sidebar-botcorners
{
margin-left
:
0
;
}
#column-right
#loginbox
{
width
:
228px
;
background
:
#FFF
url(../images/sidebox1_top_headerbg.gif)
no-repeat
top
;
padding
-top
:
10px
;
padding
:
10px
0
0
0
;
margin-bottom
:
10px
;
color
:
#000
;
}
...
...
htdocs/theme/default/templates/account/activity/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
tag
=
"activity"
}
</h2>
...
...
htdocs/theme/default/templates/account/activity/preferences/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
tag
=
"activityprefs"
}
</h2>
...
...
htdocs/theme/default/templates/account/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
tag
=
"preferences"
}
</h2>
...
...
htdocs/theme/default/templates/account/watchlist/index.tpl
View file @
7a8e51cb
{
include
file
=
"header.tpl"
}
<div
id=
"column-right"
>
{
include
file
=
"adminmenu.tpl"
}
</div>
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
str
tag
=
"watchlist"
}
</h2>
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment