Skip to content
Snippets Groups Projects
Commit 9b99c247 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Restructure settings page

parent 58b337b0
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,12 @@ Router.route '/home',
onAfterAction: ->
KonchatNotification.getDesktopPermission()
Router.route '/settings',
Router.route '/settings/:page?',
name: 'settings'
data: ->
return {
page: @params.page
}
action: ->
this.render('settings')
......
<template name="settings">
<section class="page-container page-home page-static">
<head class="fixed-title">
<div>
<div class="burger">
<i></i>
<i></i>
<i></i>
</div>
<h2>
<span class="room-title">{{_ "App_Settings"}}</span>
</h2>
</div>
</head>
<div class="content">
<div class="info">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
<div class="rocket-form">
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Radio field</label>
<div>
<label><input type="radio" name="pandora" value="1" /> Calazar</label>
<label><input type="radio" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
<div class="input-line double-col">
<label>Checkbox field</label>
<div>
<label><input type="checkbox" name="pandora" value="1" /> Calazar</label>
<label><input type="checkbox" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<div class="submit">
<button class="button"><i class="icon-send"></i><span>Save changes</span></button>
</div>
</div>
</div>
</section>
<!-- <section class="flex-tab">
<div class="control">
<button class="more"><span class="arrow {{arrowPosition}}"></span></button>
</div>
<div class="content">
<div class="list-view">
<div class="status">
<h2>{{_ "Chat_Rooms"}}</h2>
<p>
{{{_ "Showing_online_users" total_online=1 total=1}}}
</p>
</div>
</div>
</div>
</section> -->
</template>
<template name="settings-authentication">
<h3>Authentication</h3>
{{!-- <div class="info">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
<div class="rocket-form">
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Radio field</label>
<div>
<label><input type="radio" name="pandora" value="1" /> Calazar</label>
<label><input type="radio" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
<div class="input-line double-col">
<label>Checkbox field</label>
<div>
<label><input type="checkbox" name="pandora" value="1" /> Calazar</label>
<label><input type="checkbox" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<div class="submit">
<button class="button"><i class="icon-send"></i><span>Save changes</span></button>
</div>
</div> --}}
</template>
\ No newline at end of file
<template name="settings-messages">
<h3>Messages</h3>
{{!-- <div class="info">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
<div class="rocket-form">
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Radio field</label>
<div>
<label><input type="radio" name="pandora" value="1" /> Calazar</label>
<label><input type="radio" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
<div class="input-line double-col">
<label>Checkbox field</label>
<div>
<label><input type="checkbox" name="pandora" value="1" /> Calazar</label>
<label><input type="checkbox" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<div class="submit">
<button class="button"><i class="icon-send"></i><span>Save changes</span></button>
</div>
</div> --}}
</template>
\ No newline at end of file
<template name="settings-registration">
<h3>Registration</h3>
{{!-- <div class="info">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
<div class="rocket-form">
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Radio field</label>
<div>
<label><input type="radio" name="pandora" value="1" /> Calazar</label>
<label><input type="radio" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
<div class="input-line double-col">
<label>Checkbox field</label>
<div>
<label><input type="checkbox" name="pandora" value="1" /> Calazar</label>
<label><input type="checkbox" name="pandora" value="2" /> Genoveve</label>
</div>
</div>
</fieldset>
<fieldset>
<legend>
<h3>This is another section</h3>
<p>This is a configuration text. With configuration info</p>
</legend>
<div class="input-line double-col">
<label>Input Field</label>
<div>
<input type="text" name="input-name" />
</div>
</div>
<div class="input-line double-col">
<label>Select Field</label>
<div>
<select name="select">
<option value="1">Option A</option>
<option value="1">Option B</option>
<option value="1">Option C</option>
<option value="1">Option D</option>
<option value="1">Option E</option>
</select>
</div>
</div>
</fieldset>
<div class="submit">
<button class="button"><i class="icon-send"></i><span>Save changes</span></button>
</div>
</div> --}}
</template>
\ No newline at end of file
Template.settings.helpers
tSearchSettings: ->
return t('Search_settings')
arrowPosition: ->
console.log 'settings.helpers arrowPosition' if window.rocketDebug
return 'left' unless Session.equals('flexOpened', true)
flexOpened: ->
console.log 'settings.helpers flexOpened' if window.rocketDebug
return 'opened' if Session.equals('flexOpened', true)
settingsTemplate: ->
if @page and Template["settings-#{@page}"]?
return "settings-#{@page}"
return "settings-authentication"
Template.settings.events
"click .burger": ->
chatContainer = $("#rocket-chat")
if chatContainer.hasClass("menu-closed")
chatContainer.removeClass("menu-closed").addClass("menu-opened")
else
chatContainer.addClass("menu-closed").removeClass("menu-opened")
"click .flex-tab .more": (event) ->
console.log 'settings click .flex-tab .more' if window.rocketDebug
Session.set('flexOpened', !Session.get('flexOpened'))
Template.settings.onRendered ->
console.log 'room.onRendered' if window.rocketDebug
Session.set 'flexOpened', true
FlexTab.check()
\ No newline at end of file
<template name="settings">
<section class="page-container page-home page-static">
<head class="fixed-title">
<div>
<div class="burger">
<i></i>
<i></i>
<i></i>
</div>
<h2>
<span class="room-title">{{_ "App_Settings"}}</span>
</h2>
</div>
</head>
<div class="content">
{{> UI.dynamic template=settingsTemplate}}
</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=tSearchSettings />
<i class="icon-plus"></i>
</div>
</div>
</div>
{{!-- {{#if flexOpened}} --}}
<div class="content">
<ul class='list cf_ lines'>
<li>
<a href="{{pathFor 'settings' page='authentication'}}">{{_ "Authentication_Methods"}}</a>
</li>
<li>
<a href="{{pathFor 'settings' page='messages'}}">{{_ "Message_Editing_Deleting"}}</a>
</li>
<li>
<a href="{{pathFor 'settings' page='registration'}}">{{_ "Registration"}}</a>
</li>
</ul>
</div>
{{!-- {{/if}} --}}
</section>
</template>
......@@ -9,6 +9,7 @@
"are_also_typing" : "are also typing",
"are_typing" : "are typing",
"Are_you_sure" : "Are you sure?",
"Authentication_Methods" : "Authentication Methods",
"away" : "away",
"Away" : "Away",
"busy" : "busy",
......@@ -72,6 +73,7 @@
"Members" : "Members",
"Members_List" : "Members List",
"Members_placeholder" : "Members",
"Message_Editing_Deleting" : "Message Editing/Deleting",
"More_channels" : "More channels",
"Msgs" : "Msgs",
"multi" : "multi",
......@@ -99,6 +101,7 @@
"quote" : "quote",
"Recents" : "Recents",
"Register" : "Register a new account",
"Registration" : "Registration",
"Remember_me" : "Remember me",
"Remove" : "Remove",
"Reset_password" : "Reset password",
......@@ -107,6 +110,7 @@
"Room_name_changed_successfully" : "Room name changed successfully",
"Save" : "Save",
"Search" : "Search",
"Search_settings" : "Search settings",
"See_all" : "See all",
"See_only_online" : "Only online",
"Select_an_avatar" : "Select an avatar",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment