Skip to content
GitLab
Menu
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
d9937085
Commit
d9937085
authored
Aug 12, 2008
by
Richard Mansfield
Browse files
Mark templates on my views page
parent
09c48dcf
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/view.php
View file @
d9937085
...
@@ -1321,21 +1321,21 @@ class View {
...
@@ -1321,21 +1321,21 @@ class View {
if
(
$groupid
)
{
if
(
$groupid
)
{
$count
=
count_records
(
'view'
,
'group'
,
$groupid
);
$count
=
count_records
(
'view'
,
'group'
,
$groupid
);
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description
, v.template
FROM {view} v
FROM {view} v
WHERE v.group = '
.
$groupid
.
'
WHERE v.group = '
.
$groupid
.
'
ORDER BY v.title, v.id'
,
''
,
$offset
,
$limit
);
ORDER BY v.title, v.id'
,
''
,
$offset
,
$limit
);
}
}
else
if
(
$institution
)
{
else
if
(
$institution
)
{
$count
=
count_records
(
'view'
,
'institution'
,
$institution
);
$count
=
count_records
(
'view'
,
'institution'
,
$institution
);
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description
, v.template
FROM {view} v
FROM {view} v
WHERE v.institution = ?
WHERE v.institution = ?
ORDER BY v.title, v.id'
,
array
(
$institution
),
$offset
,
$limit
);
ORDER BY v.title, v.id'
,
array
(
$institution
),
$offset
,
$limit
);
}
}
else
{
else
{
$count
=
count_records
(
'view'
,
'owner'
,
$userid
);
$count
=
count_records
(
'view'
,
'owner'
,
$userid
);
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description, g.id AS groupid, g.name
$viewdata
=
get_records_sql_array
(
'SELECT v.id,v.title,v.startdate,v.stopdate,v.description,
v.template,
g.id AS groupid, g.name
FROM {view} v
FROM {view} v
LEFT OUTER JOIN {group} g ON (v.submittedto = g.id AND g.deleted = 0)
LEFT OUTER JOIN {group} g ON (v.submittedto = g.id AND g.deleted = 0)
WHERE v.owner = '
.
$userid
.
'
WHERE v.owner = '
.
$userid
.
'
...
@@ -1388,6 +1388,7 @@ class View {
...
@@ -1388,6 +1388,7 @@ class View {
else
if
(
$viewdata
[
$i
]
->
stopdate
)
{
else
if
(
$viewdata
[
$i
]
->
stopdate
)
{
$data
[
$i
][
'access'
]
=
get_string
(
'accessuntildate'
,
'view'
,
format_date
(
strtotime
(
$viewdata
[
$i
]
->
stopdate
),
'strftimedate'
));
$data
[
$i
][
'access'
]
=
get_string
(
'accessuntildate'
,
'view'
,
format_date
(
strtotime
(
$viewdata
[
$i
]
->
stopdate
),
'strftimedate'
));
}
}
$data
[
$i
][
'template'
]
=
$viewdata
[
$i
]
->
template
;
}
}
// Go through all the artefact records and put them in with the
// Go through all the artefact records and put them in with the
// views they belong to.
// views they belong to.
...
...
htdocs/theme/default/static/style/style.css
View file @
d9937085
...
@@ -1378,6 +1378,11 @@ fieldset.collapsed .mceEditor td {
...
@@ -1378,6 +1378,11 @@ fieldset.collapsed .mceEditor td {
#myviewstable
h3
a
{
#myviewstable
h3
a
{
color
:
#1e6297
!important
;
color
:
#1e6297
!important
;
}
}
#myviewstable
.template
{
color
:
#000
;
font-weight
:
normal
;
font-size
:
13px
;
}
#myviewstable
.viewitem
{
#myviewstable
.viewitem
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
font-size
:
11px
;
font-size
:
11px
;
...
...
htdocs/theme/default/templates/view/index.tpl
View file @
d9937085
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
{
if
!
$view.submittedto
}
{
if
!
$view.submittedto
}
<a
href=
"
{
$WWWROOT
}
view/delete.php?id=
{
$view.id
}
"
class=
"fr"
id=
"btn-deletethisview"
>
{
str
tag
=
"deletethisview"
section
=
"view"
}
</a>
<a
href=
"
{
$WWWROOT
}
view/delete.php?id=
{
$view.id
}
"
class=
"fr"
id=
"btn-deletethisview"
>
{
str
tag
=
"deletethisview"
section
=
"view"
}
</a>
{/
if
}
{/
if
}
<h3><a
href=
"
{
$WWWROOT
}
view/view.php?id=
{
$view.id
}
"
>
{
$view.title
|
escape
}
</a></h3>
<h3><a
href=
"
{
$WWWROOT
}
view/view.php?id=
{
$view.id
}
"
>
{
$view.title
|
escape
}
</a>
{
if
$view.template
}
<span
class=
"template"
>
(
{
str
tag
=
Template
section
=
view
}
)
</span>
{/
if
}
</h3>
<div
class=
"viewitem"
>
<div
class=
"viewitem"
>
{
if
!
$view.submittedto
}
{
if
!
$view.submittedto
}
<a
href=
"
{
$WWWROOT
}
view/edit.php?id=
{
$view.id
}
"
id=
"editviewdetails"
>
{
str
tag
=
"editviewnameanddescription"
section
=
"view"
}
</a>
<a
href=
"
{
$WWWROOT
}
view/edit.php?id=
{
$view.id
}
"
id=
"editviewdetails"
>
{
str
tag
=
"editviewnameanddescription"
section
=
"view"
}
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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