servers view
This commit is contained in:
parent
9e31ca239d
commit
9bb5f3a20f
9
CHANGES
9
CHANGES
|
@ -1,10 +1,15 @@
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
#### Version 0.8.4
|
#### 0.8.5 candidate
|
||||||
|
|
||||||
|
* servers view
|
||||||
|
* identity modification
|
||||||
|
|
||||||
|
#### 0.8.4
|
||||||
|
|
||||||
* calendar view as separate gem
|
* calendar view as separate gem
|
||||||
* adding bluecloth for rendering markdown text
|
* adding bluecloth for rendering markdown text
|
||||||
|
|
||||||
#### Version 0.8.3
|
#### 0.8.3
|
||||||
|
|
||||||
* export, imports of contact
|
* export, imports of contact
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -1,6 +1,6 @@
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '~>3.0.7'
|
gem 'rails', '~>3.0.9'
|
||||||
|
|
||||||
gem 'mysql2' , '~>0.2.7'
|
gem 'mysql2' , '~>0.2.7'
|
||||||
gem 'will_paginate', '~> 3.0.beta'
|
gem 'will_paginate', '~> 3.0.beta'
|
||||||
|
|
|
@ -325,5 +325,8 @@ def content_for_sidebar
|
||||||
s
|
s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def boolean_answer(answer)
|
||||||
|
answer == true ? t(:true_answer,:scope=>:common) : t(:false_answer,:scope=>:common)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1,16 @@
|
||||||
module PrefsHelper
|
module PrefsHelper
|
||||||
|
def servers_table_header
|
||||||
|
html = ""
|
||||||
|
$defaults["servers_table_fields"].each do |f|
|
||||||
|
html << "<th>"
|
||||||
|
if params[:sort_field] == f
|
||||||
|
params[:sort_dir].nil? ? dir = 'desc' : dir = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
html << link_to(Server.human_attribute_name(f), {:controller => 'prefs',:action => 'servers',:sort_field => f,:sort_dir => dir}, {:class=>"header"})
|
||||||
|
html << "</th>"
|
||||||
|
end
|
||||||
|
html
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,6 +13,8 @@ msg_image_thumbnail_size: [128x128, 128x96, 192x192, 192x144, 256x256, 256x192]
|
||||||
contacts_table_fields: [nick, first_name, last_name, email, info]
|
contacts_table_fields: [nick, first_name, last_name, email, info]
|
||||||
contacts_per_page: 25
|
contacts_per_page: 25
|
||||||
|
|
||||||
|
servers_table_fields: [name, port, use_ssl, use_tls, for_imap, for_smtp, auth]
|
||||||
|
|
||||||
msgs_per_page: 20
|
msgs_per_page: 20
|
||||||
msgs_refresh_time: 300
|
msgs_refresh_time: 300
|
||||||
msgs_send_type: html
|
msgs_send_type: html
|
||||||
|
|
|
@ -17,6 +17,7 @@ pl:
|
||||||
record_invalid: Nieprawidłowy format danych
|
record_invalid: Nieprawidłowy format danych
|
||||||
models:
|
models:
|
||||||
contact: Kontakt
|
contact: Kontakt
|
||||||
|
server: Serwer
|
||||||
attributes:
|
attributes:
|
||||||
contact:
|
contact:
|
||||||
nick: Pseudonim
|
nick: Pseudonim
|
||||||
|
@ -47,6 +48,12 @@ pl:
|
||||||
last_name: Nazwisko
|
last_name: Nazwisko
|
||||||
server:
|
server:
|
||||||
name: Nazwa serwera
|
name: Nazwa serwera
|
||||||
|
port: Port
|
||||||
|
use_ssl: SSL?
|
||||||
|
use_tls: TLS?
|
||||||
|
for_imap: IMAP?
|
||||||
|
for_smtp: SMTP?
|
||||||
|
auth: Metoda autoryzacji
|
||||||
|
|
||||||
contact:
|
contact:
|
||||||
compose_to_selected: Napisz do wybranych
|
compose_to_selected: Napisz do wybranych
|
||||||
|
@ -175,6 +182,8 @@ pl:
|
||||||
current_version: Aktualna wersja
|
current_version: Aktualna wersja
|
||||||
|
|
||||||
common:
|
common:
|
||||||
|
false_answer: Nie
|
||||||
|
true_answer: Tak
|
||||||
file_format_error: Błędny format pliku
|
file_format_error: Błędny format pliku
|
||||||
no_tmp_dir: Brak katalogu tymczasowego
|
no_tmp_dir: Brak katalogu tymczasowego
|
||||||
must_be_unique: musi być unikalny
|
must_be_unique: musi być unikalny
|
||||||
|
|
9
themes/olive/views/prefs/_server.html.erb
Normal file
9
themes/olive/views/prefs/_server.html.erb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<td><%= check_box_tag "cids[]", server.id %></td>
|
||||||
|
<td nowrap="nowrap"><%= server.name %></td>
|
||||||
|
<td nowrap="nowrap"><%= server.port %></td>
|
||||||
|
<td nowrap="nowrap"><%= boolean_answer(server.use_ssl) %></td>
|
||||||
|
<td nowrap="nowrap"><%= boolean_answer(server.use_tls) %></td>
|
||||||
|
<td nowrap="nowrap"><%= boolean_answer(server.for_imap) %></td>
|
||||||
|
<td nowrap="nowrap"><%= boolean_answer(server.for_smtp) %></td>
|
||||||
|
<td nowrap="nowrap"><%= server.auth %></td>
|
||||||
|
<td nowrap="nowrap"> </td>
|
16
themes/olive/views/prefs/_servers_list.html.erb
Normal file
16
themes/olive/views/prefs/_servers_list.html.erb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th class="first"><input id="toggleall" class="checkbox toggle" type="checkbox" name="allbox"/></th>
|
||||||
|
<%= raw servers_table_header %>
|
||||||
|
<th class="last"></th>
|
||||||
|
</tr>
|
||||||
|
<% trclass = :even %>
|
||||||
|
<% @servers.each do |s| %>
|
||||||
|
<tr class="<%= trclass.to_s %>">
|
||||||
|
<%= render :partial => 'prefs/server', :object => s %>
|
||||||
|
</tr>
|
||||||
|
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -13,15 +13,10 @@
|
||||||
<div class="content"><div class="secondary-navigation">
|
<div class="content"><div class="secondary-navigation">
|
||||||
<%= raw prefs_navigation(:servers_tab) %>
|
<%= raw prefs_navigation(:servers_tab) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="inner"> <%= form_tag(prefs_update_servers_path,:name=>'prefs') %>
|
<div class="inner">
|
||||||
<div class="columns wat-cf">
|
<%= form_tag(prefs_update_servers_path,:name=>'prefs') %>
|
||||||
<div class="column left">
|
<%= render :partial => 'prefs/servers_list' %>
|
||||||
<%= render :partial => 'prefs/servers_left' %>
|
</form>
|
||||||
</div>
|
|
||||||
<div class="column right">
|
|
||||||
<%= render :partial => 'prefs/servers_right' %>
|
|
||||||
</div>
|
|
||||||
</div></form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue