Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
171fc721
Commit
171fc721
authored
9 years ago
by
Diego Sampaio
Browse files
Options
Downloads
Patches
Plain Diff
fix settings page
parent
c850cc19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/routes/router.coffee
+1
-15
1 addition, 15 deletions
client/routes/router.coffee
client/views/settings/settings.coffee
+3
-1
3 additions, 1 deletion
client/views/settings/settings.coffee
client/views/settings/settings.html
+40
-34
40 additions, 34 deletions
client/views/settings/settings.html
with
44 additions
and
50 deletions
client/routes/router.coffee
+
1
−
15
View file @
171fc721
...
...
@@ -41,21 +41,7 @@ FlowRouter.route '/settings/:group?',
@
register
'admin-settings'
,
Meteor
.
subscribe
(
'admin-settings'
)
action
:
->
FlowLayout
.
render
'main'
,
{}
track
=
Tracker
.
autorun
->
if
not
FlowRouter
.
subsReady
()
return
track
?
.
stop
()
if
not
Meteor
.
user
()
?
or
Meteor
.
user
().
admin
isnt
true
FlowRouter
.
go
(
'home'
)
return
FlowLayout
.
render
'main'
,
{
center
:
'settings'
}
KonchatNotification
.
getDesktopPermission
()
FlowLayout
.
render
'main'
,
{
center
:
'settings'
}
FlowRouter
.
route
'/history/private'
,
name
:
'privateHistory'
...
...
This diff is collapsed.
Click to expand it.
client/views/settings/settings.coffee
+
3
−
1
View file @
171fc721
Template
.
settings
.
helpers
isAdmin
:
->
return
Meteor
.
user
().
admin
is
true
groups
:
->
return
Settings
.
find
({
type
:
'group'
}).
fetch
()
group
:
->
...
...
@@ -32,4 +34,4 @@ Template.settings.events
Template
.
settings
.
onRendered
->
console
.
log
'room.onRendered'
if
window
.
rocketDebug
Session
.
set
'flexOpened'
,
true
FlexTab
.
check
()
\ No newline at end of file
FlexTab
.
check
()
This diff is collapsed.
Click to expand it.
client/views/settings/settings.html
+
40
−
34
View file @
171fc721
...
...
@@ -13,43 +13,49 @@
</div>
</head>
<div
class=
"content"
>
<h3>
{{label}}
</h3>
<div
class=
"rocket-form"
>
<fieldset>
<legend>
<!-- <h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p> -->
</legend>
{{#each settings}}
<div
class=
"input-line double-col"
>
<label>
{{label}}
</label>
<div>
<input
type=
"text"
name=
"input-name"
value=
"{{value}}"
/>
{{#unless isAdmin}}
<p>
You are not authorized to view this page.
</p>
{{else}}
<h3>
{{label}}
</h3>
<div
class=
"rocket-form"
>
<fieldset>
<legend>
<!-- <h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p> -->
</legend>
{{#each settings}}
<div
class=
"input-line double-col"
>
<label>
{{label}}
</label>
<div>
<input
type=
"text"
name=
"input-name"
value=
"{{value}}"
/>
</div>
</div>
</div>
{{/each}}
</
fieldset
>
</div>
{{/each}}
</fieldset>
</
div
>
{{/unless}}
</div>
</section>
<section
class=
"flex-tab"
>
<div
class=
"control"
>
<button
class=
"more"
><span
class=
"arrow {{arrowPosition}}"
></span></button>
<div
class=
"search-form"
>
<div
class=
"input-line search"
>
<input
type=
"text"
class=
"search"
placeholder=
{{_
"
Search_settings
"}}
/>
<i
class=
"icon-plus"
></i>
{{#if isAdmin}}
<section
class=
"flex-tab"
>
<div
class=
"control"
>
<button
class=
"more"
><span
class=
"arrow {{arrowPosition}}"
></span></button>
<div
class=
"search-form"
>
<div
class=
"input-line search"
>
<input
type=
"text"
class=
"search"
placeholder=
{{_
"
Search_settings
"}}
/>
<i
class=
"icon-plus"
></i>
</div>
</div>
</div>
<
/
div>
<
div
class=
"content"
>
<ul
class=
'list cf_ lines'
>
{{#each groups}}
<li
>
<
a
href=
"{{pathFor 'settings' group=_id}}"
>
{{_ i18nLabel}}
</a
>
</li>
{{/each}}
</
ul
>
</
div
>
</section>
<div
class=
"content"
>
<
ul
class=
'list cf_ lines'
>
{{#each groups}}
<li>
<a
href=
"{{pathFor 'settings' group=_id}}"
>
{{_ i18nLabel}}
</a
>
<
/li
>
{{/each}}
</ul>
</
div
>
</
section
>
{{/if}}
</template>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment