repo
string | commit
string | message
string | diff
string |
---|---|---|---|
makevoid/voidtools
|
5da52b18b264f77363bf7a3474f12bbccadf3bc3
|
fixed view helpers
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index ff09c13..e633653 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,50 +1,50 @@
module Voidtools
module Sinatra
module ViewHelpers
- require 'voidtools/sinatra/tracking'
- include ::Tracking
+ # require 'voidtools/sinatra/tracking'
+ # include Voidtools::Tracking
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
{ type: "text/javascript", src: "/js/#{asset}.js" }
else
{ rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
def body_class
path = request.path.split("/")[1..2]
path = path.join(" ") unless path.nil?
request.path == "/" ? "home" : path
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
6fa5b68edafd6822c0d6c2b26819c92cf2216b72
|
forgot to require
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 9513671..bb6eb44 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,49 +1,50 @@
module Voidtools
module Sinatra
module ViewHelpers
+ require 'voidtools/sinatra/tracking'
include Voidtools::Tracking
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
{ type: "text/javascript", src: "/js/#{asset}.js" }
else
{ rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
def body_class
path = request.path.split("/")[1..2]
path = path.join(" ") unless path.nil?
request.path == "/" ? "home" : path
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
7a7c5f007da51a12b34a7ca11a76db6c4d945686
|
added some paginable doc and fixed pagination links
|
diff --git a/lib/voidtools/dm/paginable.rb b/lib/voidtools/dm/paginable.rb
index 24451da..da288cb 100644
--- a/lib/voidtools/dm/paginable.rb
+++ b/lib/voidtools/dm/paginable.rb
@@ -1,27 +1,59 @@
+# Paginable
+#
+# Usage:
+#
+# in your model add:
+# require 'voidtools/dm/paginable'
+# include Voidtools::Paginable
+#
+# in a controller (or similar):
+# Model.paginate(page: params[:page])
+#
+# in your view:
+# .pagination
+# pag:
+# - Model.pages.times do |i|
+# %a{ :href => "/path?page=#{i}" }= i+1
+#
+# (optional) in your model:
+# def self.per_page
+# 20
+# end
+#
+# sass:
+#
+# .pagination
+# margin: 10px 20px
+# a
+# padding: 3px 6px
+# background: #DDD
+# a:hover
+# background: #FFF
+
module Voidtools
module Paginable
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def x_page
defined?(per_page) ? per_page : 10
end
def paginate(options)
page = options[:page].to_i
options.delete :page
all( options.merge(limit: x_page, offset: x_page*page) )
end
def pages
- all.count/x_page
+ (all.count.to_f/x_page).ceil
end
end
end
end
\ No newline at end of file
diff --git a/lib/voidtools/sinatra/tracking.rb b/lib/voidtools/sinatra/tracking.rb
index 9fd0df1..8d65ce7 100644
--- a/lib/voidtools/sinatra/tracking.rb
+++ b/lib/voidtools/sinatra/tracking.rb
@@ -1,74 +1,83 @@
# Voidtools::Tracking
+# ---------------------------------------------
+
+# Setup:
+#
+# put these lines in your app_helper.rb:
+#
+# require 'voidtools/sinatra/tracking'
+# include Voidtools::Tracking
+
# Usage:
#
# :javascript
# #{crazyegg}
# #{gauges("id")}
module Voidtools
module Tracking
def track_run(&block)
if defined?(Rails)
yield if Rails.env != "development"
else
yield if ENV["RACK_ENV"] != "development"
end
end
def analytics(id, domain) # before the end of head tag
track_run do
<<-FUN
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{id}']);
//_gaq.push(['_setDomainName', '.#{domain}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
FUN
end
end
def mixpanel
track_run do
# ...
end
end
def crazyegg # before the end of body tag
track_run do
<<-FUN
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName('script')[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
FUN
end
end
def gauges(id) # before the end of body tag
track_run do
<<-FUN
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '#{id}');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
FUN
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
74b01064836b585cdb9dab32709901c86209be9c
|
check if env is not dev
|
diff --git a/lib/voidtools/sinatra/tracking.rb b/lib/voidtools/sinatra/tracking.rb
index b1d7cf9..9fd0df1 100644
--- a/lib/voidtools/sinatra/tracking.rb
+++ b/lib/voidtools/sinatra/tracking.rb
@@ -1,48 +1,74 @@
+# Voidtools::Tracking
+
+# Usage:
+#
+# :javascript
+# #{crazyegg}
+# #{gauges("id")}
+
+
module Voidtools
module Tracking
+
+ def track_run(&block)
+ if defined?(Rails)
+ yield if Rails.env != "development"
+ else
+ yield if ENV["RACK_ENV"] != "development"
+ end
+ end
+
def analytics(id, domain) # before the end of head tag
- <<-FUN
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '#{id}']);
- //_gaq.push(['_setDomainName', '.#{domain}']);
- _gaq.push(['_trackPageview']);
+ track_run do
+ <<-FUN
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '#{id}']);
+ //_gaq.push(['_setDomainName', '.#{domain}']);
+ _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
FUN
-
+ end
end
def mixpanel
- # ...
+ track_run do
+ # ...
+ end
end
def crazyegg # before the end of body tag
- <<-FUN
- setTimeout(function(){var a=document.createElement("script");
- var b=document.getElementsByTagName('script')[0];
- a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
- a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
+
+ track_run do
+ <<-FUN
+ setTimeout(function(){var a=document.createElement("script");
+ var b=document.getElementsByTagName('script')[0];
+ a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
+ a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
FUN
+ end
end
def gauges(id) # before the end of body tag
- <<-FUN
- (function() {
- var t = document.createElement('script');
- t.type = 'text/javascript';
- t.async = true;
- t.id = 'gauges-tracker';
- t.setAttribute('data-site-id', '#{id}');
- t.src = '//secure.gaug.es/track.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(t, s);
- })();
+ track_run do
+ <<-FUN
+ (function() {
+ var t = document.createElement('script');
+ t.type = 'text/javascript';
+ t.async = true;
+ t.id = 'gauges-tracker';
+ t.setAttribute('data-site-id', '#{id}');
+ t.src = '//secure.gaug.es/track.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(t, s);
+ })();
FUN
+ end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
63dcc8e47ca247d16d6cb4458be5b2d9558d6673
|
bad quote
|
diff --git a/lib/voidtools/sinatra/tracking.rb b/lib/voidtools/sinatra/tracking.rb
index efe2204..b1d7cf9 100644
--- a/lib/voidtools/sinatra/tracking.rb
+++ b/lib/voidtools/sinatra/tracking.rb
@@ -1,48 +1,48 @@
module Voidtools
module Tracking
def analytics(id, domain) # before the end of head tag
<<-FUN
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{id}']);
//_gaq.push(['_setDomainName', '.#{domain}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
FUN
end
def mixpanel
# ...
end
def crazyegg # before the end of body tag
<<-FUN
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName('script')[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
FUN
end
def gauges(id) # before the end of body tag
<<-FUN
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '#{id}');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
- })();"
+ })();
FUN
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
a0c1aeed39796c088f40c54e4c7116a1b008823d
|
added tracking helpers even for rails3
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index 2bb18dd..024c943 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,33 +1,35 @@
module Voidtools
# namespace our plugin and inherit from Rails::Railtie
# to get our plugin into the initialization process
if defined?(Rails)
class Railtie < Rails::Railtie
# configure our plugin on boot. other extension points such
# as configuration, rake tasks, etc, are also available
initializer "voidtools.initialize" do |app|
# subscribe to all rails notifications: controllers, AR, etc.
# ActiveSupport::Notifications.subscribe do |*args|
# event = ActiveSupport::Notifications::Event.new(*args)
# puts "Voidrails - got notification: #{event.inspect}"
# end
require 'voidtools/dm/form_helpers'
+ require 'voidtools/sinatra/tracking'
ActiveSupport.on_load(:action_view) do
module ApplicationHelper
include Voidtools::FormHelpers
+ include Voidtools::Tracking
end
end
# require 'voidtools/dm/name_url'
# require 'voidtools/dm/paginable'
end
end
end
if defined?(Sinatra)
path = File.expand_path "../", __FILE__
require "#{path}/voidtools/sinatra/sinatra"
end
end
diff --git a/lib/voidtools/sinatra/tracking.rb b/lib/voidtools/sinatra/tracking.rb
index 246f743..efe2204 100644
--- a/lib/voidtools/sinatra/tracking.rb
+++ b/lib/voidtools/sinatra/tracking.rb
@@ -1,50 +1,48 @@
module Voidtools
-module Sinatra
module Tracking
def analytics(id, domain) # before the end of head tag
<<-FUN
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{id}']);
//_gaq.push(['_setDomainName', '.#{domain}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
FUN
end
def mixpanel
# ...
end
def crazyegg # before the end of body tag
<<-FUN
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName('script')[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
FUN
end
def gauges(id) # before the end of body tag
<<-FUN
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '#{id}');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();"
FUN
end
end
-end
end
\ No newline at end of file
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index a2243ee..e1aae43 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,49 +1,49 @@
module Voidtools
module Sinatra
module ViewHelpers
- include Tracking
+ include ::Tracking
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
{ type: "text/javascript", src: "/js/#{asset}.js" }
else
{ rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
def body_class
path = request.path.split("/")[1..2]
path = path.join(" ") unless path.nil?
request.path == "/" ? "home" : path
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
b511a4ab7a099ee9acc69bb68f03ee2208c30a1c
|
added tracking helpers
|
diff --git a/lib/voidtools/sinatra/tracking.rb b/lib/voidtools/sinatra/tracking.rb
new file mode 100644
index 0000000..246f743
--- /dev/null
+++ b/lib/voidtools/sinatra/tracking.rb
@@ -0,0 +1,50 @@
+module Voidtools
+module Sinatra
+module Tracking
+ def analytics(id, domain) # before the end of head tag
+ <<-FUN
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '#{id}']);
+ //_gaq.push(['_setDomainName', '.#{domain}']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+FUN
+
+ end
+
+ def mixpanel
+ # ...
+ end
+
+ def crazyegg # before the end of body tag
+ <<-FUN
+ setTimeout(function(){var a=document.createElement("script");
+ var b=document.getElementsByTagName('script')[0];
+ a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/5433.js";
+ a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
+FUN
+
+ end
+
+ def gauges(id) # before the end of body tag
+ <<-FUN
+ (function() {
+ var t = document.createElement('script');
+ t.type = 'text/javascript';
+ t.async = true;
+ t.id = 'gauges-tracker';
+ t.setAttribute('data-site-id', '#{id}');
+ t.src = '//secure.gaug.es/track.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(t, s);
+ })();"
+FUN
+ end
+end
+end
+end
\ No newline at end of file
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 932bd5f..a2243ee 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,46 +1,49 @@
module Voidtools
module Sinatra
module ViewHelpers
+
+ include Tracking
+
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
{ type: "text/javascript", src: "/js/#{asset}.js" }
else
{ rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
def body_class
path = request.path.split("/")[1..2]
path = path.join(" ") unless path.nil?
request.path == "/" ? "home" : path
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
61dcae09580177b14815361096a6bd9674095526
|
added body_class params to css helper
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 2ca8899..932bd5f 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,40 +1,46 @@
module Voidtools
module Sinatra
module ViewHelpers
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
{ type: "text/javascript", src: "/js/#{asset}.js" }
else
{ rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
+
+ def body_class
+ path = request.path.split("/")[1..2]
+ path = path.join(" ") unless path.nil?
+ request.path == "/" ? "home" : path
+ end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
2e6d24a7c37e383fbd8b055fc71148aeb238ad06
|
fixed pagination api
|
diff --git a/README.md b/README.md
index 765c8f6..2c5df9c 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,32 @@
# Voidtools
-#### growing toolset for Rails 3 dm+jquery+haml+warden setup flavored with:
-
-
-### building the gem locally and installing it in one line (for trying things and stuff):
-
-gem build voidtools.gemspec; gem install voidtools-0.2.1.gem
-
+#### growing toolset for Rails 3 and Sinatra with DataMapper and HAML class and helper modules
---
### DataMapper
-- `error_messages_for`
-
-### Haml
-- soon...
+- form helpers: error_messages_for
+- name url
+- pagination
-### Warden, Devise
-- soon...
+### Sinatra
+- view helpers
+ - link_to
+ - image tag
+ - include_assets (include_js, include_css)
note: ruby 1.9 required
## DataMapper
### error_messages_for
in your form view:
`error_messages_for :resource`
or
`error_messages_for @resource`
### Build & install
-gem build voidtools.gemspec; gem install voidtools-0.1.2.gem
\ No newline at end of file
+gem build voidtools.gemspec; gem install voidtools-0.2.3.gem
diff --git a/lib/voidtools/dm/form_helpers.rb b/lib/voidtools/dm/form_helpers.rb
index 4574731..25cf3b7 100644
--- a/lib/voidtools/dm/form_helpers.rb
+++ b/lib/voidtools/dm/form_helpers.rb
@@ -1,17 +1,19 @@
module Voidtools
module FormHelpers
def error_messages_for(entity)
obj = if entity.is_a? (Symbol) || entity.is_a?(String)
instance_variable_get("@#{entity.to_s}")
else
entity
end
return nil if obj.errors.map{ |e| e } == []
- lis = "".html_safe
- obj.errors.map{ |e| lis << content_tag( :li, e[0].to_s) }
- content_tag( :ul, lis, class: "error_messages")
+ haml_tag :ul, { class: "error_messages" } do
+ obj.errors.map do |err|
+ haml_tag(:li){ haml_concat err[0].to_s }
+ end
+ end
end
end
end
\ No newline at end of file
diff --git a/lib/voidtools/dm/paginable.rb b/lib/voidtools/dm/paginable.rb
index 4a99c01..24451da 100644
--- a/lib/voidtools/dm/paginable.rb
+++ b/lib/voidtools/dm/paginable.rb
@@ -1,26 +1,27 @@
module Voidtools
module Paginable
- PER_PAGE = 70
-
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
+ def x_page
+ defined?(per_page) ? per_page : 10
+ end
+
def paginate(options)
page = options[:page].to_i
options.delete :page
- all( options.merge(limit: PER_PAGE, offset: PER_PAGE*page) )
+ all( options.merge(limit: x_page, offset: x_page*page) )
end
def pages
- all.count/PER_PAGE
+ all.count/x_page
end
-
end
end
end
\ No newline at end of file
diff --git a/lib/voidtools/moka/README.md b/lib/voidtools/moka/README.md
deleted file mode 100644
index 7110d1c..0000000
--- a/lib/voidtools/moka/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# automate coffeescript generation in sinatra
-
- require "moka"
-
- get '/' do
- regenerate_coffescripts
- haml :index
- end
\ No newline at end of file
diff --git a/lib/voidtools/version.rb b/lib/voidtools/version.rb
index 5e933a1..2427798 100644
--- a/lib/voidtools/version.rb
+++ b/lib/voidtools/version.rb
@@ -1,3 +1,3 @@
module Voidtools
- VERSION = "0.2.2"
+ VERSION = "0.2.3"
end
\ No newline at end of file
|
makevoid/voidtools
|
d09587c6fafb124996242b20bc9cb651b792538c
|
added defaults paths for css and js
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index f2d4658..2ca8899 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,40 +1,40 @@
module Voidtools
module Sinatra
module ViewHelpers
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
def include_assets(type, assets)
type_js = type == "js"
tag = type_js ? "script" : "link"
[assets].flatten.each do |asset|
options = if type_js
- { type: "text/javascript", src: asset }
+ { type: "text/javascript", src: "/js/#{asset}.js" }
else
- { rel: "stylesheet", href: asset }
+ { rel: "stylesheet", href: "/css/#{asset}.css" }
end
haml_tag tag, options
end
end
def include_js(assets)
include_assets "js", assets
end
def include_css(assets)
include_assets "css", assets
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
282d31a77d79ff95e2b08d1f6801530f229d3a0e
|
added inclued_js and include_css for sinatra
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index acfa340..f2d4658 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,19 +1,40 @@
module Voidtools
module Sinatra
module ViewHelpers
def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
options = options.map do |key, value|
" #{key}='#{value}'"
end.join(" ")
haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
+
+ def include_assets(type, assets)
+ type_js = type == "js"
+ tag = type_js ? "script" : "link"
+ [assets].flatten.each do |asset|
+ options = if type_js
+ { type: "text/javascript", src: asset }
+ else
+ { rel: "stylesheet", href: asset }
+ end
+ haml_tag tag, options
+ end
+ end
+
+ def include_js(assets)
+ include_assets "js", assets
+ end
+
+ def include_css(assets)
+ include_assets "css", assets
+ end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
eb2a9e29a93f80ac2f73615925b6db4e68c1bcda
|
added deploy and concept
|
diff --git a/lib/voidtools/cap/deploy.rb b/lib/voidtools/cap/deploy.rb
new file mode 100644
index 0000000..69f3cff
--- /dev/null
+++ b/lib/voidtools/cap/deploy.rb
@@ -0,0 +1,152 @@
+
+set :application, "thorrents"
+
+#set :domain, "krikri.makevoid.com"
+set :domain, "ovh.makevoid.com"
+
+# git
+
+# #set :repository, "svn://#{domain}/svn/#{application}"
+# #default_run_options[:pty] = true # Must be set for the password prompt from git to work
+set :repository, "git://github.com/makevoid/thorrents.git" # public
+
+set :scm, "git"
+set :branch, "master"
+set :deploy_via, :remote_cache
+
+set :password, File.read("/Users/makevoid/.password").strip.gsub(/33/, '')
+
+
+set :user, "www-data"
+
+set :use_sudo, false
+set :deploy_to, "/www/#{application}"
+
+
+
+# set :scm_username, "makevoid"
+# set :scm_password, File.read("/home/www-data/.password").strip
+
+role :app, domain
+role :web, domain
+role :db, domain, :primary => true
+
+
+
+
+after :deploy, "deploy:cleanup"
+#after :deploy, "db:seeds"
+
+namespace :deploy do
+
+ desc "Restart Application"
+ task :restart, :roles => :app do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+
+end
+
+namespace :bundle do
+ desc "Install gems with bundler"
+ task :install do
+ run "cd #{current_path}; bundle install --relock"
+ end
+
+ desc "Commit, deploy and install"
+ task :installscom do
+ `svn commit -m ''`
+ `cap deploy`
+ `cap bundle:install`
+ end
+end
+
+# ...
+
+namespace :bundler do
+ task :create_symlink, :roles => :app do
+ shared_dir = File.join(shared_path, 'bundle')
+ release_dir = File.join(current_release, '.bundle')
+ run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}")
+ end
+
+ task :bundle_new_release, :roles => :app do
+ bundler.create_symlink
+ run "cd #{release_path} && bundle install --without test"
+ end
+
+ task :lock, :roles => :app do
+ run "cd #{current_release} && bundle lock;"
+ end
+
+ task :unlock, :roles => :app do
+ run "cd #{current_release} && bundle unlock;"
+ end
+end
+
+# HOOKS
+after "deploy:update_code" do
+ bundler.bundle_new_release
+ # ...
+end
+
+R_ENV = "RACK_ENV"
+
+namespace :scraper do
+ desc "Run the scraper"
+ task :scrape do
+ run "cd #{current_path}; #{R_ENV}=production bundle exec rake scraper:scrape --trace"
+ end
+end
+
+
+namespace :db do
+ desc "Create database"
+ task :create do
+ run "mysql -u root --password=#{password} -e 'CREATE DATABASE IF NOT EXISTS #{application}_production;'"
+ end
+
+ desc "Seed database"
+ task :seeds do
+ run "cd #{current_path}; #{R_ENV}=production rake db:seeds"
+ end
+
+ desc "Migrate database"
+ task :automigrate do
+ run "cd #{current_path}; #{R_ENV}=production rake db:automigrate --trace"
+ end
+
+ desc "Send the local db to production server"
+ task :toprod do
+ # `rake db:seeds`
+ `mysqldump -u root #{application}_development > db/#{application}_development.sql`
+ upload "db/#{application}_development.sql", "#{current_path}/db", :via => :scp
+ run "mysql -u root --password=#{password} #{application}_production < #{current_path}/db/#{application}_development.sql"
+ end
+
+ desc "Get the remote copy of production db"
+ task :todev do
+ run "mysqldump -u root --password=#{password} #{application}_production > #{current_path}/db/#{application}_production.sql"
+ download "#{current_path}/db/#{application}_production.sql", "db/#{application}_production.sql"
+ local_path = `pwd`.strip
+ `mysql -u root #{application}_development < #{local_path}/db/#{application}_production.sql`
+
+
+ desc "Get the remote copy of production db [option: BACKUP]"
+ task :todev do
+ run "mysqldump -u root --password=#{password} #{application}_production > #{current_path}/db/#{application}_production.sql"
+ download "#{current_path}/db/#{application}_production.sql", "db/#{application}_production.sql"
+ local_path = `pwd`.strip
+ `mysql -u root #{application}_development < #{local_path}/db/#{application}_production.sql`
+
+ t = Time.now
+ file = "#{application}_production_#{t.strftime("%Y_%m_%d")}.sql"
+ `mv db/#{application}_production.sql db/#{file}`
+
+ if ENV["BACKUP"] != "" || ENV["BACKUP"].nil?
+ `cp db/#{file} ~/db_backups/`
+ puts "Backup saved on ~/db_backups/#{file}"
+ end
+ end
+ end
+end
+
diff --git a/lib/voidtools/moka/README.md b/lib/voidtools/moka/README.md
new file mode 100644
index 0000000..7110d1c
--- /dev/null
+++ b/lib/voidtools/moka/README.md
@@ -0,0 +1,8 @@
+# automate coffeescript generation in sinatra
+
+ require "moka"
+
+ get '/' do
+ regenerate_coffescripts
+ haml :index
+ end
\ No newline at end of file
|
makevoid/voidtools
|
0dcc0007492b7bb14f398839ae4c7d0e8a592a19
|
generate method broke in two (really)
|
diff --git a/lib/voidtools/dm/name_url.rb b/lib/voidtools/dm/name_url.rb
index 314d703..dd860ff 100644
--- a/lib/voidtools/dm/name_url.rb
+++ b/lib/voidtools/dm/name_url.rb
@@ -1,27 +1,27 @@
module Voidtools
module NameUrl
- def generate_url_from_name(name)
+ def generate_url_from_name
name.gsub(/\./, '').gsub(/'|"/, ' ').gsub(/\s+/, '_').gsub(/_-_/, '_').downcase
end
# TODO: try to embed this into the model
# before :create do
# self.name_url = generate_url_from_name
# end
def generate_name_url
- nurl = generate_url_from_name name
+ nurl = generate_url_from_name
update(name_url: nurl)
end
end
class NameUrler
def self.generate(klass, options={})
klass.all(options).each do |model|
model.generate_name_url
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
f53fe6e906f5541ec531258ab97ad174c30de93d
|
generate method broke in two
|
diff --git a/lib/voidtools/dm/name_url.rb b/lib/voidtools/dm/name_url.rb
index 7747aa0..314d703 100644
--- a/lib/voidtools/dm/name_url.rb
+++ b/lib/voidtools/dm/name_url.rb
@@ -1,16 +1,27 @@
module Voidtools
module NameUrl
+ def generate_url_from_name(name)
+ name.gsub(/\./, '').gsub(/'|"/, ' ').gsub(/\s+/, '_').gsub(/_-_/, '_').downcase
+ end
+
+ # TODO: try to embed this into the model
+
+ # before :create do
+ # self.name_url = generate_url_from_name
+ # end
+
+
def generate_name_url
- nurl = name.gsub(/\./, '').gsub(/'|"/, ' ').gsub(/\s+/, '_').gsub(/_-_/, '_').downcase
+ nurl = generate_url_from_name name
update(name_url: nurl)
end
end
class NameUrler
def self.generate(klass, options={})
klass.all(options).each do |model|
model.generate_name_url
end
end
end
end
\ No newline at end of file
diff --git a/lib/voidtools/version.rb b/lib/voidtools/version.rb
index 3f16aad..5e933a1 100644
--- a/lib/voidtools/version.rb
+++ b/lib/voidtools/version.rb
@@ -1,3 +1,3 @@
module Voidtools
- VERSION = "0.2.1"
+ VERSION = "0.2.2"
end
\ No newline at end of file
|
makevoid/voidtools
|
86ce124aac85bf3c9863ab68d1884098aee54a26
|
added dm not_found controller mixin
|
diff --git a/README.md b/README.md
index e23a890..765c8f6 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,36 @@
# Voidtools
#### growing toolset for Rails 3 dm+jquery+haml+warden setup flavored with:
+
+### building the gem locally and installing it in one line (for trying things and stuff):
+
+gem build voidtools.gemspec; gem install voidtools-0.2.1.gem
+
+
---
### DataMapper
- `error_messages_for`
### Haml
- soon...
### Warden, Devise
- soon...
note: ruby 1.9 required
## DataMapper
### error_messages_for
in your form view:
`error_messages_for :resource`
or
`error_messages_for @resource`
### Build & install
gem build voidtools.gemspec; gem install voidtools-0.1.2.gem
\ No newline at end of file
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..ac2ec97
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,5 @@
+add datamapper feature
+
+Model.truncate
+
+repository.adapter.execute "TRUNCATE TABLE table_name"
\ No newline at end of file
diff --git a/lib/voidtools/rails/app_mixin.rb b/lib/voidtools/rails/app_mixin.rb
new file mode 100644
index 0000000..17e8f9b
--- /dev/null
+++ b/lib/voidtools/rails/app_mixin.rb
@@ -0,0 +1,8 @@
+module Voidtools
+ module AppMixin
+ def not_found
+ #render template: "exceptions/not_found", status: :not_found
+ render file: "/public/404.html", layout: false, status: 404
+ end
+ end
+end
\ No newline at end of file
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 9609fb2..acfa340 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,16 +1,19 @@
module Voidtools
module Sinatra
module ViewHelpers
- def link_to(label, path="javascript:void(0)")
+ def link_to(label, path="javascript:void(0)", options={})
# haml_tag :a, { href: path } do
# haml_concat label
# end
- haml_concat "<a href='#{path}'>#{label}</a>"
+ options = options.map do |key, value|
+ " #{key}='#{value}'"
+ end.join(" ")
+ haml_concat "<a href='#{path}'#{options}>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
fbbf788cf84adab90af1f2650c9605758daa8749
|
version bump
|
diff --git a/lib/voidtools/version.rb b/lib/voidtools/version.rb
index bcc5dc5..3f16aad 100644
--- a/lib/voidtools/version.rb
+++ b/lib/voidtools/version.rb
@@ -1,3 +1,3 @@
module Voidtools
- VERSION = "0.2.0"
+ VERSION = "0.2.1"
end
\ No newline at end of file
|
makevoid/voidtools
|
d24d7342712d908f5b371c9bf486779a4428f256
|
link_to changed: second parameter is now optional
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index e4e1e1f..9609fb2 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,16 +1,16 @@
module Voidtools
module Sinatra
module ViewHelpers
- def link_to(label, path)
+ def link_to(label, path="javascript:void(0)")
# haml_tag :a, { href: path } do
# haml_concat label
# end
haml_concat "<a href='#{path}'>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
f551a5c341878aaecf102248c720ab2250e9c804
|
newline fix
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 77362ba..e4e1e1f 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,15 +1,16 @@
module Voidtools
module Sinatra
module ViewHelpers
def link_to(label, path)
- haml_tag :a, { href: path } do
- haml_concat label
- end
+ # haml_tag :a, { href: path } do
+ # haml_concat label
+ # end
+ haml_concat "<a href='#{path}'>#{label}</a>"
end
def image_tag(url, options={})
haml_tag :img, options.merge(src: url)
end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
7d9ebb90c8d8629382696f00afbbf8b01ec0b69e
|
rolling back
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index 9d978c7..2bb18dd 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,37 +1,33 @@
-if defined?(Rails)
- module Voidtools
- # namespace our plugin and inherit from Rails::Railtie
- # to get our plugin into the initialization process
-
+module Voidtools
+
+ # namespace our plugin and inherit from Rails::Railtie
+ # to get our plugin into the initialization process
+ if defined?(Rails)
class Railtie < Rails::Railtie
-
+
# configure our plugin on boot. other extension points such
# as configuration, rake tasks, etc, are also available
initializer "voidtools.initialize" do |app|
-
+
# subscribe to all rails notifications: controllers, AR, etc.
# ActiveSupport::Notifications.subscribe do |*args|
# event = ActiveSupport::Notifications::Event.new(*args)
# puts "Voidrails - got notification: #{event.inspect}"
# end
require 'voidtools/dm/form_helpers'
ActiveSupport.on_load(:action_view) do
module ApplicationHelper
include Voidtools::FormHelpers
end
end
# require 'voidtools/dm/name_url'
# require 'voidtools/dm/paginable'
end
end
-
end
-end
-
-if defined?(Sinatra)
- module Voidtools
+ if defined?(Sinatra)
path = File.expand_path "../", __FILE__
require "#{path}/voidtools/sinatra/sinatra"
end
-end
\ No newline at end of file
+end
|
makevoid/voidtools
|
fd73d3d3408ccafca1f2d72fe29836812c923b76
|
changes
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index 2bb18dd..9d978c7 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,33 +1,37 @@
-module Voidtools
-
- # namespace our plugin and inherit from Rails::Railtie
- # to get our plugin into the initialization process
- if defined?(Rails)
+if defined?(Rails)
+ module Voidtools
+ # namespace our plugin and inherit from Rails::Railtie
+ # to get our plugin into the initialization process
+
class Railtie < Rails::Railtie
-
+
# configure our plugin on boot. other extension points such
# as configuration, rake tasks, etc, are also available
initializer "voidtools.initialize" do |app|
-
+
# subscribe to all rails notifications: controllers, AR, etc.
# ActiveSupport::Notifications.subscribe do |*args|
# event = ActiveSupport::Notifications::Event.new(*args)
# puts "Voidrails - got notification: #{event.inspect}"
# end
require 'voidtools/dm/form_helpers'
ActiveSupport.on_load(:action_view) do
module ApplicationHelper
include Voidtools::FormHelpers
end
end
# require 'voidtools/dm/name_url'
# require 'voidtools/dm/paginable'
end
end
+
end
+end
+
- if defined?(Sinatra)
+if defined?(Sinatra)
+ module Voidtools
path = File.expand_path "../", __FILE__
require "#{path}/voidtools/sinatra/sinatra"
end
-end
+end
\ No newline at end of file
|
makevoid/voidtools
|
0a5c31c54e8124b834f02a3c7b51c4bd502822ee
|
version bump
|
diff --git a/lib/voidtools/version.rb b/lib/voidtools/version.rb
index e3e5c22..bcc5dc5 100644
--- a/lib/voidtools/version.rb
+++ b/lib/voidtools/version.rb
@@ -1,3 +1,3 @@
module Voidtools
- VERSION = "0.1.2"
+ VERSION = "0.2.0"
end
\ No newline at end of file
|
makevoid/voidtools
|
d9533c3b297cf71b892af24df287fbb8866d2b31
|
voidtools 4 sinatra fixed
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index b0ec0c4..2bb18dd 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,29 +1,33 @@
module Voidtools
# namespace our plugin and inherit from Rails::Railtie
# to get our plugin into the initialization process
if defined?(Rails)
class Railtie < Rails::Railtie
# configure our plugin on boot. other extension points such
# as configuration, rake tasks, etc, are also available
initializer "voidtools.initialize" do |app|
# subscribe to all rails notifications: controllers, AR, etc.
# ActiveSupport::Notifications.subscribe do |*args|
# event = ActiveSupport::Notifications::Event.new(*args)
# puts "Voidrails - got notification: #{event.inspect}"
# end
require 'voidtools/dm/form_helpers'
ActiveSupport.on_load(:action_view) do
module ApplicationHelper
include Voidtools::FormHelpers
end
end
# require 'voidtools/dm/name_url'
# require 'voidtools/dm/paginable'
end
end
end
+ if defined?(Sinatra)
+ path = File.expand_path "../", __FILE__
+ require "#{path}/voidtools/sinatra/sinatra"
+ end
end
diff --git a/lib/voidtools/sinatra/sinatra.rb b/lib/voidtools/sinatra/sinatra.rb
new file mode 100644
index 0000000..bc76b43
--- /dev/null
+++ b/lib/voidtools/sinatra/sinatra.rb
@@ -0,0 +1,2 @@
+path = File.expand_path "../", __FILE__
+require "#{path}/view_helpers"
\ No newline at end of file
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
index 7b97578..77362ba 100644
--- a/lib/voidtools/sinatra/view_helpers.rb
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -1,13 +1,15 @@
-module VoidTools
- module ViewHelpers
- def link_to(label, path)
- haml_tag :a, { href: path } do
- haml_concat label
+module Voidtools
+ module Sinatra
+ module ViewHelpers
+ def link_to(label, path)
+ haml_tag :a, { href: path } do
+ haml_concat label
+ end
end
- end
- def image_tag(url, options={})
- haml_tag :img, options.merge(src: url)
+ def image_tag(url, options={})
+ haml_tag :img, options.merge(src: url)
+ end
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
fb7af87a35547ddcf5cebd624d072b2a0ce81f95
|
check if is a rails app
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index 1d8b6b1..b0ec0c4 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,27 +1,29 @@
module Voidtools
# namespace our plugin and inherit from Rails::Railtie
# to get our plugin into the initialization process
- class Railtie < Rails::Railtie
+ if defined?(Rails)
+ class Railtie < Rails::Railtie
- # configure our plugin on boot. other extension points such
- # as configuration, rake tasks, etc, are also available
- initializer "voidtools.initialize" do |app|
+ # configure our plugin on boot. other extension points such
+ # as configuration, rake tasks, etc, are also available
+ initializer "voidtools.initialize" do |app|
- # subscribe to all rails notifications: controllers, AR, etc.
- # ActiveSupport::Notifications.subscribe do |*args|
- # event = ActiveSupport::Notifications::Event.new(*args)
- # puts "Voidrails - got notification: #{event.inspect}"
- # end
- require 'voidtools/dm/form_helpers'
- ActiveSupport.on_load(:action_view) do
- module ApplicationHelper
- include Voidtools::FormHelpers
- end
+ # subscribe to all rails notifications: controllers, AR, etc.
+ # ActiveSupport::Notifications.subscribe do |*args|
+ # event = ActiveSupport::Notifications::Event.new(*args)
+ # puts "Voidrails - got notification: #{event.inspect}"
+ # end
+ require 'voidtools/dm/form_helpers'
+ ActiveSupport.on_load(:action_view) do
+ module ApplicationHelper
+ include Voidtools::FormHelpers
+ end
+ end
+ # require 'voidtools/dm/name_url'
+ # require 'voidtools/dm/paginable'
end
- # require 'voidtools/dm/name_url'
- # require 'voidtools/dm/paginable'
end
end
end
|
makevoid/voidtools
|
9980b689b52f580383495d68d4b1c5549427f9cf
|
added view helpers for sinatra
|
diff --git a/lib/voidtools/sinatra/view_helpers.rb b/lib/voidtools/sinatra/view_helpers.rb
new file mode 100644
index 0000000..7b97578
--- /dev/null
+++ b/lib/voidtools/sinatra/view_helpers.rb
@@ -0,0 +1,13 @@
+module VoidTools
+ module ViewHelpers
+ def link_to(label, path)
+ haml_tag :a, { href: path } do
+ haml_concat label
+ end
+ end
+
+ def image_tag(url, options={})
+ haml_tag :img, options.merge(src: url)
+ end
+ end
+end
\ No newline at end of file
|
makevoid/voidtools
|
141e3485f5438b26378ffa09a6dca1095437b877
|
renamed datamapper to dm
|
diff --git a/lib/voidtools.rb b/lib/voidtools.rb
index 505e2e4..a8a001f 100644
--- a/lib/voidtools.rb
+++ b/lib/voidtools.rb
@@ -1,25 +1,25 @@
module Voidtools
# namespace our plugin and inherit from Rails::Railtie
# to get our plugin into the initialization process
class Railtie < Rails::Railtie
# configure our plugin on boot. other extension points such
# as configuration, rake tasks, etc, are also available
initializer "voidtools.initialize" do |app|
# subscribe to all rails notifications: controllers, AR, etc.
# ActiveSupport::Notifications.subscribe do |*args|
# event = ActiveSupport::Notifications::Event.new(*args)
# puts "Voidrails - got notification: #{event.inspect}"
# end
# ActiveSupport.on_load(:action_view) do
# # module ApplicationHelper
# # include FormHelpers
# # end
# end
- require 'voidtools/datamapper/form_helpers'
+ require 'voidtools/dm/form_helpers'
end
end
end
diff --git a/lib/voidtools/dm/form_helpers.rb b/lib/voidtools/dm/form_helpers.rb
new file mode 100644
index 0000000..4574731
--- /dev/null
+++ b/lib/voidtools/dm/form_helpers.rb
@@ -0,0 +1,17 @@
+module Voidtools
+ module FormHelpers
+
+ def error_messages_for(entity)
+ obj = if entity.is_a? (Symbol) || entity.is_a?(String)
+ instance_variable_get("@#{entity.to_s}")
+ else
+ entity
+ end
+ return nil if obj.errors.map{ |e| e } == []
+ lis = "".html_safe
+ obj.errors.map{ |e| lis << content_tag( :li, e[0].to_s) }
+ content_tag( :ul, lis, class: "error_messages")
+ end
+
+ end
+end
\ No newline at end of file
diff --git a/lib/voidtools/dm/name_url.rb b/lib/voidtools/dm/name_url.rb
new file mode 100644
index 0000000..cf9d391
--- /dev/null
+++ b/lib/voidtools/dm/name_url.rb
@@ -0,0 +1,14 @@
+module NameUrl
+ def generate_name_url
+ nurl = name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
+ update(name_url: nurl)
+ end
+end
+
+class NameUrler
+ def generate(klass, options={})
+ klass.all(options).each do |model|
+ model.generate_name_url
+ end
+ end
+end
\ No newline at end of file
diff --git a/lib/voidtools/dm/paginable.rb b/lib/voidtools/dm/paginable.rb
new file mode 100644
index 0000000..60d9a45
--- /dev/null
+++ b/lib/voidtools/dm/paginable.rb
@@ -0,0 +1,23 @@
+module Paginable
+
+ PER_PAGE = 70
+
+ def self.included(base)
+ base.send :extend, ClassMethods
+ end
+
+ module ClassMethods
+ def paginate(options)
+ page = options[:page].to_i
+ options.delete :page
+ all( options.merge(limit: PER_PAGE, offset: PER_PAGE*page) )
+ end
+
+ def pages
+ all.count/PER_PAGE
+ end
+
+ end
+
+end
+
|
makevoid/voidtools
|
787e1f23a15663da3382283e5216fca0c0b106fc
|
housekeeping
|
diff --git a/lib/voidtools/version.rb b/lib/voidtools/version.rb
index d8984e4..e3e5c22 100644
--- a/lib/voidtools/version.rb
+++ b/lib/voidtools/version.rb
@@ -1,3 +1,3 @@
module Voidtools
- VERSION = "0.1"
+ VERSION = "0.1.2"
end
\ No newline at end of file
diff --git a/voidtools-0.1.gem b/voidtools-0.1.gem
deleted file mode 100644
index 7d3d925..0000000
Binary files a/voidtools-0.1.gem and /dev/null differ
|
makevoid/voidtools
|
9b471b9262c1432a112c870987b58809f5b1dd55
|
name url
|
diff --git a/lib/voidtools/datamapper/name_url.rb b/lib/voidtools/datamapper/name_url.rb
index cb15b24..cf9d391 100644
--- a/lib/voidtools/datamapper/name_url.rb
+++ b/lib/voidtools/datamapper/name_url.rb
@@ -1,14 +1,14 @@
module NameUrl
def generate_name_url
- name_url = name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
- update(name_url: name_url)
+ nurl = name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
+ update(name_url: nurl)
end
end
class NameUrler
def generate(klass, options={})
klass.all(options).each do |model|
model.generate_name_url
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
f1353e9c2d281f99908eeb4a9dd817f98995dcb2
|
name url fix
|
diff --git a/lib/voidtools/datamapper/name_url.rb b/lib/voidtools/datamapper/name_url.rb
index cb34161..cb15b24 100644
--- a/lib/voidtools/datamapper/name_url.rb
+++ b/lib/voidtools/datamapper/name_url.rb
@@ -1,13 +1,14 @@
module NameUrl
def generate_name_url
- update(name_url: name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
+ name_url = name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
+ update(name_url: name_url)
end
end
class NameUrler
def generate(klass, options={})
klass.all(options).each do |model|
model.generate_name_url
end
end
end
\ No newline at end of file
|
makevoid/voidtools
|
cfd2aec0775d52bc729a2a90da286606f875c6c6
|
added name url basic module (move outside datamapper)
|
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..06de90a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.bundle
\ No newline at end of file
diff --git a/lib/voidtools/datamapper/name_url.rb b/lib/voidtools/datamapper/name_url.rb
new file mode 100644
index 0000000..cb34161
--- /dev/null
+++ b/lib/voidtools/datamapper/name_url.rb
@@ -0,0 +1,13 @@
+module NameUrl
+ def generate_name_url
+ update(name_url: name.gsub(/'|"/, ' ').gsub(/\s+/, '_').downcase
+ end
+end
+
+class NameUrler
+ def generate(klass, options={})
+ klass.all(options).each do |model|
+ model.generate_name_url
+ end
+ end
+end
\ No newline at end of file
diff --git a/lib/voidtools/datamapper/paginable.rb b/lib/voidtools/datamapper/paginable.rb
new file mode 100644
index 0000000..60d9a45
--- /dev/null
+++ b/lib/voidtools/datamapper/paginable.rb
@@ -0,0 +1,23 @@
+module Paginable
+
+ PER_PAGE = 70
+
+ def self.included(base)
+ base.send :extend, ClassMethods
+ end
+
+ module ClassMethods
+ def paginate(options)
+ page = options[:page].to_i
+ options.delete :page
+ all( options.merge(limit: PER_PAGE, offset: PER_PAGE*page) )
+ end
+
+ def pages
+ all.count/PER_PAGE
+ end
+
+ end
+
+end
+
|
dreamer/zapisy_zosia
|
a5996d977ec91e9cc2b3b560c206368e6e376412
|
filtry
|
diff --git a/newrooms/admin.py b/newrooms/admin.py
index 67b4799..80f1677 100644
--- a/newrooms/admin.py
+++ b/newrooms/admin.py
@@ -1,15 +1,17 @@
from django.contrib import admin
from models import *
class NewroomsAdmin(admin.ModelAdmin):
list_display = ['number','capacity','locators']
def locators(self,obj):
return ",".join([])
admin.site.register(NRoom, NewroomsAdmin)
class UserInRoomAdmin(admin.ModelAdmin):
- list_display = ['locator','room']
+ list_display = ['firstname', 'lastname','room']
+
+
admin.site.register(UserInRoom, UserInRoomAdmin)
diff --git a/newrooms/models.py b/newrooms/models.py
index ae14e24..9804424 100644
--- a/newrooms/models.py
+++ b/newrooms/models.py
@@ -1,121 +1,129 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
from common.helpers import *
import random
# feature tasks (microbacklog ;) )
# - blocking datatimes
# - unblocking at specified time
# - actually _working_ locators fields
# - set pass / leave room
# - js dialog boxes
# - merging
# - deploy
# - password should not be a pass but token (or maybe default pass should be autogenerated)
# most of non-standard fuss here is about serializing
# and caching rooms in database;
# this probably should be moved into different module
# for usage with built-in django serialization framework
#
# note: caching does not work with lock times atm
# repair this if required after stresstests
class RoomManager(models.Manager):
# this class does basic caching for json data
# when any of room changes then flag update_required
# should be set to True
# this flag prevents database lookup for creating json data
cache = ""
update_required = True
def to_json(self):
if self.update_required:
self.cache = [ x.to_json() for x in self.all() ]
# self.update_required = False # comment this line to disable caching
return "[%s]" % (','.join(self.cache))
class NRoom(models.Model):
number = models.CharField(max_length=16)
capacity = models.PositiveIntegerField(max_length=1) # burżuje jesteÅmy :P
password = models.CharField(max_length=16)
# unlock time for first locator
short_unlock_time = models.DateTimeField()
#long unlock time
#long_unlock_time = models.DateTimeField()
# ok, this probably shouldn't be done this way, but proper one-to-many
# relation requires changing user model which can't be done now
# this should be refactored after ZOSIA09
# locators = models.ManyToManyField(User, through='RoomMembership')
objects = RoomManager()
def get_no_locators(self):
return UserInRoom.objects.filter(room=self.id).count()
def get_status(self, request=None):
if is_rooming_disabled(request): return 3 # zapisy sÄ
zamkniÄte
no_locators = self.get_no_locators()
# doesnt' matter what, if room is empty, it is unlocked
if not no_locators:
return 0
if no_locators >= self.capacity:
return 2 # room is full
# short unlock time is still in future
if self.short_locked():
return 1
#if self.password != "":
# return 1 # password is set
return 0 # default; it's ok to sign into room
def to_json(self):
# json format:
# id - number
# st - status
# nl - number of locators
# mx - max room capacity
# lt - unlock time (optional)
# features? (optional)
#"""[{"id":"id","st":0,"nl":0,"mx":1}]"""
no_locators = self.get_no_locators()
status= self.get_status()
# this is soo wrong... (but works)
optional = ''
# short unlock time is in the future
if self.short_locked():
optional = ',"lt":"%s"' % ( self.short_unlock_time.ctime()[10:-8] )
return '{"id":"%s","st":%s,"nl":%s,"mx":%s%s}' % (self.number,
status, no_locators, self.capacity, optional)
def short_locked(self):
# returns true when time is still in future
ret = self.short_unlock_time > datetime.now()
return ret
#def save(self):
# super(NRoom, self).save()
# # set cached data in manager to be updated
# # self.__class__.objects.update_required = True
def __unicode__(self):
return u"%s" % self.number
class UserInRoom(models.Model):
# user-room-ownership relation # it REALLY should be better implemented...
locator = models.ForeignKey(User, unique=True)
room = models.ForeignKey(NRoom)
ownership = models.BooleanField()
+ def firstname(self):
+ return self.locator.first_name
+
+ def lastname(self):
+ return self.locator.last_name
+
+ class Meta:
+ ordering = ['locator__last_name', 'locator__first_name']
\ No newline at end of file
diff --git a/registration/admin.py b/registration/admin.py
index 78be74f..d9b4643 100644
--- a/registration/admin.py
+++ b/registration/admin.py
@@ -1,127 +1,127 @@
from django.contrib import admin
from models import *
from views import count_payment
class UserPreferencesAdmin(admin.ModelAdmin):
list_per_page = 200
list_display = (
'user',
'ZOSIA_cost',
'bus',
'bus_hour',
'days',
'breakfasts',
'dinners',
'vegetarian',
'shirt',
'org',
'paid',
'minutes_early',
)
- search_fields = ('user__first_name', 'user__last_name')
- list_filter = ('bus_hour', 'paid', 'bus')
+ search_fields = ('user__last_name', 'user__last_name')
+ list_filter = ['bus_hour', 'paid', 'bus', 'breakfast_2', 'breakfast_3', 'breakfast_4', 'dinner_1', 'dinner_2', 'dinner_3', 'day_1', 'day_2', 'day_3']
list_editable = ('minutes_early', 'paid')
def anim_icon(self,id):
return '<img src="/static_media/images/macthrob-small.png" alt="loading" id="anim%s" style="display:none"/>'%id
yes_icon = '<img src="/static_media/images/icon-yes.gif" alt="Yes" />'
no_icon = '<img src="/static_media/images/icon-no.gif" alt="No" />'
def onclick(self,id,obj):
return u"""if(confirm('Do you want to register payment from %s?')) {
document.getElementById('anim%s').style.display='inline';
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
document.getElementById('anim%s').style.display='none';
if( xhr.status == 200) {
window.location.reload();
}
}
};
xhr.open('POST', '/admin/register_payment/', true);
xhr.send('id=%s');
}""" % (obj, id, id, id)
def bus_onclick(self,obj):
id = obj.id
return u"""if(confirm('Do you want to register transport payment from %s?')) {
//document.getElementById('anim%s').style.display='inline';
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
//document.getElementById('anim%s').style.display='none';
if( xhr.status == 200) {
window.location.reload();
}
}
};
xhr.open('POST', '/admin/register_bus_payment/', true);
xhr.send('id=%s');
}""" % (obj, id, id, id)
def ZOSIA_cost(self, obj):
if obj.paid:
return u"%s %s z\u0142" % ( self.yes_icon, count_payment(obj) )
else:
return u'<a href="#" onclick="{%s}">%s %s z\u0142</a> %s' % (
self.onclick(obj.id,obj), self.no_icon, count_payment(obj), self.anim_icon(obj.id))
ZOSIA_cost.allow_tags = True
def bus_cost(self, obj):
# if user doesn't wanna get but, so he shouldn't
if not obj.bus:
return "%s -" % self.no_icon
elif obj.paid_for_bus:
return u"%s %s z\u0142" % ( self.yes_icon, "40" )
else:
return u'<a href="#" onclick="{%s}">%s %s z\u0142</a>' % ( self.bus_onclick(obj), self.no_icon, "40" )
bus_cost.allow_tags = True
shirt_types = {}
for i in 0,1:
v = SHIRT_TYPES_CHOICES.__getitem__(i)
shirt_types[v.__getitem__(0)] = v.__getitem__(1)
def shirt(self, obj):
return "%s (%s)" % (
self.shirt_types[obj.shirt_type],
obj.shirt_size)
def f(self,o):
def g(x):
if o.__dict__[x]: return self.yes_icon
else: return self.no_icon
return g
# note: these three methods should not be separated
# but generated through lamba function
# do it in spare time
def breakfasts(self,obj):
lst = ['breakfast_2', 'breakfast_3', 'breakfast_4']
return " ".join(map(self.f(obj),lst))
breakfasts.allow_tags = True
def dinners(self,obj):
lst = ['dinner_1', 'dinner_2', 'dinner_3']
return " ".join(map(self.f(obj),lst))
dinners.allow_tags = True
def days(self,obj):
lst = ['day_1', 'day_2', 'day_3']
return " ".join(map(self.f(obj),lst))
days.allow_tags = True
admin.site.register(UserPreferences, UserPreferencesAdmin)
class OrganizationAdmin(admin.ModelAdmin):
list_display = (
'id',
'name',
'accepted'
)
admin.site.register(Organization, OrganizationAdmin)
class UserAdmin(admin.ModelAdmin):
list_display = ('email', 'first_name', 'last_name', 'is_active', 'is_staff', 'is_superuser')
list_filter = ('is_staff', 'is_superuser', 'is_active')
list_per_page = 200
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
|
dreamer/zapisy_zosia
|
939e17f3a81413c23a424fd1d402afaab66c3534
|
program fix
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index cd110fd..3402cde 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,324 +1,324 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>Program</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">20:00 - 21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30 - 21:40</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:40 - 22:40</div>
<div class="cell_text1"><strong>Sesja inauguracyjna</strong>, prowadzÄ
ca: <strong>Dorota Suchocka</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:40 - 22:10</div>
<div class="cell_text2"><strong>Piotr Modrzyk</strong>, <a href="http://moosefs.org">MooseFS - coretechnology.pl</a>, <i>MooseFS - Highly Reliable Petabyte Storage</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:10 - 22:40</div>
<div class="cell_text2"><strong>Ania Dwojak</strong>, <a href="http://google.com">Google</a>, <i>MapReduce dla bardzo poczÄ
tkujÄ
cych</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">23:00 - 00:05</div>
<div class="cell_text1"><strong>Sesja 2</strong>, prowadzÄ
cy: <strong>Maciej JabÅoÅski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">23:00 - 23:30</div>
- <div class="cell_text2"><strong>Mietek BÄ
k</strong>, <i>DTrace, czyli sekretne życie programów</i></div>
+ <div class="cell_text2"><strong>Miëtek Bak</strong>, <i>DTrace, czyli sekretne życie programów</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:30 - 23:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>WpÅyw Królewny Ånieżki na informatykÄ</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:50 - 00:05</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Do I really need that shot - metabolizm alkoholu</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">00:00 -</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
</div><br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:00 - 9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">17:30 - 19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">16:30 - 18:10</div>
<div class="cell_text1"><strong>Sesja 3</strong>, prowadzÄ
cy: <strong>Karol BÅażejowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">16:30 - 17:00</div>
<div class="cell_text2"><strong>Marcin Janowski</strong>, <i>BezpieczeÅstwo lokalne w Linuksie</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:05 - 17:35</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Czy prywatnoÅÄ w Sieci istnieje?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:40 - 18:10</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>OpowieÅci z ELFiej krainy</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">18:10 - 19:00</div>
<div class="cell_text1">Przerwa na obiadokolacjÄ</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00 - 20:40</div>
<div class="cell_text1"><strong>Sesja 4</strong>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00 - 19:30</div>
<div class="cell_text2"><strong>Szymon StefaÅski</strong>, <a href="http://datax.pl">DATAX</a>, <i>Halo, halo? TracÄ zasiÄg.</i> </div>
</div>
<div class="row">
<div class="cell_part_hour">19:35 - 20:05</div>
<div class="cell_text2"><strong>Björn Pelzer</strong>, <i>Deductive Question Answering</i></div>
</div>
<div class="row">
<div class="cell_part_hour">20:10 - 20:40</div>
<div class="cell_text2"><strong>Filip Sieczkowski</strong>, <i>MedLey, czyli mieszanka funkcjonalna</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00 - 22:40</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:00 - 21:20</div>
<div class="cell_text2"><strong>Lacramioara Astefanoaei</strong>, <i>Time of the numbers</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:25 - 21:45</div>
<div class="cell_text2"><strong>Kinga Mielcarska</strong>, <i>Bioinformatyka â nowa dziedzina na pograniczu nauk</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45 - 22:05</div>
<div class="cell_text2"><strong>Magda Mielczarek</strong>, <i>Bioinformatyka - Åatwe drzewa filogenetyczne</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:10 - 22:40</div>
<div class="cell_text2"><strong>Maciek Piróg</strong>, <i>BiaÅe skarpetki i czarne dziury</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">23:00 - 00:05</div>
<div class="cell_text1"><strong>Sesja 6</strong>, prowadzÄ
cy: <strong>RadosÅaw Warzocha</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">23:00 - 23:30</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Reaktywnie deklaratywnie</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:35 - 00:05</div>
<div class="cell_text2"><strong>Adam DziaÅak</strong>, <i>Demoscena â sztuka malowana algorytmami</i></div>
</div>
</div><br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour"> 8:00 - 9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">17:30 - 19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">10:00 - 13:00 </div>
<div class="cell_text1"><strong>Jakub StÄpniewicz</strong>, <i>WEPnijmy siÄ do sieci - warsztaty</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">16:30 - 18:10 </div>
<div class="cell_text1"><strong>Sesja 7</strong>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">16:30 - 17:00</div>
<div class="cell_text2"><strong>Anna Stożek</strong>, <i>UWAGA promieniowanie!</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:05 - 17:35</div>
<div class="cell_text2"><strong>Maciek JabÅoÅski</strong>, <i>Backbone.js, czyli jak przestaÅem siÄ martwiÄ i pokochaÅem Javascript</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:40 - 18:10</div>
<div class="cell_text2"><strong>PaweÅ Kalinowski</strong>, <i>Takie rzeczy tylko w eRze</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">18:10 - 19:00</div>
<div class="cell_text2">Przerwa na obiadokolacjÄ</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00 - 20:30</div>
<div class="cell_text1"><strong>Sesja 8</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00 - 19:30</div>
<div class="cell_text2"><strong>Bartosz ÄwikÅowski</strong>, <a href="http://clearcode.cc">ClearCode</a>, <i>Co ma wspólnego aukcja z banerem reklamowym?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:35 - 20:20</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>The Kutta-Joukowski theorem</i></div>
</div>
<div class="row">
<div class="cell_part_hour">20:25 - 20:30</div>
<div class="cell_text2"><strong>Linda Smug</strong>, <i>Zapach genów</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:50 - 22:30</div>
<div class="cell_text1"><strong>Sesja 9</strong>, prowadzÄ
cy: <strong>Maciej Piróg</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:50 - 21:20</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Let's make the web faster</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:25 - 21:55</div>
<div class="cell_text2"><strong>Adam SowiÅski</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Jak radziÄ sobie z dużymi bazami SQL w praktyce</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:00 - 22:30</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong>, <i>O zmaganiach z Jakubem...</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:50 - 00:05</div>
<div class="cell_text1"><strong>Sesja 10</strong>, prowadzÄ
ca: <strong>Dominika RogoziÅska</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50 - 23:20</div>
<div class="cell_text2"><strong>Daniel DobrijaÅowski</strong>, <i>Gdzie i jak liczyÄ?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:25 - 00:05</div>
<div class="cell_text2"><strong>Karol BÅażejowski</strong>, <i>O biaÅej piance, ale bardziej o tym co jest pod niÄ
</i></div>
</div>
</div><br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:00-9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
<br><br><br><br><br><br>
{% endblock content %}
|
dreamer/zapisy_zosia
|
ee4975613fffae55ae6bc9fdb8f6db58d908fee8
|
różne poprawki
|
diff --git a/common/helpers.py b/common/helpers.py
index 3489a7b..fa63960 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,68 +1,68 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
from common.models import ZosiaDefinition
from django.http import Http404
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.registration_start
final_date = definition.registration_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
return not is_registration_enabled()
def is_lecture_suggesting_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.lectures_suggesting_start
final_date = definition.lectures_suggesting_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
return not is_lecture_suggesting_enabled()
def is_rooming_enabled(request = None):
if request:
return has_user_opened_records(request.user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.rooming_start
final_date = definition.rooming_final
assert start_date < final_date
return start_date < datetime.now() < final_date
def has_user_opened_records(user):
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
prefs = UserPreferences.objects.get(user=user)
user_openning_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early)
- return user_openning_hour <= datetime.now()
+ return user_openning_hour <= datetime.now() <= definition.rooming_final
def is_rooming_disabled(request=None):
return not is_rooming_enabled(request)
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 9e1eb55..cd110fd 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,318 +1,324 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
+
<h2>Program</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">20:00 - 21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30 - 21:40</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:40 - 22:40</div>
<div class="cell_text1"><strong>Sesja inauguracyjna</strong>, prowadzÄ
ca: <strong>Dorota Suchocka</strong></div>
</div>
+
+
<div class="row">
<div class="cell_part_hour">21:40 - 22:10</div>
<div class="cell_text2"><strong>Piotr Modrzyk</strong>, <a href="http://moosefs.org">MooseFS - coretechnology.pl</a>, <i>MooseFS - Highly Reliable Petabyte Storage</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:10 - 22:40</div>
<div class="cell_text2"><strong>Ania Dwojak</strong>, <a href="http://google.com">Google</a>, <i>MapReduce dla bardzo poczÄ
tkujÄ
cych</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">23:00 - 00:05</div>
<div class="cell_text1"><strong>Sesja 2</strong>, prowadzÄ
cy: <strong>Maciej JabÅoÅski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">23:00 - 23:30</div>
<div class="cell_text2"><strong>Mietek BÄ
k</strong>, <i>DTrace, czyli sekretne życie programów</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:30 - 23:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>WpÅyw Królewny Ånieżki na informatykÄ</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:50 - 00:05</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Do I really need that shot - metabolizm alkoholu</i></div>
</div>
</div>
+ <div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">00:00 -</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
- </div>
+ </div><br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:00 - 9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">17:30 - 19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">16:30 - 18:10</div>
<div class="cell_text1"><strong>Sesja 3</strong>, prowadzÄ
cy: <strong>Karol BÅażejowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">16:30 - 17:00</div>
<div class="cell_text2"><strong>Marcin Janowski</strong>, <i>BezpieczeÅstwo lokalne w Linuksie</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:05 - 17:35</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Czy prywatnoÅÄ w Sieci istnieje?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:40 - 18:10</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>OpowieÅci z ELFiej krainy</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">18:10 - 19:00</div>
<div class="cell_text1">Przerwa na obiadokolacjÄ</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00 - 20:40</div>
<div class="cell_text1"><strong>Sesja 4</strong>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00 - 19:30</div>
<div class="cell_text2"><strong>Szymon StefaÅski</strong>, <a href="http://datax.pl">DATAX</a>, <i>Halo, halo? TracÄ zasiÄg.</i> </div>
</div>
<div class="row">
<div class="cell_part_hour">19:35 - 20:05</div>
<div class="cell_text2"><strong>Björn Pelzer</strong>, <i>Deductive Question Answering</i></div>
</div>
<div class="row">
<div class="cell_part_hour">20:10 - 20:40</div>
<div class="cell_text2"><strong>Filip Sieczkowski</strong>, <i>MedLey, czyli mieszanka funkcjonalna</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00 - 22:40</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:00 - 21:20</div>
<div class="cell_text2"><strong>Lacramioara Astefanoaei</strong>, <i>Time of the numbers</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:25 - 21:45</div>
<div class="cell_text2"><strong>Kinga Mielcarska</strong>, <i>Bioinformatyka â nowa dziedzina na pograniczu nauk</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45 - 22:05</div>
<div class="cell_text2"><strong>Magda Mielczarek</strong>, <i>Bioinformatyka - Åatwe drzewa filogenetyczne</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:10 - 22:40</div>
<div class="cell_text2"><strong>Maciek Piróg</strong>, <i>BiaÅe skarpetki i czarne dziury</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">23:00 - 00:05</div>
<div class="cell_text1"><strong>Sesja 6</strong>, prowadzÄ
cy: <strong>RadosÅaw Warzocha</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">23:00 - 23:30</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Reaktywnie deklaratywnie</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:35 - 00:05</div>
<div class="cell_text2"><strong>Adam DziaÅak</strong>, <i>Demoscena â sztuka malowana algorytmami</i></div>
</div>
- </div>
+ </div><br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour"> 8:00 - 9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">17:30 - 19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<br/>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">10:00 - 13:00 </div>
<div class="cell_text1"><strong>Jakub StÄpniewicz</strong>, <i>WEPnijmy siÄ do sieci - warsztaty</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">16:30 - 18:10 </div>
<div class="cell_text1"><strong>Sesja 7</strong>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">16:30 - 17:00</div>
<div class="cell_text2"><strong>Anna Stożek</strong>, <i>UWAGA promieniowanie!</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:05 - 17:35</div>
<div class="cell_text2"><strong>Maciek JabÅoÅski</strong>, <i>Backbone.js, czyli jak przestaÅem siÄ martwiÄ i pokochaÅem Javascript</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:40 - 18:10</div>
<div class="cell_text2"><strong>PaweÅ Kalinowski</strong>, <i>Takie rzeczy tylko w eRze</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">18:10 - 19:00</div>
<div class="cell_text2">Przerwa na obiadokolacjÄ</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00 - 20:30</div>
<div class="cell_text1"><strong>Sesja 8</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00 - 19:30</div>
<div class="cell_text2"><strong>Bartosz ÄwikÅowski</strong>, <a href="http://clearcode.cc">ClearCode</a>, <i>Co ma wspólnego aukcja z banerem reklamowym?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:35 - 20:20</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>The Kutta-Joukowski theorem</i></div>
</div>
<div class="row">
<div class="cell_part_hour">20:25 - 20:30</div>
<div class="cell_text2"><strong>Linda Smug</strong>, <i>Zapach genów</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:50 - 22:30</div>
<div class="cell_text1"><strong>Sesja 9</strong>, prowadzÄ
cy: <strong>Maciej Piróg</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:50 - 21:20</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Let's make the web faster</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:25 - 21:55</div>
<div class="cell_text2"><strong>Adam SowiÅski</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Jak radziÄ sobie z dużymi bazami SQL w praktyce</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:00 - 22:30</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong>, <i>O zmaganiach z Jakubem...</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:50 - 00:05</div>
<div class="cell_text1"><strong>Sesja 10</strong>, prowadzÄ
ca: <strong>Dominika RogoziÅska</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50 - 23:20</div>
<div class="cell_text2"><strong>Daniel DobrijaÅowski</strong>, <i>Gdzie i jak liczyÄ?</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:25 - 00:05</div>
<div class="cell_text2"><strong>Karol BÅażejowski</strong>, <i>O biaÅej piance, ale bardziej o tym co jest pod niÄ
</i></div>
</div>
- </div>
+ </div><br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:00-9:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
+ <br><br><br><br><br><br>
+
{% endblock content %}
diff --git a/newrooms/views.py b/newrooms/views.py
index d43c8b1..ea36333 100644
--- a/newrooms/views.py
+++ b/newrooms/views.py
@@ -1,191 +1,191 @@
# -*- coding: UTF-8 -*-
from django.views.decorators.cache import cache_page
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from registration.models import UserPreferences
import random
from models import *
from datetime import *
from common.helpers import *
# from models import *
@login_required
def index(request):
"""
"""
user = request.user
title = "Rooms"
return render_to_response('rooms.html',locals())
#@login_required
@cache_page(30)
def json_rooms_list(request):
json = NRoom.objects.to_json()
return HttpResponse(json, mimetype="application/json")
def dict_to_json(d):
ret = []
for k,v in d.items(): ret.append('"%s":"%s"'%(k,v))
return '{%s}'%(','.join(ret))
def get_in_room(usr,room,own=False):
occupation = UserInRoom( locator=usr,
room=room,
ownership=own
)
occupation.save()
def get_room_locators(room):
# return html
occs = UserInRoom.objects.filter(room=room)
if not occs:
return ''
else:
lst = ','.join( [ u" %s"%o.locator for o in occs ] )
return u"MieszkajÄ
tu: %s<br/>" % lst
@login_required
def trytogetin_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
room = NRoom.objects.get(id=int(request.POST['rid']))
if room.password == request.POST['key']:
get_in_room(request.user, room)
return HttpResponse('ok')
return HttpResponse('fail')
@login_required
def open_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
if room.password == request.POST['key']:
occupation.room.short_unlock_time = datetime.now()
occupation.room.save()
return HttpResponse('ok')
@login_required
def close_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
no_locators = 0
if room.password == request.POST['key']:
no_locators = UserInRoom.objects.filter(room=room).count()
if no_locators == 1: # user is still alone in this room
timeout = timedelta(0,10800,0) # 3h == 10800s
occupation.room.short_unlock_time = datetime.now() + timeout
occupation.room.save()
return HttpResponse('ok')
CONST_LEAVE_ROOM_BTN = u'<button onclick=\'window.location=/leave_room/\'>OpuÅÄ pokój</button>'
CONST_OK_BTN = u'<button onclick=\'hideDialog()\'>OK</button>'
CONST_OK2_BTN = u'<button onclick=\'hideDialog()\'>ZostaÅ w pokoju</button>'
# CONST_LEAVE_OPEN_ROOM_BTN = u'<button onclick=\'Rooms.hideDialog(1)\'>Otwórz pokój</button>'
# CONST_USE_KEY_BTN = u'<button>Zamknij pokój</button>'
def leave_open_room_btn(key): return u'<button onclick=\'Rooms.hideDialog(%s)\'>Wejdź i nie zamykaj</button>' % key
def close_room_btn(key): return u'<button onclick=\'Rooms.closeRoom(%s)\'>Wejdź i zamknij kluczem</button>' % key
CONST_FORM = u"""<form><input type=\'submit\' value=\'Ustaw hasÅo\'/></form>"""
@login_required
def leave_room(request):
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
prev_occupation.delete()
except Exception: pass
# finally: TODO check which versions of Python support 'finally' keyword
return HttpResponseRedirect('/rooms/')
@login_required
def modify_room(request):
if not request.POST: raise Http404
# get correct room based on rid
room_number = request.POST['rid'][1:]
room = NRoom.objects.get(number=room_number)
status = room.get_status(request)
json = { "room_number":room_number, "buttons":'', 'msg':'', 'form':'' }
prev_occupation = None
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
except Exception:
pass
if not status:
#
# this room is open
#
msg = ''
no_locators = room.get_no_locators()
if not no_locators:
#
# case when room is empty
#
if prev_occupation:
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw wypisaÄ siÄ z pokoju %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
else:
get_in_room(request.user, room, True)
timeout = timedelta(0,120,0) # 2 minutes
room.short_unlock_time = datetime.now() + timeout
room.password = ''.join([ str(random.choice(range(10))) for _ in range(6) ])
room.save()
json['msg'] = u"<br/>Przekaż klucz swoim znajomym, aby<br/>mogli doÅÄ
czyÄ do tego pokoju.<br/><br/>"
json['form'] = u"Klucz do pokoju: <strong>%s</strong><br/>" % room.password
json['buttons'] = close_room_btn(room.password) + leave_open_room_btn(room.password) + CONST_LEAVE_ROOM_BTN
else:
#
# case when room is not empty
#
if (prev_occupation is not None) and (prev_occupation.room == room):
json['msg'] = 'Mieszkasz w tym pokoju.'
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif (prev_occupation is None):
get_in_room(request.user, room)
json['msg'] = u"<br/>WÅaÅnie doÅÄ
czyÅeÅ do tego pokoju<br/>"
json['buttons'] = CONST_OK2_BTN + CONST_LEAVE_ROOM_BTN
else: # prev_occ and not in this room
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 1:
#
# this room is locked or has password
#
if prev_occupation and (prev_occupation.room == room):
json['msg'] = u"<br/>ZamkniÄty kluczem: <strong>%s</strong><br/>" % room.password
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif not prev_occupation:
json['msg'] = u"<br/>Ten pokój jest zamkniÄty.<br/><input id='in_key' type='text' maxlength='6' size='6'></input><button onclick=\'Rooms.tryGetIn(%s)\'>Dopisz siÄ</button>" % room.id
json['buttons'] = u"<button onclick=\'hideDialog()\'>Anuluj</button>"
else: # prev_occ and not in this room
json['msg'] = u"<br/>Ten pokój jest zamkniÄty kluczem. Ponadto jeÅli chcesz siÄ do niego dopisaÄ musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 2: # room is full
#
# TODO: opcja do wypisania sie?
#
json['msg'] = u"<br/>Ten pokój jest już peÅny.<br/>"
json['buttons'] = CONST_OK_BTN
if prev_occupation and (prev_occupation.room == room):
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif status == 3:
- json['msg'] = u"<br/>Zapisy na pokoje sÄ
jeszcze zamkniÄte.<br/>"
+ json['msg'] = u"<br/>Zapisy na pokoje sÄ
zamkniÄte.<br/>"
json['buttons'] = CONST_OK_BTN
json['locators'] = get_room_locators(room)
return HttpResponse(dict_to_json(json), mimetype="application/json")
diff --git a/templates/index.html b/templates/index.html
index 0506aa3..f5a970a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,132 +1,132 @@
<!doctype html>
{% load i18n %}
{% load cache %}
{% load blurb_edit %}
{% cache 60 header_index_template %}
<html lang="pl">
<head>
<title>ZOSIA 2012</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="pl" />
<link href="/static_media/css/layout_2col_right_13.css" rel="stylesheet" type="text/css"/>
<link href="/static_media/css/zosia.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="/static_media/css/patches/patch_2col_right_13.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="RSS"
href="/feeds/blog/"/>
<link rel="icon" href="/static_media/images/favicon.png">
<script type="text/javascript">
window.onload=function(){ AddFillerLink("col1_content","col3_content"); }
</script>
<script type="text/javascript">
{% endcache %}
{% block javascript %}{% endblock %}
</script>
<style type="text/css">
<!--
{% block css %}{% endblock %}
-->
</style>
{% block superextra %}{% endblock %}
</head>
<body onload='{% block onload%}{% endblock %}'>
<div id="wrapper">
<div id="page_margins">
<div id="page">
<div id="header">
<div id="topnav">
{% if user.is_authenticated %}
{% trans "oh hai" %}, {{ user.first_name }} {{ user.last_name}} |
{# <a href="/password_change/">{% trans "Change password" %}</a> | #}
{% if user.is_staff %}
<a href="/admin/">{% trans "Administration panel" %}</a> |
{% endif %}
<a href="/logout/">{% trans "Logout" %}</a>
{% else %}
{% if login_form %}
<form action="/login/" method="post" id="login_form">
<fieldset>
{% if login_form.email.errors %}
<ul class="errorlist">
{% for error in login_form.email.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_email">e-mail</label> {{ login_form.email }}
{% if form.password.errors %}
<ul class="errorlist">
{% for error in form.password.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_password">{% trans "password" %}</label> {{ login_form.password }}
<input type="submit" value="login" />
</fieldset>
</form>
<div class="main_page_password_reset">
<a href="/password_reset">zapomniaÅem hasÅa</a>
</div>
{% endif %} {# login_form #}
{# <a href="/register/">{% trans "Register" %}</a> #}
{% endif %}
</div>
<a href="/blog/"><img src="/static_media/images/logo_zosi_shadow.png" alt="ZOSIA" /></a>
<span>Zimowy Obóz Studentów Informatyki A • Przesieka 2012</span></div>
<!-- begin: main navigation #nav -->
<div id="nav"> <a id="navigation" name="navigation"></a>
<!-- skiplink anchor: navigation -->
<div id="nav_main">
<ul>
<li {% ifequal title "Blog" %}id="current"{% endifequal %}><a href="/blog/">{% trans "Blog" %}</a></li>
{% load time_block_helpers %}
{% if user.is_authenticated %}
<li {% ifequal title "Change preferences" %}id="current"{% endifequal %}><a href="/change_preferences/">{% trans "Change preferences" %}</a></li>
{% else %}
{% if title %}{% registration_link title %}{% endif %} {# see registration/templatetags #}
{% endif %}
<li {% ifequal title "Lectures" %}id="current"{% endifequal %}><a href="/lectures/">{% trans "Lectures" %}</a></li>
- {# <li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li> #}
+ <li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li>
{% if user.is_authenticated %}
{% if title %}{% rooming_link user title %}{% endif %} {# see registration/templatetags #}
{% endif %}
</ul>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col1 - first float column -->
<div id="col1">
{% if messages_list %} <!-- TODO -->
<ul>
<li>The lecture "Lecture object" was added successfully.</li>
</ul>
{% endif %}
<div id="col1_content" class="clearfix"> <a id="content" name="content"></a>
<!-- skiplink anchor: Content -->
{% block content %}page content{% endblock %}
</div>
</div>
<!-- end: #col1 -->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
{% block right_column %}{% endblock %}
</div>
<div id="ie_clearing"> </div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="footer">
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/"><img alt="Creative Commons License" style="border-width:0; margin: 0.2em 0.4em 0 0; float:left;" src="http://i.creativecommons.org/l/by/2.5/pl/88x31.png" /></a>{% trans "Except where otherwise noted, content on this site is licensed under a" %} <a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/">Creative Commons Attribution 2.5 Poland</a>.<br/>
copyleft Patryk Obara, RafaÅ KuliÅski | <a href="http://github.com/dreamer/zapisy_zosia">src</a> | Layout {% trans "based on" %} <a href="http://www.yaml.de/">YAML</a>
</div>
<!-- end: #footer -->
</div>
</div>
</div><!-- wrapper -->
</body>
</html>
|
dreamer/zapisy_zosia
|
032528dc4e88729caed78ada9426fa8e6294a60c
|
program
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 3b2ac32..9e1eb55 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,268 +1,318 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
-<h2>{% trans "Program" %}</h2>
-<br>
-<h3>Czwartek</h3>
-
-<div class="program">
- <div class="row">
- <div class="cell_hour">19:00-21:30</div>
- <div class="cell_text1">Obiadokolacja</div>
- </div>
- <div class="row">
- <div class="cell_hour">20:15-21:00</div>
- <div class="cell_text1">Familiada</div>
- </div><br>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">21:00-21:25</div>
- <div class="cell_text1">Oficjalne rozpoczÄcie</div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">21:30-22:00</div>
- <div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong>
- </div>
- <div class="row">
- <div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">22:30-23:55</div>
- <div class="cell_text1"><strong>Sesja 1</strong></div>, prowadzÄ
ca: <strong>Lucyna Frank</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:30-22:45</div>
- <div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:45-23:15</div>
- <div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">23:15-23:55</div>
- <div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
- </div>
-</div>
- <div class="row">
- <div class="cell_hour">00:00-</div>
- <div class="cell_text1">Zabawa przy gitarze</div>
- </div>
-</div>
-<br><br>
-<h3>PiÄ
tek</h3>
-
-<div class="program">
- <div class="row">
- <div class="cell_hour_1">8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
- </div>
- <div class="row">
- <div class="cell_hour">16:30-19:00</div>
- <div class="cell_text1">Obiadokolacja</div>
- </div><br>
- <div class="row">
- <div class="cell_hour">10:00-16:00</div>
- <div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
- </div><br>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">17:00-18:30</div>
- <div class="cell_text1"><strong>WykÅady zaproszone</strong></div>, prowadzÄ
cy: <strong>Piotr Modrzyk</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">17:00-17:45</div>
- <div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">17:45-18:30</div>
- <div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">19:00-20:15</div>
- <div class="cell_text1"><strong>Sesja 2</strong></div>, prowadzÄ
ca: <strong>Anna Dwojak</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">19:00-19:30</div>
- <div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">19:30-20:15</div>
- <div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">20:45-22:05</div>
- <div class="cell_text1"><strong>Sesja 3</strong></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">20:45-21:15</div>
- <div class="cell_text2"><strong>Patryk Obara</strong>, <i>Krótki kurs bebeszenia gita</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">21:15-21:45</div>
- <div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">21:45-22:05</div>
- <div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">22:30-23:40</div>
- <div class="cell_text1"><strong>Sesja 4</strong></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:30-22:55</div>
- <div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:55-23:40</div>
- <div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
- </div>
-</div>
- <div class="row">
- <div class="cell_hour">00:00-</div>
- <div class="cell_text1">Karaoke</div>
- </div>
-</div>
-<br><br>
-<h3>Sobota</h3>
-
-<div class="program">
- <div class="row">
- <div class="cell_hour_1"> 8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
- </div>
- <div class="row">
- <div class="cell_hour">16:30-19:00</div>
- <div class="cell_text1">Obiadokolacja</div>
- </div><br>
- <div class="row">
- <div class="cell_hour">10:00-15:30</div>
- <div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
- </div>
- <div class="row">
- <div class="cell_part_hour">10:00-10:40</div>
- <div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
- </div>
- <div class="row">
- <div class="cell_part_hour">10:40-15:00</div>
- <div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
- </div>
- <div class="row">
- <div class="cell_part_hour">15:00-15:30</div>
- <div class="cell_text2"> Podsumowanie i dyskusja</div>
- </div><br>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">17:30-18:30</div>
- <div class="cell_text1"><strong>WykÅad zaproszony</strong></div>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong>
- </div>
- <div class="row">
- <div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">19:00-20:15</div>
- <div class="cell_text1"><strong>Sesja 5</strong></div>, prowadzÄ
cy: <strong>Witold Charatonik</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">19:00-19:30</div>
- <div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">19:30-20:15</div>
- <div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
- </div>
-</div>
-<div style="margin-bottom: 8px">
- <div class="row">
- <div class="cell_hour">20:45-22:05</div>
- <div class="cell_text1"><strong>Sesja 6</strong></div>, prowadzÄ
cy: <strong>Marcin MÅotkowski</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">20:45-21:15</div>
- <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">21:15-21:35</div>
- <div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">21:35-22:05</div>
- <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
- </div>
-</div>
- <div class="row">
- <div class="cell_hour">22:30-23:35</div>
- <div class="cell_text1"><strong>Sesja 7</strong></div>, prowadzi: <strong>Maciej Piróg</strong>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:30-22:50</div>
- <div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
- </div>
- <div class="row">
- <div class="cell_part_hour">22:50-23:35</div>
- <div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
- </div>
-
-</div>
-<br><br>
-<h3>Niedziela</h3>
-<div class="program">
- <div class="row">
- <div class="cell_hour">8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
- </div>
- <div class="row">
- <div class="cell_hour">13:00</div>
- <div class="cell_text1">Wyjazd z oÅrodka</div>
- </div>
- <div class="row">
- <div class="cell_hour">16:00</div>
- <div class="cell_text1">Powrót do WrocÅawia</div>
- </div>
-</div>
+ <h2>Program</h2>
+ <br>
+ <h3>Czwartek</h3>
+ <div class="program">
+ <div class="row">
+ <div class="cell_hour">20:00 - 21:30</div>
+ <div class="cell_text1">Obiadokolacja</div>
+ </div>
+
+ <br/>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">21:30 - 21:40</div>
+ <div class="cell_text1">Oficjalne rozpoczÄcie</div>
+ </div>
+ </div>
+
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">21:40 - 22:40</div>
+
+ <div class="cell_text1"><strong>Sesja inauguracyjna</strong>, prowadzÄ
ca: <strong>Dorota Suchocka</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:40 - 22:10</div>
+ <div class="cell_text2"><strong>Piotr Modrzyk</strong>, <a href="http://moosefs.org">MooseFS - coretechnology.pl</a>, <i>MooseFS - Highly Reliable Petabyte Storage</i></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:10 - 22:40</div>
+ <div class="cell_text2"><strong>Ania Dwojak</strong>, <a href="http://google.com">Google</a>, <i>MapReduce dla bardzo poczÄ
tkujÄ
cych</i></div>
+ </div>
+ </div>
+
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">23:00 - 00:05</div>
+ <div class="cell_text1"><strong>Sesja 2</strong>, prowadzÄ
cy: <strong>Maciej JabÅoÅski</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:00 - 23:30</div>
+
+ <div class="cell_text2"><strong>Mietek BÄ
k</strong>, <i>DTrace, czyli sekretne życie programów</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:30 - 23:50</div>
+ <div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>WpÅyw Królewny Ånieżki na informatykÄ</i></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:50 - 00:05</div>
+ <div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Do I really need that shot - metabolizm alkoholu</i></div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">00:00 -</div>
+
+ <div class="cell_text1">Karaoke</div>
+ </div>
+ </div>
+ </div>
+ <h3>PiÄ
tek</h3>
+ <div class="program">
+ <div class="row">
+ <div class="cell_hour_1">8:00 - 9:30</div>
+ <div class="cell_text1">Åniadanie</div>
+
+ </div>
+ <div class="row">
+ <div class="cell_hour">17:30 - 19:00</div>
+ <div class="cell_text1">Obiadokolacja</div>
+ </div>
+ <br/>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">16:30 - 18:10</div>
+ <div class="cell_text1"><strong>Sesja 3</strong>, prowadzÄ
cy: <strong>Karol BÅażejowski</strong></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">16:30 - 17:00</div>
+ <div class="cell_text2"><strong>Marcin Janowski</strong>, <i>BezpieczeÅstwo lokalne w Linuksie</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">17:05 - 17:35</div>
+
+ <div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Czy prywatnoÅÄ w Sieci istnieje?</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">17:40 - 18:10</div>
+ <div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>OpowieÅci z ELFiej krainy</i></div>
+
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">18:10 - 19:00</div>
+ <div class="cell_text1">Przerwa na obiadokolacjÄ</div>
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">19:00 - 20:40</div>
+
+ <div class="cell_text1"><strong>Sesja 4</strong>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:00 - 19:30</div>
+ <div class="cell_text2"><strong>Szymon StefaÅski</strong>, <a href="http://datax.pl">DATAX</a>, <i>Halo, halo? TracÄ zasiÄg.</i> </div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:35 - 20:05</div>
+ <div class="cell_text2"><strong>Björn Pelzer</strong>, <i>Deductive Question Answering</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">20:10 - 20:40</div>
+
+ <div class="cell_text2"><strong>Filip Sieczkowski</strong>, <i>MedLey, czyli mieszanka funkcjonalna</i></div>
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">21:00 - 22:40</div>
+ <div class="cell_text1"><strong>Sesja 5</strong></div>
+ </div>
+
+ <div class="row">
+ <div class="cell_part_hour">21:00 - 21:20</div>
+ <div class="cell_text2"><strong>Lacramioara Astefanoaei</strong>, <i>Time of the numbers</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:25 - 21:45</div>
+
+ <div class="cell_text2"><strong>Kinga Mielcarska</strong>, <i>Bioinformatyka â nowa dziedzina na pograniczu nauk</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:45 - 22:05</div>
+ <div class="cell_text2"><strong>Magda Mielczarek</strong>, <i>Bioinformatyka - Åatwe drzewa filogenetyczne</i></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:10 - 22:40</div>
+ <div class="cell_text2"><strong>Maciek Piróg</strong>, <i>BiaÅe skarpetki i czarne dziury</i></div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">23:00 - 00:05</div>
+
+ <div class="cell_text1"><strong>Sesja 6</strong>, prowadzÄ
cy: <strong>RadosÅaw Warzocha</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:00 - 23:30</div>
+ <div class="cell_text2"><strong>Marek Materzok</strong>, <i>Reaktywnie deklaratywnie</i></div>
+ </div>
+
+ <div class="row">
+ <div class="cell_part_hour">23:35 - 00:05</div>
+ <div class="cell_text2"><strong>Adam DziaÅak</strong>, <i>Demoscena â sztuka malowana algorytmami</i></div>
+ </div>
+ </div>
+ <h3>Sobota</h3>
+ <div class="program">
+ <div class="row">
+
+ <div class="cell_hour"> 8:00 - 9:30</div>
+ <div class="cell_text1">Åniadanie</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">17:30 - 19:00</div>
+ <div class="cell_text1">Obiadokolacja</div>
+ </div>
+ <br/>
+
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">10:00 - 13:00 </div>
+ <div class="cell_text1"><strong>Jakub StÄpniewicz</strong>, <i>WEPnijmy siÄ do sieci - warsztaty</i></div>
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">16:30 - 18:10 </div>
+
+ <div class="cell_text1"><strong>Sesja 7</strong>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">16:30 - 17:00</div>
+ <div class="cell_text2"><strong>Anna Stożek</strong>, <i>UWAGA promieniowanie!</i></div>
+ </div>
+
+ <div class="row">
+ <div class="cell_part_hour">17:05 - 17:35</div>
+ <div class="cell_text2"><strong>Maciek JabÅoÅski</strong>, <i>Backbone.js, czyli jak przestaÅem siÄ martwiÄ i pokochaÅem Javascript</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">17:40 - 18:10</div>
+
+ <div class="cell_text2"><strong>PaweÅ Kalinowski</strong>, <i>Takie rzeczy tylko w eRze</i></div>
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">18:10 - 19:00</div>
+ <div class="cell_text2">Przerwa na obiadokolacjÄ</div>
+ </div>
+
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">19:00 - 20:30</div>
+ <div class="cell_text1"><strong>Sesja 8</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:00 - 19:30</div>
+ <div class="cell_text2"><strong>Bartosz ÄwikÅowski</strong>, <a href="http://clearcode.cc">ClearCode</a>, <i>Co ma wspólnego aukcja z banerem reklamowym?</i></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:35 - 20:20</div>
+ <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>The Kutta-Joukowski theorem</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">20:25 - 20:30</div>
+
+ <div class="cell_text2"><strong>Linda Smug</strong>, <i>Zapach genów</i></div>
+ </div>
+ </div>
+ <div style="margin-bottom: 8px">
+ <div class="row">
+ <div class="cell_hour">20:50 - 22:30</div>
+ <div class="cell_text1"><strong>Sesja 9</strong>, prowadzÄ
cy: <strong>Maciej Piróg</strong></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">20:50 - 21:20</div>
+ <div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Let's make the web faster</i></div>
+ </div>
+ <div class="row">
+
+ <div class="cell_part_hour">21:25 - 21:55</div>
+ <div class="cell_text2"><strong>Adam SowiÅski</strong>, <a href="http://nk.pl">nk.pl</a>, <i>Jak radziÄ sobie z dużymi bazami SQL w praktyce</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:00 - 22:30</div>
+
+ <div class="cell_text2"><strong>Jerzy Marcinkowski</strong>, <i>O zmaganiach z Jakubem...</i></div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">22:50 - 00:05</div>
+ <div class="cell_text1"><strong>Sesja 10</strong>, prowadzÄ
ca: <strong>Dominika RogoziÅska</strong></div>
+
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:50 - 23:20</div>
+ <div class="cell_text2"><strong>Daniel DobrijaÅowski</strong>, <i>Gdzie i jak liczyÄ?</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:25 - 00:05</div>
+
+ <div class="cell_text2"><strong>Karol BÅażejowski</strong>, <i>O biaÅej piance, ale bardziej o tym co jest pod niÄ
</i></div>
+ </div>
+ </div>
+ <h3>Niedziela</h3>
+ <div class="program">
+ <div class="row">
+ <div class="cell_hour">8:00-9:30</div>
+ <div class="cell_text1">Åniadanie</div>
+
+ </div>
+ <div class="row">
+ <div class="cell_hour">13:00</div>
+ <div class="cell_text1">Wyjazd z oÅrodka</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">16:00</div>
+
+ <div class="cell_text1">Powrót do WrocÅawia</div>
+ </div>
+ </div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
b66b1cb4989f5803b75420fa71fc81d577db728f
|
wyÅÄ
czenie zmiany autubusu
|
diff --git a/registration/forms.py b/registration/forms.py
index d65a941..d3211e0 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,175 +1,175 @@
# -*- coding: UTF-8 -*-
from django import forms
from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(ModelForm):
class Meta:
model = UserPreferences
exclude = ('paid', 'minutes_early', 'user')
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
- 'vegetarian', 'bus' ]
+ 'vegetarian', 'bus', 'bus_hour' ]
def __init__(self, *args, **kwargs) :
super(ChangePrefsForm, self) .__init__(*args, **kwargs)
self.fields['org'].choices = organization_choices()[:-1]
free_seats = UserPreferences.get_free_seats()
free_first_time = UserPreferences.get_first_time()
free_second_time = UserPreferences.get_second_time()
if 'instance' in kwargs:
free_first_time = free_first_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[1][0]
free_second_time = free_second_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[2][0]
if not free_first_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[1] )
if not free_second_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[2] )
if self.instance and not self.instance.org.accepted:
self.fields['org'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
self.disable_field(field)
if self.instance and not self.instance.bus:
self.disable_field('bus_hour')
if not free_seats:
self.disable_field('bus')
self.disable_field('bus_hour')
if self.instance and self.instance.paid:
self.disable_field('bus')
self.disable_field('org')
def disable_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
def clean_bus_hour(self):
bus_hour = self.cleaned_data.get('bus_hour', '')
bus = self.cleaned_data.get('bus', '')
if not bus:
if bus_hour <> BUS_HOUR_CHOICES[0][0]:
raise forms.ValidationError("Musisz zaznaczyÄ chÄÄ jazdy autokarem lub pozostawiÄ polÄ godzinÄ pustÄ
.")
return bus_hour
\ No newline at end of file
|
dreamer/zapisy_zosia
|
8eac97f3feb819b21999ef3670f986416824db23
|
fix na zapisy
|
diff --git a/common/helpers.py b/common/helpers.py
index 5b4e498..3489a7b 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,64 +1,68 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
from common.models import ZosiaDefinition
from django.http import Http404
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.registration_start
final_date = definition.registration_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
return not is_registration_enabled()
def is_lecture_suggesting_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.lectures_suggesting_start
final_date = definition.lectures_suggesting_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
return not is_lecture_suggesting_enabled()
-def is_rooming_enabled():
+def is_rooming_enabled(request = None):
+ if request:
+ return has_user_opened_records(request.user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.rooming_start
final_date = definition.rooming_final
+
assert start_date < final_date
- return datetime.now() > start_date and datetime.now() < final_date
+
+ return start_date < datetime.now() < final_date
def has_user_opened_records(user):
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
prefs = UserPreferences.objects.get(user=user)
user_openning_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early)
return user_openning_hour <= datetime.now()
-def is_rooming_disabled():
- return not is_rooming_enabled()
+def is_rooming_disabled(request=None):
+ return not is_rooming_enabled(request)
diff --git a/newrooms/models.py b/newrooms/models.py
index 38f287c..ae14e24 100644
--- a/newrooms/models.py
+++ b/newrooms/models.py
@@ -1,121 +1,121 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
from common.helpers import *
import random
# feature tasks (microbacklog ;) )
# - blocking datatimes
# - unblocking at specified time
# - actually _working_ locators fields
# - set pass / leave room
# - js dialog boxes
# - merging
# - deploy
# - password should not be a pass but token (or maybe default pass should be autogenerated)
# most of non-standard fuss here is about serializing
# and caching rooms in database;
# this probably should be moved into different module
# for usage with built-in django serialization framework
#
# note: caching does not work with lock times atm
# repair this if required after stresstests
class RoomManager(models.Manager):
# this class does basic caching for json data
# when any of room changes then flag update_required
# should be set to True
# this flag prevents database lookup for creating json data
cache = ""
update_required = True
def to_json(self):
if self.update_required:
self.cache = [ x.to_json() for x in self.all() ]
# self.update_required = False # comment this line to disable caching
return "[%s]" % (','.join(self.cache))
class NRoom(models.Model):
number = models.CharField(max_length=16)
capacity = models.PositiveIntegerField(max_length=1) # burżuje jesteÅmy :P
password = models.CharField(max_length=16)
# unlock time for first locator
short_unlock_time = models.DateTimeField()
#long unlock time
#long_unlock_time = models.DateTimeField()
# ok, this probably shouldn't be done this way, but proper one-to-many
# relation requires changing user model which can't be done now
# this should be refactored after ZOSIA09
# locators = models.ManyToManyField(User, through='RoomMembership')
objects = RoomManager()
def get_no_locators(self):
return UserInRoom.objects.filter(room=self.id).count()
- def get_status(self):
- if is_rooming_disabled(): return 3 # zapisy sÄ
zamkniÄte
+ def get_status(self, request=None):
+ if is_rooming_disabled(request): return 3 # zapisy sÄ
zamkniÄte
no_locators = self.get_no_locators()
# doesnt' matter what, if room is empty, it is unlocked
if not no_locators:
return 0
if no_locators >= self.capacity:
return 2 # room is full
# short unlock time is still in future
if self.short_locked():
return 1
#if self.password != "":
# return 1 # password is set
return 0 # default; it's ok to sign into room
def to_json(self):
# json format:
# id - number
# st - status
# nl - number of locators
# mx - max room capacity
# lt - unlock time (optional)
# features? (optional)
#"""[{"id":"id","st":0,"nl":0,"mx":1}]"""
no_locators = self.get_no_locators()
status= self.get_status()
# this is soo wrong... (but works)
optional = ''
# short unlock time is in the future
if self.short_locked():
optional = ',"lt":"%s"' % ( self.short_unlock_time.ctime()[10:-8] )
return '{"id":"%s","st":%s,"nl":%s,"mx":%s%s}' % (self.number,
status, no_locators, self.capacity, optional)
def short_locked(self):
# returns true when time is still in future
ret = self.short_unlock_time > datetime.now()
return ret
#def save(self):
# super(NRoom, self).save()
# # set cached data in manager to be updated
# # self.__class__.objects.update_required = True
def __unicode__(self):
return u"%s" % self.number
class UserInRoom(models.Model):
# user-room-ownership relation # it REALLY should be better implemented...
locator = models.ForeignKey(User, unique=True)
room = models.ForeignKey(NRoom)
ownership = models.BooleanField()
diff --git a/newrooms/views.py b/newrooms/views.py
index b14d230..d43c8b1 100644
--- a/newrooms/views.py
+++ b/newrooms/views.py
@@ -1,191 +1,191 @@
# -*- coding: UTF-8 -*-
from django.views.decorators.cache import cache_page
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from registration.models import UserPreferences
import random
from models import *
from datetime import *
from common.helpers import *
# from models import *
@login_required
def index(request):
"""
"""
user = request.user
title = "Rooms"
return render_to_response('rooms.html',locals())
#@login_required
@cache_page(30)
def json_rooms_list(request):
json = NRoom.objects.to_json()
return HttpResponse(json, mimetype="application/json")
def dict_to_json(d):
ret = []
for k,v in d.items(): ret.append('"%s":"%s"'%(k,v))
return '{%s}'%(','.join(ret))
def get_in_room(usr,room,own=False):
occupation = UserInRoom( locator=usr,
room=room,
ownership=own
)
occupation.save()
def get_room_locators(room):
# return html
occs = UserInRoom.objects.filter(room=room)
if not occs:
return ''
else:
lst = ','.join( [ u" %s"%o.locator for o in occs ] )
return u"MieszkajÄ
tu: %s<br/>" % lst
@login_required
def trytogetin_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
room = NRoom.objects.get(id=int(request.POST['rid']))
if room.password == request.POST['key']:
get_in_room(request.user, room)
return HttpResponse('ok')
return HttpResponse('fail')
@login_required
def open_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
if room.password == request.POST['key']:
occupation.room.short_unlock_time = datetime.now()
occupation.room.save()
return HttpResponse('ok')
@login_required
def close_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
no_locators = 0
if room.password == request.POST['key']:
no_locators = UserInRoom.objects.filter(room=room).count()
if no_locators == 1: # user is still alone in this room
timeout = timedelta(0,10800,0) # 3h == 10800s
occupation.room.short_unlock_time = datetime.now() + timeout
occupation.room.save()
return HttpResponse('ok')
CONST_LEAVE_ROOM_BTN = u'<button onclick=\'window.location=/leave_room/\'>OpuÅÄ pokój</button>'
CONST_OK_BTN = u'<button onclick=\'hideDialog()\'>OK</button>'
CONST_OK2_BTN = u'<button onclick=\'hideDialog()\'>ZostaÅ w pokoju</button>'
# CONST_LEAVE_OPEN_ROOM_BTN = u'<button onclick=\'Rooms.hideDialog(1)\'>Otwórz pokój</button>'
# CONST_USE_KEY_BTN = u'<button>Zamknij pokój</button>'
def leave_open_room_btn(key): return u'<button onclick=\'Rooms.hideDialog(%s)\'>Wejdź i nie zamykaj</button>' % key
def close_room_btn(key): return u'<button onclick=\'Rooms.closeRoom(%s)\'>Wejdź i zamknij kluczem</button>' % key
CONST_FORM = u"""<form><input type=\'submit\' value=\'Ustaw hasÅo\'/></form>"""
@login_required
def leave_room(request):
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
prev_occupation.delete()
except Exception: pass
# finally: TODO check which versions of Python support 'finally' keyword
return HttpResponseRedirect('/rooms/')
@login_required
def modify_room(request):
if not request.POST: raise Http404
# get correct room based on rid
room_number = request.POST['rid'][1:]
room = NRoom.objects.get(number=room_number)
- status = room.get_status()
+ status = room.get_status(request)
json = { "room_number":room_number, "buttons":'', 'msg':'', 'form':'' }
prev_occupation = None
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
except Exception:
pass
if not status:
#
# this room is open
#
msg = ''
no_locators = room.get_no_locators()
if not no_locators:
#
# case when room is empty
#
if prev_occupation:
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw wypisaÄ siÄ z pokoju %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
else:
get_in_room(request.user, room, True)
timeout = timedelta(0,120,0) # 2 minutes
room.short_unlock_time = datetime.now() + timeout
room.password = ''.join([ str(random.choice(range(10))) for _ in range(6) ])
room.save()
json['msg'] = u"<br/>Przekaż klucz swoim znajomym, aby<br/>mogli doÅÄ
czyÄ do tego pokoju.<br/><br/>"
json['form'] = u"Klucz do pokoju: <strong>%s</strong><br/>" % room.password
json['buttons'] = close_room_btn(room.password) + leave_open_room_btn(room.password) + CONST_LEAVE_ROOM_BTN
else:
#
# case when room is not empty
#
if (prev_occupation is not None) and (prev_occupation.room == room):
json['msg'] = 'Mieszkasz w tym pokoju.'
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif (prev_occupation is None):
get_in_room(request.user, room)
json['msg'] = u"<br/>WÅaÅnie doÅÄ
czyÅeÅ do tego pokoju<br/>"
json['buttons'] = CONST_OK2_BTN + CONST_LEAVE_ROOM_BTN
else: # prev_occ and not in this room
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 1:
#
# this room is locked or has password
#
if prev_occupation and (prev_occupation.room == room):
json['msg'] = u"<br/>ZamkniÄty kluczem: <strong>%s</strong><br/>" % room.password
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif not prev_occupation:
json['msg'] = u"<br/>Ten pokój jest zamkniÄty.<br/><input id='in_key' type='text' maxlength='6' size='6'></input><button onclick=\'Rooms.tryGetIn(%s)\'>Dopisz siÄ</button>" % room.id
json['buttons'] = u"<button onclick=\'hideDialog()\'>Anuluj</button>"
else: # prev_occ and not in this room
json['msg'] = u"<br/>Ten pokój jest zamkniÄty kluczem. Ponadto jeÅli chcesz siÄ do niego dopisaÄ musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 2: # room is full
#
# TODO: opcja do wypisania sie?
#
json['msg'] = u"<br/>Ten pokój jest już peÅny.<br/>"
json['buttons'] = CONST_OK_BTN
if prev_occupation and (prev_occupation.room == room):
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif status == 3:
json['msg'] = u"<br/>Zapisy na pokoje sÄ
jeszcze zamkniÄte.<br/>"
json['buttons'] = CONST_OK_BTN
json['locators'] = get_room_locators(room)
return HttpResponse(dict_to_json(json), mimetype="application/json")
|
dreamer/zapisy_zosia
|
f25034b395b37fc25dde661e515bd16d4fab101b
|
regulamin
|
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 81900c8..be8b236 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,274 +1,276 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
{{ form.org }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{% if form.bus_hour.errors %}
<ul class="errorlist">
{% for error in form.bus_hour.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
{% if free_seats %}{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>{% else %}
<div style="display:none">{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label></div>
<div class="messages"><div style="height: auto; background-image: none;">
Wszystkie dosŧÄpne miejsca w autokarach na ZOSIÄ zostaÅy już zarezerwowane. :(
Jeżeli jesteÅ zainteresowany transportem autokarowym - skontaktuj siÄ bezpoÅrednio z organizatorami..</div>
</div>
{% endif %}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid and user_paid_for_bus %}
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
+
+<span><a href="/register/regulations/">Regulamin obozu</a></span>
{% endblock %}
|
dreamer/zapisy_zosia
|
e7acdc2dd2a4f2292086afeee819719aa10adae6
|
pokoje
|
diff --git a/registration/templatetags/time_block_helpers.py b/registration/templatetags/time_block_helpers.py
index e713ec8..f510672 100644
--- a/registration/templatetags/time_block_helpers.py
+++ b/registration/templatetags/time_block_helpers.py
@@ -1,23 +1,22 @@
# -*- coding: UTF-8 -*-
from django import template
from django.utils.translation import ugettext as _
from common.helpers import *
register = template.Library()
@register.simple_tag
def registration_link(x):
if is_registration_disabled(): return ""
p = '<li>'
if x=="Registration": p = '<li id="current">'
return p+'<a href="/register/">%s</a></li>' % _("Registration")
#FIXME move this helper to its own module
@register.simple_tag
def rooming_link(user,x):
- if not has_user_opened_records(user): return ""
p = '<li>'
if x=="Rooms": p = '<li id="current">'
return p+'<a href="/rooms/">%s</a></li>' % "Zapisy na pokoje"
diff --git a/settings.py b/settings.py
index 639c07f..1664018 100644
--- a/settings.py
+++ b/settings.py
@@ -1,112 +1,111 @@
# -*- coding: UTF-8 -*-
# Django settings for zapisy_zosia project.
import os
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[email protected]'),
('dreamer_', '[email protected]')
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'CET'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'pl'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^(*+wz_l2paerc)u(si)-a#aotpk#6___9e*o4(_0tlegdmfl+'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
ROOT_URLCONF = 'zapisy_zosia.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.getcwd()+os.sep+'templates'
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.markup',
#'django.contrib.sites',
'django.contrib.admin',
'django.contrib.formtools',
- #'zapisy_zosia.rooms',
'zapisy_zosia.newrooms',
'zapisy_zosia.lectures',
'zapisy_zosia.registration',
'zapisy_zosia.blog',
'zapisy_zosia.common',
'zapisy_zosia.blurb',
)
AUTHENTICATION_BACKENDS = (
'zapisy_zosia.email-auth.EmailBackend',
)
# well, it's temporary, of course...
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '25'
EMAIL_HOST_USER = '[email protected]' # it doesn't exist afaik
EMAIL_HOST_PASSWORD = 'haselko'
EMAIL_USE_TLS = True
CACHE_BACKEND = 'locmem:///'
CACHE_MIDDLEWARE_SECONDS = 30
SESSION_ENGINE = "django.contrib.sessions.backends.file"
|
dreamer/zapisy_zosia
|
858460fdae5d11a1ce53c82fae1700722bbac62c
|
import pokoi
|
diff --git a/newrooms/management/__init__.py b/newrooms/management/__init__.py
new file mode 100644
index 0000000..7fa60ba
--- /dev/null
+++ b/newrooms/management/__init__.py
@@ -0,0 +1 @@
+__author__ = 'maciek'
diff --git a/newrooms/management/commands/__init__.py b/newrooms/management/commands/__init__.py
new file mode 100644
index 0000000..7fa60ba
--- /dev/null
+++ b/newrooms/management/commands/__init__.py
@@ -0,0 +1 @@
+__author__ = 'maciek'
diff --git a/newrooms/management/commands/import.py b/newrooms/management/commands/import.py
new file mode 100644
index 0000000..40de2bb
--- /dev/null
+++ b/newrooms/management/commands/import.py
@@ -0,0 +1,20 @@
+from django.core.management.base import BaseCommand, CommandError
+from newrooms.models import NRoom
+from datetime import datetime
+
+class Command(BaseCommand):
+ args = '<file>'
+ help = ''
+
+ def handle(self, *args, **options):
+ for file in args:
+ f = open(file, "r")
+ for line in f:
+ l = line.split()
+ room = NRoom()
+ room.number = l[0]
+ room.capacity = int(l[1])
+ room.short_unlock_time = datetime.now()
+ room.save()
+
+ self.stdout.write('Successfully imported\n')
\ No newline at end of file
diff --git a/newrooms/models.py b/newrooms/models.py
index 696e6aa..38f287c 100644
--- a/newrooms/models.py
+++ b/newrooms/models.py
@@ -1,121 +1,121 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
from common.helpers import *
import random
# feature tasks (microbacklog ;) )
# - blocking datatimes
# - unblocking at specified time
# - actually _working_ locators fields
# - set pass / leave room
# - js dialog boxes
# - merging
# - deploy
# - password should not be a pass but token (or maybe default pass should be autogenerated)
# most of non-standard fuss here is about serializing
# and caching rooms in database;
# this probably should be moved into different module
# for usage with built-in django serialization framework
#
# note: caching does not work with lock times atm
# repair this if required after stresstests
class RoomManager(models.Manager):
# this class does basic caching for json data
# when any of room changes then flag update_required
# should be set to True
# this flag prevents database lookup for creating json data
cache = ""
update_required = True
def to_json(self):
if self.update_required:
self.cache = [ x.to_json() for x in self.all() ]
# self.update_required = False # comment this line to disable caching
return "[%s]" % (','.join(self.cache))
class NRoom(models.Model):
number = models.CharField(max_length=16)
capacity = models.PositiveIntegerField(max_length=1) # burżuje jesteÅmy :P
password = models.CharField(max_length=16)
# unlock time for first locator
short_unlock_time = models.DateTimeField()
#long unlock time
#long_unlock_time = models.DateTimeField()
# ok, this probably shouldn't be done this way, but proper one-to-many
# relation requires changing user model which can't be done now
# this should be refactored after ZOSIA09
# locators = models.ManyToManyField(User, through='RoomMembership')
objects = RoomManager()
def get_no_locators(self):
return UserInRoom.objects.filter(room=self.id).count()
def get_status(self):
if is_rooming_disabled(): return 3 # zapisy sÄ
zamkniÄte
no_locators = self.get_no_locators()
# doesnt' matter what, if room is empty, it is unlocked
- if no_locators == 0:
+ if not no_locators:
return 0
if no_locators >= self.capacity:
return 2 # room is full
# short unlock time is still in future
if self.short_locked():
return 1
#if self.password != "":
# return 1 # password is set
return 0 # default; it's ok to sign into room
def to_json(self):
# json format:
# id - number
# st - status
# nl - number of locators
# mx - max room capacity
# lt - unlock time (optional)
# features? (optional)
#"""[{"id":"id","st":0,"nl":0,"mx":1}]"""
no_locators = self.get_no_locators()
status= self.get_status()
# this is soo wrong... (but works)
optional = ''
# short unlock time is in the future
if self.short_locked():
optional = ',"lt":"%s"' % ( self.short_unlock_time.ctime()[10:-8] )
return '{"id":"%s","st":%s,"nl":%s,"mx":%s%s}' % (self.number,
status, no_locators, self.capacity, optional)
def short_locked(self):
# returns true when time is still in future
ret = self.short_unlock_time > datetime.now()
return ret
#def save(self):
# super(NRoom, self).save()
# # set cached data in manager to be updated
# # self.__class__.objects.update_required = True
def __unicode__(self):
return u"%s" % self.number
class UserInRoom(models.Model):
# user-room-ownership relation # it REALLY should be better implemented...
locator = models.ForeignKey(User, unique=True)
room = models.ForeignKey(NRoom)
ownership = models.BooleanField()
diff --git a/newrooms/views.py b/newrooms/views.py
index 0cb4159..b14d230 100644
--- a/newrooms/views.py
+++ b/newrooms/views.py
@@ -1,262 +1,191 @@
# -*- coding: UTF-8 -*-
from django.views.decorators.cache import cache_page
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from registration.models import UserPreferences
import random
from models import *
from datetime import *
from common.helpers import *
# from models import *
@login_required
def index(request):
- user = request.user
- title = "Rooms"
- if has_user_opened_records(user):
- return render_to_response('rooms.html',locals())
- else:
- prefs = UserPreferences.objects.get(user=user)
- user_openning_hour = datetime(2011,2,26,20,00) - timedelta(minutes=prefs.minutes_early)
- return render_to_response('rooming_disabled.html',locals())
+ """
-
-def fill_rooms(request):
- # maybe update this for serious usage?
- def save_room(n,b,c):
- room = NRoom( number = "%s %s"%(b,n),
- capacity = c,
- password = "",
- short_unlock_time = datetime.now()
- )
- room.save()
-
- for n in [1,2,3]:
- save_room(n,'A',4)
- save_room(101,'A',3)
- save_room(102,'A',4)
- save_room(103,'A',4)
- save_room(104,'A',2)
- save_room(105,'A',4)
- save_room(106,'A',4)
- save_room(107,'A',3)
- save_room(108,'A',2)
- save_room(109,'A',2)
- save_room('póÅpiÄtro','A',1)
- save_room(201,'A',2)
- save_room(202,'A',2)
- save_room(203,'A',3)
- save_room(204,'A',3)
- save_room(205,'A',2)
- save_room(206,'A',4)
- save_room(208,'A',3)
- save_room('apartament','A',6)
-
- save_room(1,'B',3)
- save_room(2,'B',2)
- save_room(3,'B',2)
- save_room(4,'B',2)
- save_room(5,'B',2)
- save_room(6,'B',2)
- save_room(7,'B',2)
- save_room(8,'B',2)
- save_room(9,'B',2)
- save_room(10,'B',4)
- save_room(11,'B',2)
- save_room(12,'B',1)
- save_room(101,'B',4)
- save_room(102,'B',2)
- save_room(103,'B',2)
- save_room(104,'B',2)
- save_room(105,'B',2)
- save_room(106,'B',2)
- save_room(107,'B',4)
- save_room(108,'B',4)
- save_room(109,'B',2)
- save_room(110,'B',4)
- save_room(111,'B',2)
- save_room(112,'B',1)
- save_room(201,'B',4)
- save_room(202,'B',2)
- save_room(203,'B',3)
- save_room(204,'B',2)
- save_room(205,'B',2)
- save_room(206,'B',2)
- save_room(207,'B',2)
- save_room(208,'B',2)
- save_room(209,'B',2)
- save_room(210,'B',2)
- save_room(211,'B',4)
-
- return HttpResponse("ok")
+ """
+ user = request.user
+ title = "Rooms"
+ return render_to_response('rooms.html',locals())
#@login_required
@cache_page(30)
def json_rooms_list(request):
json = NRoom.objects.to_json()
return HttpResponse(json, mimetype="application/json")
def dict_to_json(d):
ret = []
for k,v in d.items(): ret.append('"%s":"%s"'%(k,v))
return '{%s}'%(','.join(ret))
def get_in_room(usr,room,own=False):
occupation = UserInRoom( locator=usr,
room=room,
ownership=own
)
occupation.save()
def get_room_locators(room):
# return html
occs = UserInRoom.objects.filter(room=room)
if not occs:
return ''
else:
lst = ','.join( [ u" %s"%o.locator for o in occs ] )
return u"MieszkajÄ
tu: %s<br/>" % lst
@login_required
def trytogetin_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
room = NRoom.objects.get(id=int(request.POST['rid']))
if room.password == request.POST['key']:
get_in_room(request.user, room)
return HttpResponse('ok')
return HttpResponse('fail')
@login_required
def open_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
if room.password == request.POST['key']:
occupation.room.short_unlock_time = datetime.now()
occupation.room.save()
return HttpResponse('ok')
@login_required
def close_room(request):
if not request.POST: raise Http404
if not has_user_opened_records(request.user): return HttpResponse('fail')
occupation = UserInRoom.objects.get(locator=request.user)
if occupation.ownership:
room = occupation.room
+ no_locators = 0
if room.password == request.POST['key']:
- no_locators = UserInRoom.objects.filter(room=room).count()
- if no_locators == 1: # user is still alone in this room
+ no_locators = UserInRoom.objects.filter(room=room).count()
+ if no_locators == 1: # user is still alone in this room
timeout = timedelta(0,10800,0) # 3h == 10800s
occupation.room.short_unlock_time = datetime.now() + timeout
occupation.room.save()
return HttpResponse('ok')
CONST_LEAVE_ROOM_BTN = u'<button onclick=\'window.location=/leave_room/\'>OpuÅÄ pokój</button>'
CONST_OK_BTN = u'<button onclick=\'hideDialog()\'>OK</button>'
CONST_OK2_BTN = u'<button onclick=\'hideDialog()\'>ZostaÅ w pokoju</button>'
# CONST_LEAVE_OPEN_ROOM_BTN = u'<button onclick=\'Rooms.hideDialog(1)\'>Otwórz pokój</button>'
# CONST_USE_KEY_BTN = u'<button>Zamknij pokój</button>'
def leave_open_room_btn(key): return u'<button onclick=\'Rooms.hideDialog(%s)\'>Wejdź i nie zamykaj</button>' % key
def close_room_btn(key): return u'<button onclick=\'Rooms.closeRoom(%s)\'>Wejdź i zamknij kluczem</button>' % key
CONST_FORM = u"""<form><input type=\'submit\' value=\'Ustaw hasÅo\'/></form>"""
@login_required
def leave_room(request):
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
prev_occupation.delete()
except Exception: pass
# finally: TODO check which versions of Python support 'finally' keyword
return HttpResponseRedirect('/rooms/')
@login_required
def modify_room(request):
if not request.POST: raise Http404
# get correct room based on rid
room_number = request.POST['rid'][1:]
room = NRoom.objects.get(number=room_number)
status = room.get_status()
json = { "room_number":room_number, "buttons":'', 'msg':'', 'form':'' }
prev_occupation = None
try:
prev_occupation = UserInRoom.objects.get(locator=request.user)
except Exception:
pass
- if status == 0:
+ if not status:
#
# this room is open
#
msg = ''
no_locators = room.get_no_locators()
- if no_locators == 0:
+ if not no_locators:
#
# case when room is empty
#
if prev_occupation:
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw wypisaÄ siÄ z pokoju %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
else:
get_in_room(request.user, room, True)
timeout = timedelta(0,120,0) # 2 minutes
room.short_unlock_time = datetime.now() + timeout
room.password = ''.join([ str(random.choice(range(10))) for _ in range(6) ])
room.save()
json['msg'] = u"<br/>Przekaż klucz swoim znajomym, aby<br/>mogli doÅÄ
czyÄ do tego pokoju.<br/><br/>"
json['form'] = u"Klucz do pokoju: <strong>%s</strong><br/>" % room.password
json['buttons'] = close_room_btn(room.password) + leave_open_room_btn(room.password) + CONST_LEAVE_ROOM_BTN
else:
#
# case when room is not empty
#
if (prev_occupation is not None) and (prev_occupation.room == room):
json['msg'] = 'Mieszkasz w tym pokoju.'
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif (prev_occupation is None):
get_in_room(request.user, room)
json['msg'] = u"<br/>WÅaÅnie doÅÄ
czyÅeÅ do tego pokoju<br/>"
json['buttons'] = CONST_OK2_BTN + CONST_LEAVE_ROOM_BTN
else: # prev_occ and not in this room
json['msg'] = u"<br/>JeÅli chcesz siÄ dopisaÄ do tego pokoju,<br/>musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 1:
#
# this room is locked or has password
#
if prev_occupation and (prev_occupation.room == room):
json['msg'] = u"<br/>ZamkniÄty kluczem: <strong>%s</strong><br/>" % room.password
json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
elif not prev_occupation:
json['msg'] = u"<br/>Ten pokój jest zamkniÄty.<br/><input id='in_key' type='text' maxlength='6' size='6'></input><button onclick=\'Rooms.tryGetIn(%s)\'>Dopisz siÄ</button>" % room.id
json['buttons'] = u"<button onclick=\'hideDialog()\'>Anuluj</button>"
else: # prev_occ and not in this room
json['msg'] = u"<br/>Ten pokój jest zamkniÄty kluczem. Ponadto jeÅli chcesz siÄ do niego dopisaÄ musisz najpierw opuÅciÄ pokój %s.<br/>" % prev_occupation.room
json['buttons'] = CONST_OK_BTN
elif status == 2: # room is full
#
# TODO: opcja do wypisania sie?
#
json['msg'] = u"<br/>Ten pokój jest już peÅny.<br/>"
json['buttons'] = CONST_OK_BTN
if prev_occupation and (prev_occupation.room == room):
- json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
- #
+ json['buttons'] = CONST_OK_BTN + CONST_LEAVE_ROOM_BTN
+
elif status == 3:
json['msg'] = u"<br/>Zapisy na pokoje sÄ
jeszcze zamkniÄte.<br/>"
json['buttons'] = CONST_OK_BTN
json['locators'] = get_room_locators(room)
return HttpResponse(dict_to_json(json), mimetype="application/json")
diff --git a/pokoje.txt b/pokoje.txt
new file mode 100644
index 0000000..7e48706
--- /dev/null
+++ b/pokoje.txt
@@ -0,0 +1,45 @@
+101 6
+102 4
+103 4
+104 4
+105 4
+106 4
+107 4
+108 4
+109 4
+110 4
+111 4
+112 4
+113 4
+114 4
+115 4
+201 4
+202 4
+203 4
+204 4
+205 4
+206 4
+207 4
+208 4
+209 4
+210 4
+211 4
+212 3
+213 2
+214 2
+215 2
+100 3
+301 2
+302 2
+303 2
+304 2
+305 2
+306 2
+307 2
+308 2
+309 2
+310 1
+311 1
+312 1
+313 1
+314 2
|
dreamer/zapisy_zosia
|
ba0a0b2d5c604f3e338ef871c44a74d9aea68bce
|
goooogle
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 3586fbf..2c7265d 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,76 +1,76 @@
{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Organizator</h4>
<p>
<a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
title='Uniwersytet WrocÅawski'/></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
alt='KoÅo Studentów Informatyki'
title='KoÅo Studentów Informatyki UWr'/></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
</p>
<h4>Patronat</h4>
<p>
<ul>
{# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4 style="margin-bottom:20px;">Partnerzy i sponsorzy</h4>
<p>
<a href="http://clearcode.cc/"><img style="margin-bottom:10px;" src='/static_media/images/logo_clearcode.jpg' alt='DataX' title='ClearCode'/></a>
<a href="http://www.datax.pl/"><img style="margin-bottom:15px;" src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
-{# <a href="http://www.google.com/"><img style="margin-bottom:10px;" src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>#}
+ <a href="http://www.google.com/"><img style="margin-bottom:10px;" src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
<div style="text-align: center"><a href="http://moosefs.org"><img style="margin-bottom:10px;" src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
327c8fe686867375b098bf1ed58817eb9de37ebd
|
change preferences fix
|
diff --git a/registration/views.py b/registration/views.py
index 3a5a542..f7bdc5a 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,308 +1,310 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
free_seats = UserPreferences.get_free_seats()
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
if not free_seats:
prefs.bus = False
else:
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
user_paid = prefs.paid
free_seats = UserPreferences.get_free_seats() or prefs.bus
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
year = definition.zosia_start.year
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
+ elif k in rewritten_post:
+ del rewritten_post[k]
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post, instance=prefs)
else:
form = ChangePrefsForm(request.POST, instance=prefs)
if form.is_valid():
# save everything
prefs = form.save()
payment = count_payment(user)
else:
form = ChangePrefsForm(instance=prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
|
dreamer/zapisy_zosia
|
8a66696b780f90cb87972bc9847fc68598e1c38e
|
bus_hour validator
|
diff --git a/registration/forms.py b/registration/forms.py
index 7b4d385..d65a941 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,175 +1,175 @@
# -*- coding: UTF-8 -*-
from django import forms
from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(ModelForm):
class Meta:
model = UserPreferences
exclude = ('paid', 'minutes_early', 'user')
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
super(ChangePrefsForm, self) .__init__(*args, **kwargs)
self.fields['org'].choices = organization_choices()[:-1]
free_seats = UserPreferences.get_free_seats()
free_first_time = UserPreferences.get_first_time()
free_second_time = UserPreferences.get_second_time()
if 'instance' in kwargs:
free_first_time = free_first_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[1][0]
free_second_time = free_second_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[2][0]
if not free_first_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[1] )
if not free_second_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[2] )
if self.instance and not self.instance.org.accepted:
self.fields['org'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
self.disable_field(field)
if self.instance and not self.instance.bus:
self.disable_field('bus_hour')
if not free_seats:
self.disable_field('bus')
self.disable_field('bus_hour')
if self.instance and self.instance.paid:
self.disable_field('bus')
self.disable_field('org')
def disable_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
def clean_bus_hour(self):
bus_hour = self.cleaned_data.get('bus_hour', '')
bus = self.cleaned_data.get('bus', '')
if not bus:
if bus_hour <> BUS_HOUR_CHOICES[0][0]:
- raise forms.ValidationError("Musisz zaznaczyÄ chÄÄ jazdy autokarem.")
+ raise forms.ValidationError("Musisz zaznaczyÄ chÄÄ jazdy autokarem lub pozostawiÄ polÄ godzinÄ pustÄ
.")
return bus_hour
\ No newline at end of file
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 04a4747..81900c8 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,273 +1,274 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
{{ form.org }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
- {% if form.bus_hour.errors %}
- <ul class="errorlist">
- {% for error in form.bus_hour.errors %}
- <li>{{error|escape}}</li>
- {% endfor %}
- </ul>
- {% endif %}
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
+
+ {% if form.bus_hour.errors %}
+ <ul class="errorlist">
+ {% for error in form.bus_hour.errors %}
+ <li>{{error|escape}}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
{% if free_seats %}{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>{% else %}
<div style="display:none">{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label></div>
<div class="messages"><div style="height: auto; background-image: none;">
Wszystkie dosŧÄpne miejsca w autokarach na ZOSIÄ zostaÅy już zarezerwowane. :(
Jeżeli jesteÅ zainteresowany transportem autokarowym - skontaktuj siÄ bezpoÅrednio z organizatorami..</div>
</div>
{% endif %}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid and user_paid_for_bus %}
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
c03e20dcdcc72487614e3c14bfc0354a115349f4
|
fix bus_hour validator
|
diff --git a/registration/forms.py b/registration/forms.py
index c5f872d..7b4d385 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,167 +1,175 @@
# -*- coding: UTF-8 -*-
from django import forms
from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(ModelForm):
class Meta:
model = UserPreferences
exclude = ('paid', 'minutes_early', 'user')
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
super(ChangePrefsForm, self) .__init__(*args, **kwargs)
self.fields['org'].choices = organization_choices()[:-1]
free_seats = UserPreferences.get_free_seats()
free_first_time = UserPreferences.get_first_time()
free_second_time = UserPreferences.get_second_time()
if 'instance' in kwargs:
free_first_time = free_first_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[1][0]
free_second_time = free_second_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[2][0]
if not free_first_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[1] )
if not free_second_time:
self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[2] )
if self.instance and not self.instance.org.accepted:
self.fields['org'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
self.disable_field(field)
if self.instance and not self.instance.bus:
self.disable_field('bus_hour')
if not free_seats:
self.disable_field('bus')
self.disable_field('bus_hour')
if self.instance and self.instance.paid:
self.disable_field('bus')
self.disable_field('org')
def disable_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
+
+ def clean_bus_hour(self):
+ bus_hour = self.cleaned_data.get('bus_hour', '')
+ bus = self.cleaned_data.get('bus', '')
+ if not bus:
+ if bus_hour <> BUS_HOUR_CHOICES[0][0]:
+ raise forms.ValidationError("Musisz zaznaczyÄ chÄÄ jazdy autokarem.")
+ return bus_hour
\ No newline at end of file
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index f9c3fe2..04a4747 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,266 +1,273 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
{{ form.org }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
+ {% if form.bus_hour.errors %}
+ <ul class="errorlist">
+ {% for error in form.bus_hour.errors %}
+ <li>{{error|escape}}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{% if free_seats %}{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>{% else %}
<div style="display:none">{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label></div>
<div class="messages"><div style="height: auto; background-image: none;">
Wszystkie dosŧÄpne miejsca w autokarach na ZOSIÄ zostaÅy już zarezerwowane. :(
Jeżeli jesteÅ zainteresowany transportem autokarowym - skontaktuj siÄ bezpoÅrednio z organizatorami..</div>
</div>
{% endif %}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid and user_paid_for_bus %}
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
b98e7b1cc1ca689b03155876b0f48f94b773cffc
|
limit autocars
|
diff --git a/registration/forms.py b/registration/forms.py
index 8b0007a..c5f872d 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,148 +1,167 @@
# -*- coding: UTF-8 -*-
from django import forms
from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(ModelForm):
class Meta:
model = UserPreferences
exclude = ('paid', 'minutes_early', 'user')
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
super(ChangePrefsForm, self) .__init__(*args, **kwargs)
self.fields['org'].choices = organization_choices()[:-1]
+
+ free_seats = UserPreferences.get_free_seats()
+ free_first_time = UserPreferences.get_first_time()
+ free_second_time = UserPreferences.get_second_time()
+
+ if 'instance' in kwargs:
+ free_first_time = free_first_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[1][0]
+ free_second_time = free_second_time or kwargs['instance'].bus_hour == BUS_HOUR_CHOICES[2][0]
+
+ if not free_first_time:
+ self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[1] )
+
+ if not free_second_time:
+ self.fields['bus_hour'].choices.remove( BUS_HOUR_CHOICES[2] )
+
if self.instance and not self.instance.org.accepted:
self.fields['org'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
self.disable_field(field)
if self.instance and not self.instance.bus:
self.disable_field('bus_hour')
+ if not free_seats:
+ self.disable_field('bus')
+ self.disable_field('bus_hour')
+
if self.instance and self.instance.paid:
self.disable_field('bus')
self.disable_field('org')
def disable_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
diff --git a/registration/models.py b/registration/models.py
index 65dd47d..4326db1 100644
--- a/registration/models.py
+++ b/registration/models.py
@@ -1,115 +1,130 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from django.template import Context, loader
from common.models import ZosiaDefinition
from datetime import timedelta
# this is small hack to make user
# more meaningfull (we're using email as
# user id anyway)
User.__unicode__ = User.get_full_name
SHIRT_SIZE_CHOICES = (
('S', 'S'),
('M', 'M'),
('L', 'L'),
('XL', 'XL'),
('XXL', 'XXL'),
('XXXL', 'XXXL'),
)
SHIRT_TYPES_CHOICES = (
('m', _('classic')),
('f', _('women')),
)
BUS_HOUR_CHOICES = (
('brak',''),
('16:00', '16:00'),
('18:00', '18:00'),
('obojetne', 'obojÄtne'),
)
+BUS_FIRST_SIZE = 48
+BUS_SECOND_SIZE = 48
+
class Organization(models.Model):
name = models.CharField(max_length=64)
accepted = models.BooleanField()
def __unicode__(self):
return u"%s" % self.name
# converts organizations in database into
# choices for option fields
def getOrgChoices():
list = [ (org.id, org.name)
for org in Organization.objects.filter(accepted=True) ]
list = list[:20]
list.append( ('new', 'inna') )
return tuple(list)
class UserPreferences(models.Model):
# This is the only required field
user = models.ForeignKey(User, unique=True)
org = models.ForeignKey(Organization)
# opÅaty
day_1 = models.BooleanField()
day_2 = models.BooleanField()
day_3 = models.BooleanField()
breakfast_2 = models.BooleanField()
breakfast_3 = models.BooleanField()
breakfast_4 = models.BooleanField()
dinner_1 = models.BooleanField()
dinner_2 = models.BooleanField()
dinner_3 = models.BooleanField()
# inne
bus = models.BooleanField()
vegetarian = models.BooleanField()
paid = models.BooleanField()
# TODO(karol): remove after successfull verification that rest works.
# paid_for_bus = models.BooleanField() # we need this after all :/
shirt_size = models.CharField(max_length=5, choices=SHIRT_SIZE_CHOICES)
shirt_type = models.CharField(max_length=1, choices=SHIRT_TYPES_CHOICES)
# used for opening rooms faster per-user;
# e.g. 5 means room registration will open 5 minutes before global datetime
# e.g. -5 means room registration will open 5 minutes after global datetime
# FIXME needs actual implementation, so far it's only a stub field
minutes_early = models.IntegerField()
# used to differ from times on which buses leave
bus_hour = models.CharField(max_length=10, choices=BUS_HOUR_CHOICES, null=True, default=None)
# ? anonimowy - nie chce zeby jego imie/nazwisko/mail pojawialy sie na stronie
def __unicode__(self):
return u"%s %s" % (self.user.first_name, self.user.last_name)
def save(self):
# at this moment object probably is different from one in
# database - lets check if 'paid' field is different
try:
old = UserPreferences.objects.get(id=self.id)
definition = ZosiaDefinition.objects.get(active_definition=True)
rooming_time = definition.rooming_start
if self.paid and not old.paid:
t = loader.get_template('payment_registered_email.txt')
send_mail( u'WpÅata zostaÅa zaksiÄgowana.',
t.render(Context({'rooming_time': rooming_time - timedelta(minutes=self.minutes_early)})),
'[email protected]',
[ self.user.email ],
fail_silently=True )
except Exception:
# oh, we're saving for the first time - it's ok
# move along, nothing to see here
pass
super(UserPreferences, self).save()
+
+ @staticmethod
+ def get_free_seats():
+ return (BUS_SECOND_SIZE+BUS_FIRST_SIZE - UserPreferences.objects.filter(bus=True).count()) > 0
+
+ @staticmethod
+ def get_first_time():
+ return (BUS_FIRST_SIZE - UserPreferences.objects.filter(bus=True, bus_hour=BUS_HOUR_CHOICES[1][0]).count()) > 0
+
+ @staticmethod
+ def get_second_time():
+ return (BUS_SECOND_SIZE - UserPreferences.objects.filter(bus=True, bus_hour=BUS_HOUR_CHOICES[2][0]).count()) > 0
\ No newline at end of file
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index d06db98..f9c3fe2 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,260 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
{{ form.org }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
- {{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
+ {% if free_seats %}{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>{% else %}
+ <div style="display:none">{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label></div>
+ <div class="messages"><div style="height: auto; background-image: none;">
+ Wszystkie dosŧÄpne miejsca w autokarach na ZOSIÄ zostaÅy już zarezerwowane. :(
+ Jeżeli jesteÅ zainteresowany transportem autokarowym - skontaktuj siÄ bezpoÅrednio z organizatorami..</div>
+ </div>
+ {% endif %}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid and user_paid_for_bus %}
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/templates/register_form.html b/registration/templates/register_form.html
index d181242..53c1886 100644
--- a/registration/templates/register_form.html
+++ b/registration/templates/register_form.html
@@ -1,266 +1,273 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
input[type=text],
input[type=email],
input[type=password] {
width: 15em;
}
input[type=password]:valid,
input[type=email]:valid,
#id_name:valid,
#id_surname:valid {
outline: 1px #03de03 solid;
}
{# This is introduced due to the bug #24. #}
.float_right { float: right; }
{% endblock css %}
{% block javascript %}
function switch_org_form(selEl,addEl) {
if(selEl.value == 'new') {
addEl.style.display = 'inline';
var f_new_org = document.getElementById('id_organization_2');
f_new_org.focus();
} else {
addEl.style.display = 'none';
}
}
function form_onload() {
var f_org = document.getElementById('id_organization_1');
var f_add_org = document.getElementById('id_add_org_1');
f_org.onchange = function () { switch_org_form(f_org,f_add_org); };
switch_org_form(f_org,f_add_org);
}
{% endblock %}
{% block onload %}
form_onload()
{% endblock onload %}
{% block content %}
<h2>{% trans "Registration" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_auth">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
{% if form.email.errors %}
<ul class="errorlist float_right">
{% for error in form.email.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_email">e-mail <span>{% trans "(required)" %}</span></label>
{# In following forms we would love to use build-in form input fields #}
{# e.g. form.email form.password, etc. But currently django doesn't support #}
{# generating html5 fields, therefore we will write html inputs until it #}
{# does :) This way we have client-side validation basically for free. #}
{# #}
{# TODO replace these back to form.field as soon as django will support it #}
<input type="email" name="email" id="id_email" required /> {# form.email #}
</li>
<li>
{% if form.password.errors %}
<ul class="errorlist float_right">
{% for error in form.password.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password">{% trans "password" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password" id="id_password" required pattern=".{6,}" /> {# form.password #}
</li>
<li>
{% if form.password2.errors %}
<ul class="errorlist float_right">
{% for error in form.password2.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password2">{% trans "repeatepas" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password2" id="id_password2" required pattern=".{6,}" /> {# form.password2 #}
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
{% if form.name.errors %}
<ul class="errorlist float_right">
{% for error in form.name.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_name">{% trans "name" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="name" id="id_name" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.name #}
</li>
<li>
{% if form.surname.errors %}
<ul class="errorlist float_right">
{% for error in form.surname.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_surname">{% trans "surname" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="surname" id="id_surname" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.surname #}
</li>
<li>
<label><span/></label>
<comment>{% trans "adding organizations only at registration" %}</comment>
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist float_right">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %} <span>{% trans "(required)" %}</span>
</label>
{{ form.organization_1 }}
<div id="id_add_org_1" class="hidden">{{ form.organization_2 }}</div>
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist float_right">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist float_right">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist float_right">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
- <li>
- {{ form.bus }} <label for="id_bus">Jestem zainteresowany zorganizowanym transportem autokarowym na trasie WrocÅaw - {{ city }} - WrocÅaw</label>
+ <li>{% if free_seats %}
+ {{ form.bus }}
+ <label for="id_bus">Jestem zainteresowany zorganizowanym transportem autokarowym na trasie WrocÅaw - {{ city }} - WrocÅaw</label>
+ {% else %}
+ <div class="messages"><div style="height: auto; background-image: none;">
+ Wszystkie dosŧÄpne miejsca w autokarach na ZOSIÄ zostaÅy już zarezerwowane. :(
+ Jeżeli jesteÅ zainteresowany transportem autokarowym - skontaktuj siÄ bezpoÅrednio z organizatorami..</div>
+ </div>
+ {% endif %}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
<li>
{% trans "RejestrujÄ
c siÄ na obóz, akceptujÄ jego " %}<a href="/register/regulations/">{% trans "regulamin" %}</a>.
</li>
</ol>
</fieldset>
<fieldset><input type="submit" value="{% trans "register" %}" /></fieldset>
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/views.py b/registration/views.py
index c269a89..3a5a542 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,303 +1,308 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
+ free_seats = UserPreferences.get_free_seats()
+
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
- '[email protected]',
+ '[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
- prefs.bus = form.cleaned_data['bus']
+ if not free_seats:
+ prefs.bus = False
+ else:
+ prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
- form = ChangePrefsForm(instance=prefs)
user_paid = prefs.paid
+ free_seats = UserPreferences.get_free_seats() or prefs.bus
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
year = definition.zosia_start.year
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post, instance=prefs)
else:
form = ChangePrefsForm(request.POST, instance=prefs)
if form.is_valid():
# save everything
prefs = form.save()
payment = count_payment(user)
else:
form = ChangePrefsForm(instance=prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
|
dreamer/zapisy_zosia
|
0753e526659f30381c10274640a11d16059fca98
|
sposorzy
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 2c7265d..3586fbf 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,76 +1,76 @@
{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Organizator</h4>
<p>
<a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
title='Uniwersytet WrocÅawski'/></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
alt='KoÅo Studentów Informatyki'
title='KoÅo Studentów Informatyki UWr'/></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
</p>
<h4>Patronat</h4>
<p>
<ul>
{# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4 style="margin-bottom:20px;">Partnerzy i sponsorzy</h4>
<p>
<a href="http://clearcode.cc/"><img style="margin-bottom:10px;" src='/static_media/images/logo_clearcode.jpg' alt='DataX' title='ClearCode'/></a>
<a href="http://www.datax.pl/"><img style="margin-bottom:15px;" src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
- <a href="http://www.google.com/"><img style="margin-bottom:10px;" src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
+{# <a href="http://www.google.com/"><img style="margin-bottom:10px;" src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>#}
<div style="text-align: center"><a href="http://moosefs.org"><img style="margin-bottom:10px;" src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
6f1bfe6b8cb0a42e0d0942cf8d0aca5dcaed489c
|
sposorzy
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index c48c2fc..2c7265d 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,76 +1,76 @@
{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Organizator</h4>
<p>
<a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
title='Uniwersytet WrocÅawski'/></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
alt='KoÅo Studentów Informatyki'
title='KoÅo Studentów Informatyki UWr'/></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
</p>
<h4>Patronat</h4>
<p>
<ul>
{# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
-<h4>Partnerzy i sponsorzy</h4>
+<h4 style="margin-bottom:20px;">Partnerzy i sponsorzy</h4>
<p>
- <a href="http://www.clearcode.cc/"><img src='/static_media/images/logo_clearcode.jpg' alt='DataX' title='ClearCode'/></a>
- <a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
- <a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
- <div style="text-align: center"><a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
+ <a href="http://clearcode.cc/"><img style="margin-bottom:10px;" src='/static_media/images/logo_clearcode.jpg' alt='DataX' title='ClearCode'/></a>
+ <a href="http://www.datax.pl/"><img style="margin-bottom:15px;" src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
+ <a href="http://www.google.com/"><img style="margin-bottom:10px;" src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
+ <div style="text-align: center"><a href="http://moosefs.org"><img style="margin-bottom:10px;" src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
d1acd7af25bfee1a758276404ee035679f975403
|
sponsorzy
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index cf567a7..c48c2fc 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,75 +1,76 @@
{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Organizator</h4>
<p>
<a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
title='Uniwersytet WrocÅawski'/></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
alt='KoÅo Studentów Informatyki'
title='KoÅo Studentów Informatyki UWr'/></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
</p>
<h4>Patronat</h4>
<p>
<ul>
{# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Partnerzy i sponsorzy</h4>
<p>
+ <a href="http://www.clearcode.cc/"><img src='/static_media/images/logo_clearcode.jpg' alt='DataX' title='ClearCode'/></a>
<a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
<a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
<div style="text-align: center"><a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
{% endblock %}
{% endcache %}
diff --git a/static_media/images/logo_clearcode.jpg b/static_media/images/logo_clearcode.jpg
new file mode 100644
index 0000000..15f6e40
Binary files /dev/null and b/static_media/images/logo_clearcode.jpg differ
diff --git a/static_media/images/logo_datax.jpg b/static_media/images/logo_datax.jpg
index 5853e12..ffe8cce 100644
Binary files a/static_media/images/logo_datax.jpg and b/static_media/images/logo_datax.jpg differ
|
dreamer/zapisy_zosia
|
2c31ed4b67c7fe12088172a41a0e8afb78cfd501
|
sponsorzy
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 6df82db..cf567a7 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,76 +1,75 @@
{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Organizator</h4>
<p>
<a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
title='Uniwersytet WrocÅawski'/></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
alt='KoÅo Studentów Informatyki'
title='KoÅo Studentów Informatyki UWr'/></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
</p>
<h4>Patronat</h4>
<p>
<ul>
{# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Partnerzy i sponsorzy</h4>
<p>
-
- <a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
<a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
+ <a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
<div style="text-align: center"><a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
93ebee0ba25681e16c21925a092bfc60ed7647a4
|
aktualizacja wygladu|
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index a1329cf..6df82db 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,87 +1,76 @@
-{% extends "index.html"%}
+{% extends "index.html" %}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
-{% for post in blog_posts %}
- <h2>{{ post.title }}</h2>
- <div class="bp_author">by {{ post.author.get_full_name }}</div>
- <span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
- <div class="blog_post">{{ post.text|textile }}</div>
-{% endfor %}
+ {% for post in blog_posts %}
+ <h2>{{ post.title }}</h2>
+ <div class="bp_author">by {{ post.author.get_full_name }}</div>
+ <span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
+ <div class="blog_post">{{ post.text|textile }}</div>
+ {% endfor %}
{% endblock %}
{% block css %}
-.sponsor_logo {
- margin: 20px;
-}
+ .sponsor_logo {
+ margin: 20px;
+ }
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
+
+<h4>Organizator</h4>
+<p>
+ <a href="http://www.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Uniwersytet WrocÅawski'
+ title='Uniwersytet WrocÅawski'/></a>
+ <a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png'
+ alt='KoÅo Studentów Informatyki'
+ title='KoÅo Studentów Informatyki UWr'/></a>
+ <a href="mailto:[email protected]">[email protected]</a>
+</p>
<h4>Miejsce</h4>
<p>
-<a href="{{ hotel_url }}">{{ hotel }}</a> w
-<a href="{{ city_url }}">{{ city }}</a>
+ <a href="{{ hotel_url }}">{{ hotel }}</a> w
+ <a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
-</p>
<ul style="margin-left:0.2em">
- <li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}</li>
+ <li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}
+ </li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
-<h4>Kontakt</h4>
-<p>
-<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
-<a href="mailto:[email protected]">[email protected]</a>
-</p>
- <h4>Partnerzy i sponsorzy</h4>
-<p>
-<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
-<a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google' /></a>
-<a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX' /></a>
-<a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS' /></a>
</p>
-{% comment %}
-<br/>
+
+
+
<h4>Patronat</h4>
-<p>
-<ul>
-<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
-{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
-<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
-</ul>
-</p>
+ <p>
+ <ul>
+ {# <li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>#}
+ {# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
+ <li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
+ </ul>
+ </p>
-<h4>Sponsorzy</h4>
+<h4>Partnerzy i sponsorzy</h4>
<p>
-<div class="sponsor_logo">
-<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
-</div>
-{#<div class="sponsor_logo">#}
- {# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
-{# </div> #}
-<div class="sponsor_logo">
- <a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
-</div>
-<div class="sponsor_logo">
- <a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
-</div>
-<div class="sponsor_logo">
- <a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
-</div>
+
+ <a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google'/></a>
+ <a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX'/></a>
+ <div style="text-align: center"><a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS'/></a></div>
</p>
-{% endcomment %}
+
{% endblock %}
{% endcache %}
diff --git a/static_media/images/logo_MooseFS.png b/static_media/images/logo_MooseFS.png
index 90c587f..51d61eb 100644
Binary files a/static_media/images/logo_MooseFS.png and b/static_media/images/logo_MooseFS.png differ
diff --git a/static_media/images/logo_datax.jpg b/static_media/images/logo_datax.jpg
index 8302be6..5853e12 100644
Binary files a/static_media/images/logo_datax.jpg and b/static_media/images/logo_datax.jpg differ
|
dreamer/zapisy_zosia
|
4d64b3312571870ece004f44a3925b192af7dc18
|
images
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 470ee0a..a1329cf 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,83 +1,87 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
<h4>Kontakt</h4>
<p>
+<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/logo_ksi.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
+ <h4>Partnerzy i sponsorzy</h4>
<p>
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
-<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
+<a href="http://www.google.com/"><img src='/static_media/images/logo_google.png' alt='Google' title='Google' /></a>
+<a href="http://www.datax.pl/"><img src='/static_media/images/logo_datax.jpg' alt='DataX' title='DataX' /></a>
+<a href="http://moosefs.org"><img src='/static_media/images/logo_MooseFS.png' alt='MooseFS' title='MooseFS' /></a>
</p>
{% comment %}
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
{% endcomment %}
{% endblock %}
{% endcache %}
diff --git a/static_media/images/logo_MooseFS.png b/static_media/images/logo_MooseFS.png
new file mode 100644
index 0000000..90c587f
Binary files /dev/null and b/static_media/images/logo_MooseFS.png differ
diff --git a/static_media/images/logo_datax.jpg b/static_media/images/logo_datax.jpg
new file mode 100644
index 0000000..8302be6
Binary files /dev/null and b/static_media/images/logo_datax.jpg differ
diff --git a/static_media/images/logo_google.png b/static_media/images/logo_google.png
new file mode 100644
index 0000000..8f4f6db
Binary files /dev/null and b/static_media/images/logo_google.png differ
diff --git a/static_media/images/logo_ksi.png b/static_media/images/logo_ksi.png
new file mode 100644
index 0000000..71a8f3a
Binary files /dev/null and b/static_media/images/logo_ksi.png differ
|
dreamer/zapisy_zosia
|
c7ac31c97c8fbd517eb96902e92cab09a353d6f5
|
correct email
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 9b9a5e4..470ee0a 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,83 +1,83 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}</li>
<li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
<li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
<li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
<li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
<h4>Kontakt</h4>
<p>
-<a href="mailto:[email protected]">[email protected]</a>
+<a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
</p>
{% comment %}
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
{% endcomment %}
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
489593f9f38e616037894c1c738dcf66aa59bd98
|
forms fix
|
diff --git a/registration/forms.py b/registration/forms.py
index 0b8a1e4..8b0007a 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,148 +1,148 @@
# -*- coding: UTF-8 -*-
from django import forms
from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(ModelForm):
class Meta:
model = UserPreferences
exclude = ('paid', 'minutes_early', 'user')
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
super(ChangePrefsForm, self) .__init__(*args, **kwargs)
self.fields['org'].choices = organization_choices()[:-1]
if self.instance and not self.instance.org.accepted:
- self.fields['organization_1'].choices.append( (self.instance.org.id, self.instance.org.name) )
+ self.fields['org'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
self.disable_field(field)
if self.instance and not self.instance.bus:
self.disable_field('bus_hour')
if self.instance and self.instance.paid:
self.disable_field('bus')
self.disable_field('org')
def disable_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
|
dreamer/zapisy_zosia
|
46be5a395c125e30f5969646368cfc2429d36e8f
|
registration fix
|
diff --git a/registration/forms.py b/registration/forms.py
index 7a12b51..0b8a1e4 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,167 +1,148 @@
# -*- coding: UTF-8 -*-
-from django import forms
+from django import forms
+from django.forms.models import ModelForm
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
+from registration.models import UserPreferences
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
-class ChangePrefsForm(RegisterForm):
+class ChangePrefsForm(ModelForm):
+ class Meta:
+ model = UserPreferences
+ exclude = ('paid', 'minutes_early', 'user')
+
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
- super(forms.Form, self) .__init__(*args, **kwargs)
- self.fields['organization_1'].choices = self.fields['organization_1'].choices[:-1]
- self.fields['email'] = None
- self.fields['password'] = None
- self.fields['password2'] = None
+ super(ChangePrefsForm, self) .__init__(*args, **kwargs)
+ self.fields['org'].choices = organization_choices()[:-1]
- self.fields['name'] = None
- self.fields['surname'] = None
+ if self.instance and not self.instance.org.accepted:
+ self.fields['organization_1'].choices.append( (self.instance.org.id, self.instance.org.name) )
for field in self.disabled_fields:
- self.disabled_field(field)
-
- def disabled_field(self, name):
- widget = self.fields[name].widget
- widget.attrs['readonly'] = True
-
- def add_bad_org(self,prefs):
- if not prefs.org.accepted:
- self.fields['organization_1'].choices.append( (prefs.org.id,prefs.org.name) )
-
- def initialize(self,prefs):
- # change values depending on given user preferences
- for key in prefs.__dict__.keys():
- if self.fields.has_key(key):
- self.fields[key].initial = prefs.__dict__[key]
- # organization selection
- self.add_bad_org(prefs)
- self.fields['organization_1'].initial = prefs.org.id
-
- if not prefs.bus:
- self.disabled_field('bus_hour')
-
- if prefs.paid:
- self.disabled_field('bus')
- self.disabled_field('organization_1')
-
- bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
-
- paid = False
- def set_paid(self,b): self.paid = b
- def set_bus_hour(self,hour): self.bus_hour = hour
+ self.disable_field(field)
+ if self.instance and not self.instance.bus:
+ self.disable_field('bus_hour')
+ if self.instance and self.instance.paid:
+ self.disable_field('bus')
+ self.disable_field('org')
+ def disable_field(self, name):
+ widget = self.fields[name].widget
+ widget.attrs['readonly'] = True
diff --git a/registration/models.py b/registration/models.py
index 26649e0..65dd47d 100644
--- a/registration/models.py
+++ b/registration/models.py
@@ -1,115 +1,115 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from django.template import Context, loader
from common.models import ZosiaDefinition
from datetime import timedelta
# this is small hack to make user
# more meaningfull (we're using email as
# user id anyway)
User.__unicode__ = User.get_full_name
SHIRT_SIZE_CHOICES = (
('S', 'S'),
('M', 'M'),
('L', 'L'),
('XL', 'XL'),
('XXL', 'XXL'),
('XXXL', 'XXXL'),
)
SHIRT_TYPES_CHOICES = (
('m', _('classic')),
('f', _('women')),
)
BUS_HOUR_CHOICES = (
('brak',''),
('16:00', '16:00'),
('18:00', '18:00'),
- ('obojÄtne', 'obojÄtne'),
+ ('obojetne', 'obojÄtne'),
)
class Organization(models.Model):
name = models.CharField(max_length=64)
accepted = models.BooleanField()
def __unicode__(self):
return u"%s" % self.name
# converts organizations in database into
# choices for option fields
def getOrgChoices():
list = [ (org.id, org.name)
for org in Organization.objects.filter(accepted=True) ]
list = list[:20]
list.append( ('new', 'inna') )
return tuple(list)
class UserPreferences(models.Model):
# This is the only required field
user = models.ForeignKey(User, unique=True)
org = models.ForeignKey(Organization)
# opÅaty
day_1 = models.BooleanField()
day_2 = models.BooleanField()
day_3 = models.BooleanField()
breakfast_2 = models.BooleanField()
breakfast_3 = models.BooleanField()
breakfast_4 = models.BooleanField()
dinner_1 = models.BooleanField()
dinner_2 = models.BooleanField()
dinner_3 = models.BooleanField()
# inne
bus = models.BooleanField()
vegetarian = models.BooleanField()
paid = models.BooleanField()
# TODO(karol): remove after successfull verification that rest works.
# paid_for_bus = models.BooleanField() # we need this after all :/
shirt_size = models.CharField(max_length=5, choices=SHIRT_SIZE_CHOICES)
shirt_type = models.CharField(max_length=1, choices=SHIRT_TYPES_CHOICES)
# used for opening rooms faster per-user;
# e.g. 5 means room registration will open 5 minutes before global datetime
# e.g. -5 means room registration will open 5 minutes after global datetime
# FIXME needs actual implementation, so far it's only a stub field
minutes_early = models.IntegerField()
# used to differ from times on which buses leave
bus_hour = models.CharField(max_length=10, choices=BUS_HOUR_CHOICES, null=True, default=None)
# ? anonimowy - nie chce zeby jego imie/nazwisko/mail pojawialy sie na stronie
def __unicode__(self):
return u"%s %s" % (self.user.first_name, self.user.last_name)
def save(self):
# at this moment object probably is different from one in
# database - lets check if 'paid' field is different
try:
old = UserPreferences.objects.get(id=self.id)
definition = ZosiaDefinition.objects.get(active_definition=True)
rooming_time = definition.rooming_start
if self.paid and not old.paid:
t = loader.get_template('payment_registered_email.txt')
- send_mail( u'WpÅata zostaÅa zaksiÄgowana.',
+ send_mail( u'WpÅata zostaÅa zaksiÄgowana.',
t.render(Context({'rooming_time': rooming_time - timedelta(minutes=self.minutes_early)})),
'[email protected]',
- [ self.user.email ],
+ [ self.user.email ],
fail_silently=True )
except Exception:
# oh, we're saving for the first time - it's ok
# move along, nothing to see here
pass
super(UserPreferences, self).save()
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 0e6c4be..d06db98 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,259 +1,260 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
+ {{ form.org }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid and user_paid_for_bus %}
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/views.py b/registration/views.py
index 403b182..c269a89 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,322 +1,303 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
- send_mail( _('activation_mail_title'),
+ send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
- [ user.email ],
+ [ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
- form = ChangePrefsForm()
+ form = ChangePrefsForm(instance=prefs)
user_paid = prefs.paid
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
year = definition.zosia_start.year
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
+
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
- form = ChangePrefsForm(request.POST)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
- form = ChangePrefsForm(rewritten_post)
- form.add_bad_org(prefs)
- form.set_paid(user_paid)
- form.set_bus_hour(prefs.bus_hour)
+ form = ChangePrefsForm(rewritten_post, instance=prefs)
+ else:
+ form = ChangePrefsForm(request.POST, instance=prefs)
if form.is_valid():
# save everything
- prefs.org = Organization.objects.get(id=form.cleaned_data['organization_1'])
- if prefs.paid:
- pass
- else:
- prefs.day_1 = form.cleaned_data['day_1']
- prefs.day_2 = form.cleaned_data['day_2']
- prefs.day_3 = form.cleaned_data['day_3']
- prefs.breakfast_2 = form.cleaned_data['breakfast_2']
- prefs.breakfast_3 = form.cleaned_data['breakfast_3']
- prefs.breakfast_4 = form.cleaned_data['breakfast_4']
- prefs.dinner_1 = form.cleaned_data['dinner_1']
- prefs.dinner_2 = form.cleaned_data['dinner_2']
- prefs.dinner_3 = form.cleaned_data['dinner_3']
- prefs.shirt_size = form.cleaned_data['shirt_size']
- prefs.shirt_type = form.cleaned_data['shirt_type']
- prefs.bus = form.cleaned_data['bus']
- prefs.bus_hour = form.cleaned_data['bus_hour']
- prefs.vegetarian = form.cleaned_data['vegetarian']
- prefs.save()
+ prefs = form.save()
payment = count_payment(user)
else:
- form.initialize(prefs)
+ form = ChangePrefsForm(instance=prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
|
dreamer/zapisy_zosia
|
a17ceda59b2655f671ab3bb8f80e70b26392e0b6
|
registration fix
|
diff --git a/registration/forms.py b/registration/forms.py
index d55e55c..7a12b51 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,162 +1,167 @@
# -*- coding: UTF-8 -*-
from django import forms
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(RegisterForm):
disabled_fields = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus' ]
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = self.fields['organization_1'].choices[:-1]
+ self.fields['email'] = None
+ self.fields['password'] = None
+ self.fields['password2'] = None
+
+ self.fields['name'] = None
+ self.fields['surname'] = None
for field in self.disabled_fields:
self.disabled_field(field)
def disabled_field(self, name):
widget = self.fields[name].widget
widget.attrs['readonly'] = True
- widget.attrs['disabled'] = True
def add_bad_org(self,prefs):
if not prefs.org.accepted:
self.fields['organization_1'].choices.append( (prefs.org.id,prefs.org.name) )
def initialize(self,prefs):
# change values depending on given user preferences
for key in prefs.__dict__.keys():
if self.fields.has_key(key):
self.fields[key].initial = prefs.__dict__[key]
# organization selection
self.add_bad_org(prefs)
self.fields['organization_1'].initial = prefs.org.id
if not prefs.bus:
self.disabled_field('bus_hour')
if prefs.paid:
self.disabled_field('bus')
self.disabled_field('organization_1')
bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
paid = False
def set_paid(self,b): self.paid = b
def set_bus_hour(self,hour): self.bus_hour = hour
|
dreamer/zapisy_zosia
|
b51c19d27b88b62d0524776832a5a1a51b3f9ae2
|
better ChangePrefsForm
|
diff --git a/registration/forms.py b/registration/forms.py
index 16ad223..d55e55c 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,170 +1,162 @@
# -*- coding: UTF-8 -*-
from django import forms
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
-class ChangePrefsForm(forms.Form):
+class ChangePrefsForm(RegisterForm):
+ disabled_fields = ['day_1', 'day_2', 'day_3',
+ 'breakfast_2', 'breakfast_3', 'breakfast_4',
+ 'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
+ 'vegetarian', 'bus' ]
+
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
- self.fields['organization_1'].choices = organization_choices()[:-1]
+ self.fields['organization_1'].choices = self.fields['organization_1'].choices[:-1]
+
+ for field in self.disabled_fields:
+ self.disabled_field(field)
+
+ def disabled_field(self, name):
+ widget = self.fields[name].widget
+ widget.attrs['readonly'] = True
+ widget.attrs['disabled'] = True
def add_bad_org(self,prefs):
if not prefs.org.accepted:
self.fields['organization_1'].choices.append( (prefs.org.id,prefs.org.name) )
def initialize(self,prefs):
# change values depending on given user preferences
for key in prefs.__dict__.keys():
if self.fields.has_key(key):
self.fields[key].initial = prefs.__dict__[key]
# organization selection
self.add_bad_org(prefs)
self.fields['organization_1'].initial = prefs.org.id
- organization_1 = forms.ChoiceField(choices=organization_choices())
-
- day_1 = forms.BooleanField(required=False)
- day_2 = forms.BooleanField(required=False)
- day_3 = forms.BooleanField(required=False)
+ if not prefs.bus:
+ self.disabled_field('bus_hour')
- breakfast_2 = forms.BooleanField(required=False)
- breakfast_3 = forms.BooleanField(required=False)
- breakfast_4 = forms.BooleanField(required=False)
+ if prefs.paid:
+ self.disabled_field('bus')
+ self.disabled_field('organization_1')
- dinner_1 = forms.BooleanField(required=False)
- dinner_2 = forms.BooleanField(required=False)
- dinner_3 = forms.BooleanField(required=False)
-
- vegetarian = forms.BooleanField(required=False)
- shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
- shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
- bus = forms.BooleanField(required=False)
- #bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
+ bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
paid = False
def set_paid(self,b): self.paid = b
def set_bus_hour(self,hour): self.bus_hour = hour
- def clean_day_3(self):
- day3 = self.cleaned_data.get('day_3')
- day1 = self.cleaned_data.get('day_1')
- day2 = self.cleaned_data.get('day_2')
- if day1 or day2 or day3 or self.paid:
- return day3
- else:
- raise forms.ValidationError(_("At least one day should be selected."))
- clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
- clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 8e9d1c9..0e6c4be 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,283 +1,259 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
-{% comment %}
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
-{% endcomment %}
+
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
- {% if user_paid %} {# FIXME better way to disable this one is required #}
- <script type="text/javascript">
- <!--
- var ids = ['day_1', 'day_2', 'day_3',
- 'breakfast_2', 'breakfast_3', 'breakfast_4',
- 'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
- 'vegetarian', 'bus', 'bus_hour' ]
- for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
- //-->
- </script>
- {% endif %}
-
- {% if not prefs.bus %}
- <script type="text/javascript">
- document.getElementById('id_bus_hour').disabled=true;
- </script>
- {% endif %}
{% if user_paid and user_paid_for_bus %}
- <script type="text/javascript">
- <!--
- document.getElementById('id_bus').disabled=true;
- document.getElementById('id_organization_1').disabled=true;
- //-->
- </script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/views.py b/registration/views.py
index e1a32c4..403b182 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,322 +1,322 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
form = ChangePrefsForm()
user_paid = prefs.paid
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
year = definition.zosia_start.year
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
form = ChangePrefsForm(request.POST)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post)
form.add_bad_org(prefs)
form.set_paid(user_paid)
- #form.set_bus_hour(prefs.bus_hour)
+ form.set_bus_hour(prefs.bus_hour)
if form.is_valid():
# save everything
prefs.org = Organization.objects.get(id=form.cleaned_data['organization_1'])
if prefs.paid:
pass
else:
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.bus = form.cleaned_data['bus']
- #prefs.bus_hour = form.cleaned_data['bus_hour']
+ prefs.bus_hour = form.cleaned_data['bus_hour']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.save()
payment = count_payment(user)
else:
form.initialize(prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
|
dreamer/zapisy_zosia
|
1a20744f0a10bab8ae7fdd615dccb01ec8f9af73
|
longer account number
|
diff --git a/common/models.py b/common/models.py
index 1d4d7cd..e2d0e19 100644
--- a/common/models.py
+++ b/common/models.py
@@ -1,35 +1,35 @@
# -*- coding: UTF-8 -*-
from django.db import models
from datetime import datetime
class ZosiaDefinition(models.Model):
active_definition = models.BooleanField()
# dates
registration_start = models.DateTimeField()
registration_final = models.DateTimeField()
payment_deadline = models.DateTimeField()
lectures_suggesting_start = models.DateTimeField()
lectures_suggesting_final = models.DateTimeField()
rooming_start = models.DateTimeField()
rooming_final = models.DateTimeField()
zosia_start = models.DateTimeField()
zosia_final = models.DateTimeField()
# prices
price_overnight = models.IntegerField()
price_overnight_breakfast = models.IntegerField()
price_overnight_dinner = models.IntegerField()
price_overnight_full = models.IntegerField()
price_transport = models.IntegerField()
price_organization = models.IntegerField()
# bank account
- account_number = models.CharField(max_length=30)
+ account_number = models.CharField(max_length=32)
account_data_1 = models.CharField(max_length=40)
account_data_2 = models.CharField(max_length=40)
account_data_3 = models.CharField(max_length=40)
# place
city = models.CharField(max_length=20)
city_c = models.CharField(max_length=20, verbose_name="miasto w celowniku")
city_url = models.URLField()
hotel = models.CharField(max_length=30)
hotel_url = models.URLField()
\ No newline at end of file
|
dreamer/zapisy_zosia
|
4bc61d5bce1cc7558b1b3336b9a920247de5e5b6
|
More E -> M
|
diff --git a/registration/templates/regulations.html b/registration/templates/regulations.html
index fcece74..799ff76 100644
--- a/registration/templates/regulations.html
+++ b/registration/templates/regulations.html
@@ -1,84 +1,84 @@
{% extends "index.html" %}
{% load i18n %}
{% block css %}
ol ol
{
list-style-type: lower-roman;
}
{% endblock css %}
{% block content %}
<h2>{% trans "Regulamin obozu" %}</h2>
<ol>
<li>
Niniejszy regulamin reguluje zasady obowiÄ
zujÄ
ce uczestników
obozu naukowo-rekreacyjnego ZOSIA {{ zosia_final|date:"Y" }}, majÄ
cego miejsce w Przesiece
w dniach {{ zosia_start|date:"d M Y" }} - {{ zosia_final|date:"d M Y" }}, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
</li>
<li>Organizatorem obozu jest KoÅo Studentów Informatyki z siedzibÄ
w Instytucie Informatyki Uniwersytetu WrocÅawskiego,
przy ul. Joliot-Curie 15, 50-383 WrocÅaw.
</li>
<li>Uczestnikami obozu, zwanymi dalej uczestnikami, mogÄ
byÄ jedynie
te osoby zarejestrowane w serwisie internetowym obozu, które uiÅciÅy
odpowiedniÄ
opÅatÄ wyliczonÄ
indywidualnie dla każdego uczestnika.
</li>
-<li>Obóz rozpoczyna siÄ dnia {{ zosia_start|date:"d E Y" }} i koÅczy dnia {{ zosia_final|date:"d E Y" }},
+<li>Obóz rozpoczyna siÄ dnia {{ zosia_start|date:"d M Y" }} i koÅczy dnia {{ zosia_final|date:"d M Y" }},
jednakże czas pobytu każdego z uczestników jest zależny od jego preferencji
zadeklarowanych w systemie internetowym.
</li>
<li>W trakcie trwania obozu, uczestnik zobowiÄ
zany jest do stosowania siÄ
do poleceŠOrganizatora i osób przez niego wyznaczonych.
</li>
<li>Nieodpowiednie zachowanie uczestnika w trakcie obozu, w szczególnoÅci
niestosowanie siÄ do poleceÅ osób wymienionych w pkt. 5, nadużywanie alkoholu,
stosowanie Årodków odurzajÄ
cych, bÄ
dź inne zachowania nieobyczajne, a także
zachowania stwarzajÄ
ce zagrożenie zdrowia i bezpieczeÅstwa uczestnika
bÄ
dź innych uczestników stanowiÄ
podstawÄ do zastosowania nastÄpujÄ
cych
Årodków dyscyplinujÄ
cych:
<ol>
<li>upomnienia;</li>
<li>powiadomienia wÅadz organizacji macierzystej (uczelni) o zachowaniu uczestnika;</li>
<li>wydalenia z obozu.</li>
</ol>
<li>O zastosowaniu Årodka dyscyplinujÄ
cego, w tym także o rodzaju zastosowanego
Årodka, decyduje jednoosobowo osoba wskazana przez Organizatora jako Kierownik
obozu. Kierownik obozu może zdecydowaÄ o naÅożeniu Årodka najbardziej dotkliwego
bez uprzedniego stosowania pozostaÅych Årodków. Kierownik obozu może zdecydowaÄ
o zastosowaniu wszystkich Årodków dyscyplinujÄ
cych ÅÄ
cznie. WÅadze uczelni
macierzystych wzglÄdem osób bÄdÄ
cych uczestnikami mogÄ
za to samo zachowanie
zastosowaÄ kary dyscyplinarne wynikajÄ
ce z Regulaminu Studiów.
</li>
<li>Uczestnik ponosi odpowiedzialnoÅÄ za szkody wyrzÄ
dzone osobom trzecim
w czasie przebywania na obozie. Organizator nie przejmuje odpowiedzialnoÅci
wzglÄdem osób trzecich za zachowania uczestnika w trakcie obozu.
</li>
<li>Poprzez swój udziaÅ w obozie uczestnik oÅwiadcza wzglÄdem Organizatora,
iż jest w stanie zdrowia umożliwiajÄ
cym bezpieczne uczestnictwo w programie obozu.
</li>
<li>Organizator nie sprawuje pieczy nad osobÄ
uczestnika oraz jego mieniem
w trakcie obozu. W szczególnoÅci Organizator nie ponosi odpowiedzialnoÅci
za mienie uczestnika pozostawione w obiekcie, w którym organizowany jest obóz.
</li>
<li>Uczestnikowi nie przysÅuguje zwrot jego Åwiadczenia na rzecz Organizatora
bÄ
dź czÄÅci tego Åwiadczenia w przypadku niepeÅnego udziaÅu w obozie z przyczyn,
za które Organizator nie odpowiada. W szczególnoÅci zwrot Åwiadczenia bÄ
dź czÄÅci
Åwiadczenia nie przysÅuguje uczestnikowi, wzglÄdem którego zastosowano karÄ
przewidzianÄ
w pkt 6.3.
</li>
<li>Warunki rezygnacji:
<ol>
<li>Rezygnacja z imprezy nastÄpuje w momencie zÅożenia przez uczestnika rezygnacji
w formie pisemnej lub elektronicznej na adres pocztowy Organizatora.
</li>
<li>W przypadku rezygnacji potrÄ
ca siÄ 100% wpÅaconej kwoty.
</li>
<li>Istnieje możliwoÅÄ zwrotu wpÅaconej kwoty, gdy rezygnujÄ
cy uczestnik znajdzie
na to miejsce innego uczestnika.
</li>
</ol>
</ol>
{% endblock content %}
|
dreamer/zapisy_zosia
|
ac76da0c15ae308ce2a99865752323350255cce1
|
E for date formatting doesn't work with Django 1.1
|
diff --git a/registration/templates/regulations.html b/registration/templates/regulations.html
index fd8d878..fcece74 100644
--- a/registration/templates/regulations.html
+++ b/registration/templates/regulations.html
@@ -1,84 +1,84 @@
{% extends "index.html" %}
{% load i18n %}
{% block css %}
ol ol
{
list-style-type: lower-roman;
}
{% endblock css %}
{% block content %}
<h2>{% trans "Regulamin obozu" %}</h2>
<ol>
<li>
Niniejszy regulamin reguluje zasady obowiÄ
zujÄ
ce uczestników
obozu naukowo-rekreacyjnego ZOSIA {{ zosia_final|date:"Y" }}, majÄ
cego miejsce w Przesiece
-w dniach {{ zosia_start|date:"d E Y" }} - {{ zosia_final|date:"d E Y" }}, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
+w dniach {{ zosia_start|date:"d M Y" }} - {{ zosia_final|date:"d M Y" }}, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
</li>
<li>Organizatorem obozu jest KoÅo Studentów Informatyki z siedzibÄ
w Instytucie Informatyki Uniwersytetu WrocÅawskiego,
przy ul. Joliot-Curie 15, 50-383 WrocÅaw.
</li>
<li>Uczestnikami obozu, zwanymi dalej uczestnikami, mogÄ
byÄ jedynie
te osoby zarejestrowane w serwisie internetowym obozu, które uiÅciÅy
odpowiedniÄ
opÅatÄ wyliczonÄ
indywidualnie dla każdego uczestnika.
</li>
<li>Obóz rozpoczyna siÄ dnia {{ zosia_start|date:"d E Y" }} i koÅczy dnia {{ zosia_final|date:"d E Y" }},
jednakże czas pobytu każdego z uczestników jest zależny od jego preferencji
zadeklarowanych w systemie internetowym.
</li>
<li>W trakcie trwania obozu, uczestnik zobowiÄ
zany jest do stosowania siÄ
do poleceŠOrganizatora i osób przez niego wyznaczonych.
</li>
<li>Nieodpowiednie zachowanie uczestnika w trakcie obozu, w szczególnoÅci
niestosowanie siÄ do poleceÅ osób wymienionych w pkt. 5, nadużywanie alkoholu,
stosowanie Årodków odurzajÄ
cych, bÄ
dź inne zachowania nieobyczajne, a także
zachowania stwarzajÄ
ce zagrożenie zdrowia i bezpieczeÅstwa uczestnika
bÄ
dź innych uczestników stanowiÄ
podstawÄ do zastosowania nastÄpujÄ
cych
Årodków dyscyplinujÄ
cych:
<ol>
<li>upomnienia;</li>
<li>powiadomienia wÅadz organizacji macierzystej (uczelni) o zachowaniu uczestnika;</li>
<li>wydalenia z obozu.</li>
</ol>
<li>O zastosowaniu Årodka dyscyplinujÄ
cego, w tym także o rodzaju zastosowanego
Årodka, decyduje jednoosobowo osoba wskazana przez Organizatora jako Kierownik
obozu. Kierownik obozu może zdecydowaÄ o naÅożeniu Årodka najbardziej dotkliwego
bez uprzedniego stosowania pozostaÅych Årodków. Kierownik obozu może zdecydowaÄ
o zastosowaniu wszystkich Årodków dyscyplinujÄ
cych ÅÄ
cznie. WÅadze uczelni
macierzystych wzglÄdem osób bÄdÄ
cych uczestnikami mogÄ
za to samo zachowanie
zastosowaÄ kary dyscyplinarne wynikajÄ
ce z Regulaminu Studiów.
</li>
<li>Uczestnik ponosi odpowiedzialnoÅÄ za szkody wyrzÄ
dzone osobom trzecim
w czasie przebywania na obozie. Organizator nie przejmuje odpowiedzialnoÅci
wzglÄdem osób trzecich za zachowania uczestnika w trakcie obozu.
</li>
<li>Poprzez swój udziaÅ w obozie uczestnik oÅwiadcza wzglÄdem Organizatora,
iż jest w stanie zdrowia umożliwiajÄ
cym bezpieczne uczestnictwo w programie obozu.
</li>
<li>Organizator nie sprawuje pieczy nad osobÄ
uczestnika oraz jego mieniem
w trakcie obozu. W szczególnoÅci Organizator nie ponosi odpowiedzialnoÅci
za mienie uczestnika pozostawione w obiekcie, w którym organizowany jest obóz.
</li>
<li>Uczestnikowi nie przysÅuguje zwrot jego Åwiadczenia na rzecz Organizatora
bÄ
dź czÄÅci tego Åwiadczenia w przypadku niepeÅnego udziaÅu w obozie z przyczyn,
za które Organizator nie odpowiada. W szczególnoÅci zwrot Åwiadczenia bÄ
dź czÄÅci
Åwiadczenia nie przysÅuguje uczestnikowi, wzglÄdem którego zastosowano karÄ
przewidzianÄ
w pkt 6.3.
</li>
<li>Warunki rezygnacji:
<ol>
<li>Rezygnacja z imprezy nastÄpuje w momencie zÅożenia przez uczestnika rezygnacji
w formie pisemnej lub elektronicznej na adres pocztowy Organizatora.
</li>
<li>W przypadku rezygnacji potrÄ
ca siÄ 100% wpÅaconej kwoty.
</li>
<li>Istnieje możliwoÅÄ zwrotu wpÅaconej kwoty, gdy rezygnujÄ
cy uczestnik znajdzie
na to miejsce innego uczestnika.
</li>
</ol>
</ol>
{% endblock content %}
|
dreamer/zapisy_zosia
|
87bb0c84c2dc8a055635a2c66df03a734011a32f
|
Fixed password input pattern
|
diff --git a/registration/templates/register_form.html b/registration/templates/register_form.html
index 6b04bdc..d181242 100644
--- a/registration/templates/register_form.html
+++ b/registration/templates/register_form.html
@@ -1,266 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
input[type=text],
input[type=email],
input[type=password] {
width: 15em;
}
input[type=password]:valid,
input[type=email]:valid,
#id_name:valid,
#id_surname:valid {
outline: 1px #03de03 solid;
}
{# This is introduced due to the bug #24. #}
.float_right { float: right; }
{% endblock css %}
{% block javascript %}
function switch_org_form(selEl,addEl) {
if(selEl.value == 'new') {
addEl.style.display = 'inline';
var f_new_org = document.getElementById('id_organization_2');
f_new_org.focus();
} else {
addEl.style.display = 'none';
}
}
function form_onload() {
var f_org = document.getElementById('id_organization_1');
var f_add_org = document.getElementById('id_add_org_1');
f_org.onchange = function () { switch_org_form(f_org,f_add_org); };
switch_org_form(f_org,f_add_org);
}
{% endblock %}
{% block onload %}
form_onload()
{% endblock onload %}
{% block content %}
<h2>{% trans "Registration" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_auth">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
{% if form.email.errors %}
<ul class="errorlist float_right">
{% for error in form.email.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_email">e-mail <span>{% trans "(required)" %}</span></label>
{# In following forms we would love to use build-in form input fields #}
{# e.g. form.email form.password, etc. But currently django doesn't support #}
{# generating html5 fields, therefore we will write html inputs until it #}
{# does :) This way we have client-side validation basically for free. #}
{# #}
{# TODO replace these back to form.field as soon as django will support it #}
<input type="email" name="email" id="id_email" required /> {# form.email #}
</li>
<li>
{% if form.password.errors %}
<ul class="errorlist float_right">
{% for error in form.password.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password">{% trans "password" %} <span>{% trans "(required)" %}</span></label>
- <input type="password" name="password" id="id_password" required pattern="[A-z\d]{6,}" /> {# form.password #}
+ <input type="password" name="password" id="id_password" required pattern=".{6,}" /> {# form.password #}
</li>
<li>
{% if form.password2.errors %}
<ul class="errorlist float_right">
{% for error in form.password2.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password2">{% trans "repeatepas" %} <span>{% trans "(required)" %}</span></label>
- <input type="password" name="password2" id="id_password2" required pattern="[A-z\d]{6,}" /> {# form.password2 #}
+ <input type="password" name="password2" id="id_password2" required pattern=".{6,}" /> {# form.password2 #}
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
{% if form.name.errors %}
<ul class="errorlist float_right">
{% for error in form.name.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_name">{% trans "name" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="name" id="id_name" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.name #}
</li>
<li>
{% if form.surname.errors %}
<ul class="errorlist float_right">
{% for error in form.surname.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_surname">{% trans "surname" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="surname" id="id_surname" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.surname #}
</li>
<li>
<label><span/></label>
<comment>{% trans "adding organizations only at registration" %}</comment>
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist float_right">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %} <span>{% trans "(required)" %}</span>
</label>
{{ form.organization_1 }}
<div id="id_add_org_1" class="hidden">{{ form.organization_2 }}</div>
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist float_right">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist float_right">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist float_right">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">Jestem zainteresowany zorganizowanym transportem autokarowym na trasie WrocÅaw - {{ city }} - WrocÅaw</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
<li>
{% trans "RejestrujÄ
c siÄ na obóz, akceptujÄ jego " %}<a href="/register/regulations/">{% trans "regulamin" %}</a>.
</li>
</ol>
</fieldset>
<fieldset><input type="submit" value="{% trans "register" %}" /></fieldset>
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
9a55100498f18f26bbff024c9e51c44e8172b23b
|
Revert "Show me if payment is ok in this moment"
|
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index f221f17..8e9d1c9 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,284 +1,283 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
-<h2>{{ payment }}</h2>
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
{% comment %}
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
{% endcomment %}
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
525885542adae93ec88d4d1ef673bd0621a1a340
|
Show me if payment is ok in this moment
|
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 8e9d1c9..f221f17 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,283 +1,284 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
+<h2>{{ payment }}</h2>
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
{% comment %}
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
{% endcomment %}
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
33a8ce4114745ce53afdff83e5cf8a8d32bd45fd
|
Quick fix for unnecessary bus hour
|
diff --git a/registration/forms.py b/registration/forms.py
index f50940a..16ad223 100644
--- a/registration/forms.py
+++ b/registration/forms.py
@@ -1,170 +1,170 @@
# -*- coding: UTF-8 -*-
from django import forms
from models import SHIRT_SIZE_CHOICES, SHIRT_TYPES_CHOICES, BUS_HOUR_CHOICES
from models import getOrgChoices as organization_choices
from django.utils.translation import ugettext as _
def lambda_clean_meal(meal,p1,p2,p3,z):
# ok, this if fuckin hacky function... so stay tuned
# meal is name of field (without suffix) that we wanna validate
# p1, p2, p3 are _pais_ of _numeral suffixes_ (meal_suffix, day_suffix)
#
# we return validator method for (field_3) validating
# if meals are bought for respective hotel nights
#
# this field is reused several times, so its kinda
# hacky path for DRY principle ;)
#
# usecase (in class body):
# clean_supper_3 = lambda_clean_meal('supper',(1,1),(2,2),(3,3))
#
def f(s):
for n,d in [p1,p2,p3]:
mealx = "%s_%s" % (meal,n)
dayx = "%s_%s" % ("day", d)
x = s.cleaned_data.get(mealx)
d = s.cleaned_data.get(dayx)
if x and not d:
raise forms.ValidationError(_("You can buy meal only for adequate hotel night."))
return s.cleaned_data.get("%s_%i" % (meal,z))
return lambda(s):f(s)
class RegisterForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()
email = forms.EmailField(required=True)
password = forms.CharField(widget=forms.PasswordInput())
password2 = forms.CharField(widget=forms.PasswordInput())
name = forms.CharField()
surname = forms.CharField()
organization_1 = forms.ChoiceField(choices=organization_choices())
organization_2 = forms.CharField(required=False)
day_1 = forms.BooleanField(required=False, initial=True)
day_2 = forms.BooleanField(required=False, initial=True)
day_3 = forms.BooleanField(required=False, initial=True)
breakfast_2 = forms.BooleanField(required=False, initial=True)
breakfast_3 = forms.BooleanField(required=False, initial=True)
breakfast_4 = forms.BooleanField(required=False, initial=True)
dinner_1 = forms.BooleanField(required=False, initial=True)
dinner_2 = forms.BooleanField(required=False, initial=True)
dinner_3 = forms.BooleanField(required=False, initial=True)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
def validate_nonempty(self,x):
x = self.cleaned_data.get(x, '').strip()
# FIXME(Karol Stosiek): I comment the line below due to the fact that
# it concatenates composite names. We should indicate an error
# if someone fill a field with space characters included.
# x = x.replace(' ','') # remove spaces
# TODO: regex here!
# [a-ż]+(-[a-ż]+)* for surnames ? ;)
if len(x) == 0:
raise forms.ValidationError("Be nice, fill this field properly.")
return x
def clean_name(self):
return self.validate_nonempty('name')
def clean_surname(self):
return self.validate_nonempty('surname')
def clean_password2(self):
password = self.cleaned_data.get('password', '')
password2 = self.cleaned_data.get('password2', '')
if password != password2:
raise forms.ValidationError("Ops, you made a typo in your password.")
return password2
def clean_password(self):
password = self.cleaned_data.get('password', '')
if len(password) < 6:
raise forms.ValidationError("Password should be at least 6 characters long.")
return password
def clean_day_3(self):
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
day3 = self.cleaned_data.get('day_3')
if day1 or day2 or day3:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
# grrr, this REALLY should not be copied'n'pasted but
# correct form class hierarchy should be developed
# no time :(
class ChangePrefsForm(forms.Form):
def __init__(self, *args, **kwargs) :
super(forms.Form, self) .__init__(*args, **kwargs)
self.fields['organization_1'].choices = organization_choices()[:-1]
def add_bad_org(self,prefs):
if not prefs.org.accepted:
self.fields['organization_1'].choices.append( (prefs.org.id,prefs.org.name) )
def initialize(self,prefs):
# change values depending on given user preferences
for key in prefs.__dict__.keys():
if self.fields.has_key(key):
self.fields[key].initial = prefs.__dict__[key]
# organization selection
self.add_bad_org(prefs)
self.fields['organization_1'].initial = prefs.org.id
organization_1 = forms.ChoiceField(choices=organization_choices())
day_1 = forms.BooleanField(required=False)
day_2 = forms.BooleanField(required=False)
day_3 = forms.BooleanField(required=False)
breakfast_2 = forms.BooleanField(required=False)
breakfast_3 = forms.BooleanField(required=False)
breakfast_4 = forms.BooleanField(required=False)
dinner_1 = forms.BooleanField(required=False)
dinner_2 = forms.BooleanField(required=False)
dinner_3 = forms.BooleanField(required=False)
vegetarian = forms.BooleanField(required=False)
shirt_size = forms.ChoiceField(choices=SHIRT_SIZE_CHOICES)
shirt_type = forms.ChoiceField(choices=SHIRT_TYPES_CHOICES)
bus = forms.BooleanField(required=False)
- bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
+ #bus_hour = forms.ChoiceField(choices=BUS_HOUR_CHOICES)
paid = False
def set_paid(self,b): self.paid = b
def set_bus_hour(self,hour): self.bus_hour = hour
def clean_day_3(self):
day3 = self.cleaned_data.get('day_3')
day1 = self.cleaned_data.get('day_1')
day2 = self.cleaned_data.get('day_2')
if day1 or day2 or day3 or self.paid:
return day3
else:
raise forms.ValidationError(_("At least one day should be selected."))
clean_dinner_3 = lambda_clean_meal('dinner', (1,1), (2,2), (3,3), 3 )
clean_breakfast_4 = lambda_clean_meal('breakfast', (2,1), (3,2), (4,3), 4 )
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index a0c89e4..8e9d1c9 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,280 +1,283 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
+
+{% comment %}
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
+{% endcomment %}
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
{% endifequal %} </label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
{% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/views.py b/registration/views.py
index 403b182..e1a32c4 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,322 +1,322 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
form = ChangePrefsForm()
user_paid = prefs.paid
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
year = definition.zosia_start.year
date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
(definition.zosia_start + timedelta(days=2)),\
(definition.zosia_start + timedelta(days=3))
city = definition.city
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
form = ChangePrefsForm(request.POST)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post)
form.add_bad_org(prefs)
form.set_paid(user_paid)
- form.set_bus_hour(prefs.bus_hour)
+ #form.set_bus_hour(prefs.bus_hour)
if form.is_valid():
# save everything
prefs.org = Organization.objects.get(id=form.cleaned_data['organization_1'])
if prefs.paid:
pass
else:
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.bus = form.cleaned_data['bus']
- prefs.bus_hour = form.cleaned_data['bus_hour']
+ #prefs.bus_hour = form.cleaned_data['bus_hour']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.save()
payment = count_payment(user)
else:
form.initialize(prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
|
dreamer/zapisy_zosia
|
1abb07eb389a79c99580f7793563c4dd2b1e2247
|
fine with Django 1.1
|
diff --git a/registration/models.py b/registration/models.py
index e5e9e2a..26649e0 100644
--- a/registration/models.py
+++ b/registration/models.py
@@ -1,115 +1,115 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from django.template import Context, loader
from common.models import ZosiaDefinition
from datetime import timedelta
# this is small hack to make user
# more meaningfull (we're using email as
# user id anyway)
User.__unicode__ = User.get_full_name
SHIRT_SIZE_CHOICES = (
('S', 'S'),
('M', 'M'),
('L', 'L'),
('XL', 'XL'),
('XXL', 'XXL'),
('XXXL', 'XXXL'),
)
SHIRT_TYPES_CHOICES = (
('m', _('classic')),
('f', _('women')),
)
BUS_HOUR_CHOICES = (
('brak',''),
('16:00', '16:00'),
('18:00', '18:00'),
('obojÄtne', 'obojÄtne'),
)
class Organization(models.Model):
name = models.CharField(max_length=64)
accepted = models.BooleanField()
def __unicode__(self):
return u"%s" % self.name
# converts organizations in database into
# choices for option fields
def getOrgChoices():
list = [ (org.id, org.name)
for org in Organization.objects.filter(accepted=True) ]
list = list[:20]
list.append( ('new', 'inna') )
return tuple(list)
class UserPreferences(models.Model):
# This is the only required field
user = models.ForeignKey(User, unique=True)
org = models.ForeignKey(Organization)
# opÅaty
day_1 = models.BooleanField()
day_2 = models.BooleanField()
day_3 = models.BooleanField()
breakfast_2 = models.BooleanField()
breakfast_3 = models.BooleanField()
breakfast_4 = models.BooleanField()
dinner_1 = models.BooleanField()
dinner_2 = models.BooleanField()
dinner_3 = models.BooleanField()
# inne
bus = models.BooleanField()
vegetarian = models.BooleanField()
paid = models.BooleanField()
# TODO(karol): remove after successfull verification that rest works.
# paid_for_bus = models.BooleanField() # we need this after all :/
- shirt_size = models.CharField(max_length=2, choices=SHIRT_SIZE_CHOICES)
+ shirt_size = models.CharField(max_length=5, choices=SHIRT_SIZE_CHOICES)
shirt_type = models.CharField(max_length=1, choices=SHIRT_TYPES_CHOICES)
# used for opening rooms faster per-user;
# e.g. 5 means room registration will open 5 minutes before global datetime
# e.g. -5 means room registration will open 5 minutes after global datetime
# FIXME needs actual implementation, so far it's only a stub field
minutes_early = models.IntegerField()
# used to differ from times on which buses leave
bus_hour = models.CharField(max_length=10, choices=BUS_HOUR_CHOICES, null=True, default=None)
# ? anonimowy - nie chce zeby jego imie/nazwisko/mail pojawialy sie na stronie
def __unicode__(self):
return u"%s %s" % (self.user.first_name, self.user.last_name)
def save(self):
# at this moment object probably is different from one in
# database - lets check if 'paid' field is different
try:
old = UserPreferences.objects.get(id=self.id)
definition = ZosiaDefinition.objects.get(active_definition=True)
rooming_time = definition.rooming_start
if self.paid and not old.paid:
t = loader.get_template('payment_registered_email.txt')
send_mail( u'WpÅata zostaÅa zaksiÄgowana.',
t.render(Context({'rooming_time': rooming_time - timedelta(minutes=self.minutes_early)})),
'[email protected]',
[ self.user.email ],
fail_silently=True )
except Exception:
# oh, we're saving for the first time - it's ok
# move along, nothing to see here
pass
super(UserPreferences, self).save()
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 8ae3e35..a0c89e4 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,268 +1,280 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
- {{ user_opening_hour|date:"D, d E Y, H:i" }}
+ {{ user_opening_hour|date:"D, d F Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
- <li>
- {{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
+ <li>
+ {{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
+ {{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
+ {% else %}
+ {{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
+ {% endifequal %} </label>
</li>
<li>
- {{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
+ {{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
+ {{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
+ {% else %}
+ {{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
+ {% endifequal %} </label>
</li>
<li>
- {{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
+ {{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
+ {{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
+ {% else %}
+ {{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
+ {% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
+ {{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
- {{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
+ {{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
- {{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
+ {{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2_day }} {{ date_1 }}</label>
+ {{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
- {{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
+ {{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
- {{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
+ {{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/templates/register_form.html b/registration/templates/register_form.html
index 6fd2590..6b04bdc 100644
--- a/registration/templates/register_form.html
+++ b/registration/templates/register_form.html
@@ -1,266 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
input[type=text],
input[type=email],
input[type=password] {
width: 15em;
}
input[type=password]:valid,
input[type=email]:valid,
#id_name:valid,
#id_surname:valid {
outline: 1px #03de03 solid;
}
{# This is introduced due to the bug #24. #}
.float_right { float: right; }
{% endblock css %}
{% block javascript %}
function switch_org_form(selEl,addEl) {
if(selEl.value == 'new') {
addEl.style.display = 'inline';
var f_new_org = document.getElementById('id_organization_2');
f_new_org.focus();
} else {
addEl.style.display = 'none';
}
}
function form_onload() {
var f_org = document.getElementById('id_organization_1');
var f_add_org = document.getElementById('id_add_org_1');
f_org.onchange = function () { switch_org_form(f_org,f_add_org); };
switch_org_form(f_org,f_add_org);
}
{% endblock %}
{% block onload %}
form_onload()
{% endblock onload %}
{% block content %}
<h2>{% trans "Registration" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_auth">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
{% if form.email.errors %}
<ul class="errorlist float_right">
{% for error in form.email.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_email">e-mail <span>{% trans "(required)" %}</span></label>
{# In following forms we would love to use build-in form input fields #}
{# e.g. form.email form.password, etc. But currently django doesn't support #}
{# generating html5 fields, therefore we will write html inputs until it #}
{# does :) This way we have client-side validation basically for free. #}
{# #}
{# TODO replace these back to form.field as soon as django will support it #}
<input type="email" name="email" id="id_email" required /> {# form.email #}
</li>
<li>
{% if form.password.errors %}
<ul class="errorlist float_right">
{% for error in form.password.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password">{% trans "password" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password" id="id_password" required pattern="[A-z\d]{6,}" /> {# form.password #}
</li>
<li>
{% if form.password2.errors %}
<ul class="errorlist float_right">
{% for error in form.password2.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password2">{% trans "repeatepas" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password2" id="id_password2" required pattern="[A-z\d]{6,}" /> {# form.password2 #}
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
{% if form.name.errors %}
<ul class="errorlist float_right">
{% for error in form.name.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_name">{% trans "name" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="name" id="id_name" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.name #}
</li>
<li>
{% if form.surname.errors %}
<ul class="errorlist float_right">
{% for error in form.surname.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_surname">{% trans "surname" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="surname" id="id_surname" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.surname #}
</li>
<li>
<label><span/></label>
<comment>{% trans "adding organizations only at registration" %}</comment>
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist float_right">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %} <span>{% trans "(required)" %}</span>
</label>
{{ form.organization_1 }}
<div id="id_add_org_1" class="hidden">{{ form.organization_2 }}</div>
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist float_right">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.day_1 }} <label for="id_day_1">{% if date_1.month == date_2.month %}
+ {{ form.day_1 }} <label for="id_day_1">{% ifequal date_1.month date_2.month %}
{{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
{% else %}
{{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
- {% endif %} </label>
+ {% endifequal %} </label>
</li>
<li>
- {{ form.day_2 }} <label for="id_day_2">{% if date_2.month == date_3.month %}
+ {{ form.day_2 }} <label for="id_day_2">{% ifequal date_2.month date_3.month %}
{{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
{% else %}
{{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
- {% endif %} </label>
+ {% endifequal %} </label>
</li>
<li>
- {{ form.day_3 }} <label for="id_day_3">{% if date_3.month == date_4.month %}
+ {{ form.day_3 }} <label for="id_day_3">{% ifequal date_3.month date_4.month %}
{{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
{% else %}
{{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
- {% endif %} </label>
+ {% endifequal %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist float_right">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist float_right">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">Jestem zainteresowany zorganizowanym transportem autokarowym na trasie WrocÅaw - {{ city }} - WrocÅaw</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
<li>
{% trans "RejestrujÄ
c siÄ na obóz, akceptujÄ jego " %}<a href="/register/regulations/">{% trans "regulamin" %}</a>.
</li>
</ol>
</fieldset>
<fieldset><input type="submit" value="{% trans "register" %}" /></fieldset>
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
3cb1a24e412aaa2cbc775d36b6bd79f4356e49f0
|
no more hardcoded data
|
diff --git a/README b/README
index 4b873a9..a7196cd 100644
--- a/README
+++ b/README
@@ -1,150 +1,149 @@
LEGAL STUFF
"THE BEER/PIZZA-WARE LICENSE" (Revision 42):
<[email protected]> wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer (or pizza) in return. Patryk Obara
--------------------------------------------------------------------------------
A little bit of code was copied and slightly modified from Django itself;
all of it is in templates so any file in */template/ dir is under BSD.
The YAML framework is published under the Creative Commons Attribution 2.0 License.
Smiley images in static_media/images are part of GNOME project, thus under GPLv2.
logo_zosi.svg was created by Adrian Dziubek
sorttable.js was written Stuart Langridge, published under X11 license.
-------------------------------------------------------------------------------
Every command example below is assumed to be run with zapisy_zosia as current
directory unless explicitly stated otherwise.
PREREQUISITIES
you will of course need:
- django (>=1.0) [looks like 1.1 works just fine :) ]
- python (>=2.5, <3.0)
- textile (2.1.3 works fine; called python-textile in Fedora)
Textile is the least popular of bunch, so in case you don't find it in repository:
$ sudo easy_install textile
if bash will complain to you, that command is not found then:
1) blame your distribution
2) install package setuptools (some distros may name it python-setuptools)
if not found again, go to step 1 or...
3) compile it yourself (http://pypi.python.org/pypi/textile)
DEVELOPMENT
to create database:
$ python manage.py syncdb
to run developer server (port 8000):
$ python manage.py runserver
TRANSLATION
update *.po files, and run
$ django-admin compilemessages
CHANGES REQUIRED BEFORE DEPLOYING ZAPISY FOR NEW ZOSIA
* Change the text of email messages - that is, the content of the txt files in
the zapisy_zosia/templates directory.
* Update all dates - change dates in functions in common/helpers.py
* Update costs: function count_payment(user) in registration/views.py
* Update rest of templates: including place, dates, costs, bank account,
sponsors, links, etc
FIRST DEPLOYMENT
1) Following will create zapisy_zosia directory and put all files inside:
$ git clone http://github.com/dreamer_/zapisy_zosia.git
Cloning using git is recommended; if you don't want to use git, you can
simply unpack tarball with files wherever you want (it will block you from
upgrading in future, so, beware).
2) Update settings.py file with correct database name/pass, mailer address/pass
3) In settings.py change DEBUG variable to False
4) $ python manage.py syncdb
5) Update web server configuration so that it runs this Django project.
6) If you own a domain that you want to point to this application, configure the
domain records and update Apache's configuration so that it recognizes the
redirection.
7) Restart server!
UPDATING ALREADY DEPLOYED VERSION
0) If zosia was not touched since last year, you may want to clean db a bit;
easiest way to achieve it is to go to admin panel and remove all users.
Just remember:
- Don't remove yourself!
- Create backup of blogposts and lectures from previous year - removing
authors will remove their blog notes or lectures.
- Remove old organizations from organization list - leave only those
few that matters (KSI and II for example).
- Remove all rooms, too.
1) Make sure there are no local changes in repository:
$ git diff
If there are no changes, then go to step (2), otherwise (perhaps settings.py
file changed?) commit all changes:
$ git commit -a -m "Local deployment changes"
2) Following incantation will get latest version from origin repo and reapply
changes required by local deployment (such as settings.py file):
$ git pull --rebase
3) In case incantation from step (2) failed, resolve carefully all conflicts.
4) If pulled changes were in:
- templates only: they will be picked up automatically, you're ready to go
- model: you have to manually ALTER tables in database
tip: $ python manage.py sqlall <appname>
- code/translations: you need server restart, contact administrator
5) Follow step (6) or (7) from FIRST DEPLOYMENT section, if they are required
Usually, this procedure could be shortened to:
$ git pull --rebase
# <server restart>
But follow steps 1-4 closely, to make sure you didn't miss anything.
Oh, one more thing:
REMEMBER, never push from deployment repository!
----------------------------------------------------------------------------
Q: How to change, how much does this Zosia cost (breakfasts/dinners/night) ?
A: Change values in your zosia definition (admin panel) if there is something different in payment rules,
change model, registatration form and look @ function count_payment(user) in registration/views.py
Q: How can I change dates for my zosia deployment? It's not 2010 any more!
-A: Change values in your zosia definition (admin panel) and change file locale/pl/LC_MESSAGES/django.po,
- templates/index.html if needed
+A: Change values in your zosia definition (admin panel) and change templates/index.html if needed
Q: Where is my CSS on admin pages?! I just deployed zosia and my admin page
is unusable!!!
A: Ops! system expects them to be in /static_media/css/ directory, but for
release deployment this may not work out of the box; try linking
correct files in filesystem, e.g.:
base.css -> /usr/share/python-support/python-django/django/contrib/admin/media/css/base.css
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 00c0390..9b9a5e4 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,83 +1,83 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
<a href="{{ hotel_url }}">{{ hotel }}</a> w
<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
- <li>zapisy i wpÅaty<br/>od {{ registration_start|date:"d E Y" }}<br/>do {{ registration_final|date:"d E Y, H:i" }}</li>
- <li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"d E Y, H:i" }}</li>
- <li>zapisy na pokoje<br/>od {{ rooming_start|date:"d E Y" }}<br/>do {{ rooming_final|date:"d E Y, H:i" }}</li>
- <li>wyjazd<br/>{{ zosia_start|date:"d E Y" }}</li>
- <li>powrót<br/>{{ zosia_final|date:"d E Y" }}</li>
+ <li>zapisy i wpÅaty<br/>od {{ registration_start|date:"j F Y" }}<br/>do {{ registration_final|date:"j F Y, H:i" }}</li>
+ <li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"j F Y, H:i" }}</li>
+ <li>zapisy na pokoje<br/>od {{ rooming_start|date:"j F Y" }}<br/>do {{ rooming_final|date:"j F Y, H:i" }}</li>
+ <li>wyjazd<br/>{{ zosia_start|date:"j F Y" }}</li>
+ <li>powrót<br/>{{ zosia_final|date:"j F Y" }}</li>
</ul>
<h4>Kontakt</h4>
<p>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
</p>
{% comment %}
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
{% endcomment %}
{% endblock %}
{% endcache %}
diff --git a/blog/views.py b/blog/views.py
index f512937..da5b3ec 100644
--- a/blog/views.py
+++ b/blog/views.py
@@ -1,41 +1,41 @@
# -*- coding: UTF-8 -*-
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from common.forms import LoginForm
from common.models import ZosiaDefinition
from models import *
def main_view(view):
def new_view(*args):
locals = view(*args)
locals['user'] = args[0].user
locals['title'] = "Blog"
locals['login_form'] = LoginForm()
return render_to_response('blog.html',locals)
return new_view
@main_view
def index(request):
user = request.user
blog_posts = BlogPost.objects.order_by('-pub_date')
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
registration_start = definition.registration_start
registration_final = definition.registration_final
lectures_suggesting_final = definition.lectures_suggesting_final
rooming_start = definition.rooming_start
rooming_final = definition.rooming_final
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
- city = definition.city
+ city = definition.city_c
city_url = definition.city_url
hotel = definition.hotel
hotel_url = definition.hotel_url
return locals()
diff --git a/common/helpers.py b/common/helpers.py
index a9b8949..5b4e498 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,64 +1,64 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
from common.models import ZosiaDefinition
from django.http import Http404
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.registration_start
final_date = definition.registration_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
return not is_registration_enabled()
def is_lecture_suggesting_enabled():
# this is the only place that should be changed
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.lectures_suggesting_start
final_date = definition.lectures_suggesting_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
return not is_lecture_suggesting_enabled()
def is_rooming_enabled():
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
start_date = definition.rooming_start
final_date = definition.rooming_final
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def has_user_opened_records(user):
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
prefs = UserPreferences.objects.get(user=user)
- user_openning_hour = definition.registration_start - timedelta(minutes=prefs.minutes_early)
+ user_openning_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early)
return user_openning_hour <= datetime.now()
def is_rooming_disabled():
return not is_rooming_enabled()
diff --git a/common/models.py b/common/models.py
index e5b1175..1d4d7cd 100644
--- a/common/models.py
+++ b/common/models.py
@@ -1,34 +1,35 @@
# -*- coding: UTF-8 -*-
from django.db import models
from datetime import datetime
class ZosiaDefinition(models.Model):
active_definition = models.BooleanField()
# dates
registration_start = models.DateTimeField()
registration_final = models.DateTimeField()
payment_deadline = models.DateTimeField()
lectures_suggesting_start = models.DateTimeField()
lectures_suggesting_final = models.DateTimeField()
rooming_start = models.DateTimeField()
rooming_final = models.DateTimeField()
zosia_start = models.DateTimeField()
zosia_final = models.DateTimeField()
# prices
price_overnight = models.IntegerField()
price_overnight_breakfast = models.IntegerField()
price_overnight_dinner = models.IntegerField()
price_overnight_full = models.IntegerField()
price_transport = models.IntegerField()
price_organization = models.IntegerField()
# bank account
account_number = models.CharField(max_length=30)
account_data_1 = models.CharField(max_length=40)
account_data_2 = models.CharField(max_length=40)
account_data_3 = models.CharField(max_length=40)
# place
- city = models.CharField(max_length=20, verbose_name="miasto w celowniku")
+ city = models.CharField(max_length=20)
+ city_c = models.CharField(max_length=20, verbose_name="miasto w celowniku")
city_url = models.URLField()
hotel = models.CharField(max_length=30)
hotel_url = models.URLField()
\ No newline at end of file
diff --git a/registration/admin.py b/registration/admin.py
index 6f4db2a..6ff0bdd 100644
--- a/registration/admin.py
+++ b/registration/admin.py
@@ -1,133 +1,134 @@
from django.contrib import admin
from models import *
from views import count_payment
class UserPreferencesAdmin(admin.ModelAdmin):
list_per_page = 200
list_display = (
'user',
'total_cost',
'ZOSIA_cost',
'bus_cost',
'days',
'breakfasts',
'dinners',
'vegetarian',
'shirt',
'org',
- 'minutes_early'
+ 'paid',
+ 'minutes_early',
)
search_fields = ('user__first_name', 'user__last_name')
list_filter = ('bus_hour',)
- list_editable = ('minutes_early',)
+ list_editable = ('minutes_early', 'paid')
def anim_icon(self,id):
return '<img src="/static_media/images/macthrob-small.png" alt="loading" id="anim%s" style="display:none"/>'%id
yes_icon = '<img src="/static_media/images/icon-yes.gif" alt="Yes" />'
no_icon = '<img src="/static_media/images/icon-no.gif" alt="No" />'
def onclick(self,id,obj):
return u"""if(confirm('Do you want to register payment from %s?')) {
document.getElementById('anim%s').style.display='inline';
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
document.getElementById('anim%s').style.display='none';
if( xhr.status == 200) {
window.location.reload();
}
}
};
xhr.open('POST', '/admin/register_payment/', true);
xhr.send('id=%s');
}""" % (obj, id, id, id)
def bus_onclick(self,obj):
id = obj.id
return u"""if(confirm('Do you want to register transport payment from %s?')) {
//document.getElementById('anim%s').style.display='inline';
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
//document.getElementById('anim%s').style.display='none';
if( xhr.status == 200) {
window.location.reload();
}
}
};
xhr.open('POST', '/admin/register_bus_payment/', true);
xhr.send('id=%s');
}""" % (obj, id, id, id)
def total_cost(self, obj):
r = self.no_icon
if obj.paid and (obj.paid_for_bus or not obj.bus):
r = self.yes_icon
return u"%s %s z\u0142" % (r, (count_payment(obj)+40))
total_cost.allow_tags = True
def ZOSIA_cost(self, obj):
if obj.paid:
return u"%s %s z\u0142" % ( self.yes_icon, count_payment(obj) )
else:
return u'<a href="#" onclick="{%s}">%s %s z\u0142</a> %s' % (
self.onclick(obj.id,obj), self.no_icon, count_payment(obj), self.anim_icon(obj.id))
ZOSIA_cost.allow_tags = True
def bus_cost(self, obj):
# if user doesn't wanna get but, so he shouldn't
if not obj.bus:
return "%s -" % self.no_icon
elif obj.paid_for_bus:
return u"%s %s z\u0142" % ( self.yes_icon, "40" )
else:
return u'<a href="#" onclick="{%s}">%s %s z\u0142</a>' % ( self.bus_onclick(obj), self.no_icon, "40" )
bus_cost.allow_tags = True
shirt_types = {}
for i in 0,1:
v = SHIRT_TYPES_CHOICES.__getitem__(i)
shirt_types[v.__getitem__(0)] = v.__getitem__(1)
def shirt(self, obj):
return "%s (%s)" % (
self.shirt_types[obj.shirt_type],
obj.shirt_size)
def f(self,o):
def g(x):
if o.__dict__[x]: return self.yes_icon
else: return self.no_icon
return g
# note: these three methods should not be separated
# but generated through lamba function
# do it in spare time
def breakfasts(self,obj):
lst = ['breakfast_2', 'breakfast_3', 'breakfast_4']
return " ".join(map(self.f(obj),lst))
breakfasts.allow_tags = True
def dinners(self,obj):
lst = ['dinner_1', 'dinner_2', 'dinner_3']
return " ".join(map(self.f(obj),lst))
dinners.allow_tags = True
def days(self,obj):
lst = ['day_1', 'day_2', 'day_3']
return " ".join(map(self.f(obj),lst))
days.allow_tags = True
admin.site.register(UserPreferences, UserPreferencesAdmin)
class OrganizationAdmin(admin.ModelAdmin):
list_display = (
'id',
'name',
'accepted'
)
admin.site.register(Organization, OrganizationAdmin)
class UserAdmin(admin.ModelAdmin):
list_display = ('email', 'first_name', 'last_name', 'is_active', 'is_staff', 'is_superuser')
list_filter = ('is_staff', 'is_superuser', 'is_active')
list_per_page = 200
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
diff --git a/registration/models.py b/registration/models.py
index da3ce50..e5e9e2a 100644
--- a/registration/models.py
+++ b/registration/models.py
@@ -1,109 +1,115 @@
# -*- coding: UTF-8 -*-
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from django.template import Context, loader
+from common.models import ZosiaDefinition
+from datetime import timedelta
# this is small hack to make user
# more meaningfull (we're using email as
# user id anyway)
User.__unicode__ = User.get_full_name
SHIRT_SIZE_CHOICES = (
('S', 'S'),
('M', 'M'),
('L', 'L'),
('XL', 'XL'),
+ ('XXL', 'XXL'),
+ ('XXXL', 'XXXL'),
)
SHIRT_TYPES_CHOICES = (
('m', _('classic')),
('f', _('women')),
)
BUS_HOUR_CHOICES = (
('brak',''),
('16:00', '16:00'),
('18:00', '18:00'),
('obojÄtne', 'obojÄtne'),
)
class Organization(models.Model):
name = models.CharField(max_length=64)
accepted = models.BooleanField()
def __unicode__(self):
return u"%s" % self.name
# converts organizations in database into
# choices for option fields
def getOrgChoices():
list = [ (org.id, org.name)
for org in Organization.objects.filter(accepted=True) ]
list = list[:20]
list.append( ('new', 'inna') )
return tuple(list)
class UserPreferences(models.Model):
# This is the only required field
user = models.ForeignKey(User, unique=True)
org = models.ForeignKey(Organization)
# opÅaty
day_1 = models.BooleanField()
day_2 = models.BooleanField()
day_3 = models.BooleanField()
breakfast_2 = models.BooleanField()
breakfast_3 = models.BooleanField()
breakfast_4 = models.BooleanField()
dinner_1 = models.BooleanField()
dinner_2 = models.BooleanField()
dinner_3 = models.BooleanField()
# inne
bus = models.BooleanField()
vegetarian = models.BooleanField()
paid = models.BooleanField()
# TODO(karol): remove after successfull verification that rest works.
# paid_for_bus = models.BooleanField() # we need this after all :/
shirt_size = models.CharField(max_length=2, choices=SHIRT_SIZE_CHOICES)
shirt_type = models.CharField(max_length=1, choices=SHIRT_TYPES_CHOICES)
# used for opening rooms faster per-user;
# e.g. 5 means room registration will open 5 minutes before global datetime
# e.g. -5 means room registration will open 5 minutes after global datetime
# FIXME needs actual implementation, so far it's only a stub field
minutes_early = models.IntegerField()
# used to differ from times on which buses leave
bus_hour = models.CharField(max_length=10, choices=BUS_HOUR_CHOICES, null=True, default=None)
# ? anonimowy - nie chce zeby jego imie/nazwisko/mail pojawialy sie na stronie
def __unicode__(self):
return u"%s %s" % (self.user.first_name, self.user.last_name)
def save(self):
# at this moment object probably is different from one in
# database - lets check if 'paid' field is different
try:
old = UserPreferences.objects.get(id=self.id)
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ rooming_time = definition.rooming_start
if self.paid and not old.paid:
t = loader.get_template('payment_registered_email.txt')
send_mail( u'WpÅata zostaÅa zaksiÄgowana.',
- t.render(Context({})),
+ t.render(Context({'rooming_time': rooming_time - timedelta(minutes=self.minutes_early)})),
'[email protected]',
[ self.user.email ],
fail_silently=True )
except Exception:
# oh, we're saving for the first time - it's ok
# move along, nothing to see here
pass
super(UserPreferences, self).save()
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 6042ffd..8ae3e35 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,268 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>{{ account_number }}
[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
{{ account_data_1 }}
{{ account_data_2 }}
{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
- {{ user_openning_hour|date:"D, d E Y, H:i" }}
+ {{ user_opening_hour|date:"D, d E Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.breakfast_2 }} <label for="id_breakfast_2">{% trans "breakfast2" %}</label>
+ {{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2_day }} {{ date_1 }}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/templates/register_form.html b/registration/templates/register_form.html
index abb9113..6fd2590 100644
--- a/registration/templates/register_form.html
+++ b/registration/templates/register_form.html
@@ -1,254 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
input[type=text],
input[type=email],
input[type=password] {
width: 15em;
}
input[type=password]:valid,
input[type=email]:valid,
#id_name:valid,
#id_surname:valid {
outline: 1px #03de03 solid;
}
{# This is introduced due to the bug #24. #}
.float_right { float: right; }
{% endblock css %}
{% block javascript %}
function switch_org_form(selEl,addEl) {
if(selEl.value == 'new') {
addEl.style.display = 'inline';
var f_new_org = document.getElementById('id_organization_2');
f_new_org.focus();
} else {
addEl.style.display = 'none';
}
}
function form_onload() {
var f_org = document.getElementById('id_organization_1');
var f_add_org = document.getElementById('id_add_org_1');
f_org.onchange = function () { switch_org_form(f_org,f_add_org); };
switch_org_form(f_org,f_add_org);
}
{% endblock %}
{% block onload %}
form_onload()
{% endblock onload %}
{% block content %}
<h2>{% trans "Registration" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_auth">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
{% if form.email.errors %}
<ul class="errorlist float_right">
{% for error in form.email.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_email">e-mail <span>{% trans "(required)" %}</span></label>
{# In following forms we would love to use build-in form input fields #}
{# e.g. form.email form.password, etc. But currently django doesn't support #}
{# generating html5 fields, therefore we will write html inputs until it #}
{# does :) This way we have client-side validation basically for free. #}
{# #}
{# TODO replace these back to form.field as soon as django will support it #}
<input type="email" name="email" id="id_email" required /> {# form.email #}
</li>
<li>
{% if form.password.errors %}
<ul class="errorlist float_right">
{% for error in form.password.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password">{% trans "password" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password" id="id_password" required pattern="[A-z\d]{6,}" /> {# form.password #}
</li>
<li>
{% if form.password2.errors %}
<ul class="errorlist float_right">
{% for error in form.password2.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password2">{% trans "repeatepas" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password2" id="id_password2" required pattern="[A-z\d]{6,}" /> {# form.password2 #}
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
{% if form.name.errors %}
<ul class="errorlist float_right">
{% for error in form.name.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_name">{% trans "name" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="name" id="id_name" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.name #}
</li>
<li>
{% if form.surname.errors %}
<ul class="errorlist float_right">
{% for error in form.surname.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_surname">{% trans "surname" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="surname" id="id_surname" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.surname #}
</li>
<li>
<label><span/></label>
<comment>{% trans "adding organizations only at registration" %}</comment>
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist float_right">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %} <span>{% trans "(required)" %}</span>
</label>
{{ form.organization_1 }}
<div id="id_add_org_1" class="hidden">{{ form.organization_2 }}</div>
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist float_right">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
+ {{ form.day_1 }} <label for="id_day_1">{% if date_1.month == date_2.month %}
+ {{ date_1|date:"j" }}/{{ date_2|date:"j F" }}
+ {% else %}
+ {{ date_1|date:"j F" }} / {{ date_2|date:"j F" }}
+ {% endif %} </label>
</li>
<li>
- {{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
+ {{ form.day_2 }} <label for="id_day_2">{% if date_2.month == date_3.month %}
+ {{ date_2|date:"j" }}/{{ date_3|date:"j F" }}
+ {% else %}
+ {{ date_2|date:"j F" }} / {{ date_3|date:"j F" }}
+ {% endif %} </label>
</li>
<li>
- {{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
+ {{ form.day_3 }} <label for="id_day_3">{% if date_3.month == date_4.month %}
+ {{ date_3|date:"j" }}/{{ date_4|date:"j F" }}
+ {% else %}
+ {{ date_3|date:"j F" }} / {{ date_4|date:"j F" }}
+ {% endif %} </label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist float_right">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
+ {{ form.dinner_1}} <label for="id_dinner_1">{{ date_1|date:"j F" }}</label>
</li>
<li>
- {{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
+ {{ form.dinner_2}} <label for="id_dinner_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
- {{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
+ {{ form.dinner_3}} <label for="id_dinner_3">{{ date_3|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist float_right">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
- {{ form.breakfast_2 }} <label for="id_breakfast_2">{% trans "breakfast2" %}</label>
+ {{ form.breakfast_2 }} <label for="id_breakfast_2">{{ date_2|date:"j F" }}</label>
</li>
<li>
- {{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
+ {{ form.breakfast_3 }} <label for="id_breakfast_3">{{ date_3|date:"j F" }}</label>
</li>
<li>
- {{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
+ {{ form.breakfast_4 }} <label for="id_breakfast_4">{{ date_4|date:"j F" }}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
- {{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
+ {{ form.bus }} <label for="id_bus">Jestem zainteresowany zorganizowanym transportem autokarowym na trasie WrocÅaw - {{ city }} - WrocÅaw</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
<li>
{% trans "RejestrujÄ
c siÄ na obóz, akceptujÄ jego " %}<a href="/register/regulations/">{% trans "regulamin" %}</a>.
</li>
</ol>
</fieldset>
<fieldset><input type="submit" value="{% trans "register" %}" /></fieldset>
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
{% if price_organization %}
<tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
{% endif %}
<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/views.py b/registration/views.py
index d16b3aa..403b182 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,314 +1,322 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
+ date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
+ (definition.zosia_start + timedelta(days=2)),\
+ (definition.zosia_start + timedelta(days=3))
+ city = definition.city
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
title = "Registration"
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
zosia_start = definition.zosia_start
zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
# returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
payment = 0
# payments: overnight stays + board
if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
payment += definition.price_overnight_full
else:
if prefs.day_1:
if prefs.dinner_1:
payment += definition.price_overnight_dinner
elif prefs.breakfast_2:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
payment += definition.price_overnight_full
else:
if prefs.day_2:
if prefs.dinner_2:
payment += definition.price_overnight_dinner
elif prefs.breakfast_3:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
payment += definition.price_overnight_full
else:
if prefs.day_3:
if prefs.dinner_3:
payment += definition.price_overnight_dinner
elif prefs.breakfast_4:
payment += definition.price_overnight_breakfast
else:
payment += definition.price_overnight
# payment: transport
if prefs.bus:
payment += definition.price_transport
# payment: organization fee
payment += definition.price_organization
return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
form = ChangePrefsForm()
user_paid = prefs.paid
try:
definition = ZosiaDefinition.objects.get(active_definition=True)
except Exception:
raise Http404
- user_openning_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
+ user_opening_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
price_overnight = definition.price_overnight
price_overnight_breakfast = definition.price_overnight_breakfast
price_overnight_dinner = definition.price_overnight_dinner
price_overnight_full = definition.price_overnight_full
price_organization = definition.price_organization
price_transport = definition.price_transport
account_number = definition.account_number
account_data_1 = definition.account_data_1
account_data_2 = definition.account_data_2
account_data_3 = definition.account_data_3
- year = definition.zosia_final.year
+ year = definition.zosia_start.year
+ date_1, date_2, date_3, date_4 = definition.zosia_start, (definition.zosia_start + timedelta(days=1)),\
+ (definition.zosia_start + timedelta(days=2)),\
+ (definition.zosia_start + timedelta(days=3))
+ city = definition.city
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
form = ChangePrefsForm(request.POST)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post)
form.add_bad_org(prefs)
form.set_paid(user_paid)
form.set_bus_hour(prefs.bus_hour)
if form.is_valid():
# save everything
prefs.org = Organization.objects.get(id=form.cleaned_data['organization_1'])
if prefs.paid:
pass
else:
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.bus = form.cleaned_data['bus']
prefs.bus_hour = form.cleaned_data['bus_hour']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.save()
payment = count_payment(user)
else:
form.initialize(prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
diff --git a/settings.py b/settings.py
index ee23a2a..639c07f 100644
--- a/settings.py
+++ b/settings.py
@@ -1,112 +1,112 @@
# -*- coding: UTF-8 -*-
# Django settings for zapisy_zosia project.
import os
-DEBUG = True
+DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[email protected]'),
('dreamer_', '[email protected]')
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'CET'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'pl'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^(*+wz_l2paerc)u(si)-a#aotpk#6___9e*o4(_0tlegdmfl+'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
ROOT_URLCONF = 'zapisy_zosia.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.getcwd()+os.sep+'templates'
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.markup',
#'django.contrib.sites',
'django.contrib.admin',
'django.contrib.formtools',
#'zapisy_zosia.rooms',
'zapisy_zosia.newrooms',
'zapisy_zosia.lectures',
'zapisy_zosia.registration',
'zapisy_zosia.blog',
'zapisy_zosia.common',
'zapisy_zosia.blurb',
)
AUTHENTICATION_BACKENDS = (
'zapisy_zosia.email-auth.EmailBackend',
)
# well, it's temporary, of course...
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '25'
-EMAIL_HOST_USER = '[email protected]' # it doesn't exist afaik
-EMAIL_HOST_PASSWORD = 'akwarium'
+EMAIL_HOST_USER = '[email protected]' # it doesn't exist afaik
+EMAIL_HOST_PASSWORD = 'haselko'
EMAIL_USE_TLS = True
CACHE_BACKEND = 'locmem:///'
CACHE_MIDDLEWARE_SECONDS = 30
SESSION_ENGINE = "django.contrib.sessions.backends.file"
diff --git a/templates/payment_registered_email.txt b/templates/payment_registered_email.txt
index cb09204..bf11855 100644
--- a/templates/payment_registered_email.txt
+++ b/templates/payment_registered_email.txt
@@ -1,7 +1,8 @@
Z radoÅciÄ
informujemy, że zaksiÄgowana zostaÅa Twoja wpÅata
na konto systemu zapisów na ZOSIÄ.
+Twój termin otwarcia zapisów na pokoje to: {{ rooming_time|date:"j F Y, H:i"}}.
--
Organizatorzy
Zimowego Obozu Studentów Informatyki ZOSIA
[email protected]
|
dreamer/zapisy_zosia
|
ffe5da554a1431116e9256dfbab426608a33092f
|
no more hardcoded data
|
diff --git a/README b/README
index ef033da..4b873a9 100644
--- a/README
+++ b/README
@@ -1,149 +1,150 @@
LEGAL STUFF
"THE BEER/PIZZA-WARE LICENSE" (Revision 42):
<[email protected]> wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer (or pizza) in return. Patryk Obara
--------------------------------------------------------------------------------
A little bit of code was copied and slightly modified from Django itself;
all of it is in templates so any file in */template/ dir is under BSD.
The YAML framework is published under the Creative Commons Attribution 2.0 License.
Smiley images in static_media/images are part of GNOME project, thus under GPLv2.
logo_zosi.svg was created by Adrian Dziubek
sorttable.js was written Stuart Langridge, published under X11 license.
-------------------------------------------------------------------------------
Every command example below is assumed to be run with zapisy_zosia as current
directory unless explicitly stated otherwise.
PREREQUISITIES
you will of course need:
- django (>=1.0) [looks like 1.1 works just fine :) ]
- python (>=2.5, <3.0)
- textile (2.1.3 works fine; called python-textile in Fedora)
Textile is the least popular of bunch, so in case you don't find it in repository:
$ sudo easy_install textile
if bash will complain to you, that command is not found then:
1) blame your distribution
2) install package setuptools (some distros may name it python-setuptools)
if not found again, go to step 1 or...
3) compile it yourself (http://pypi.python.org/pypi/textile)
DEVELOPMENT
to create database:
$ python manage.py syncdb
to run developer server (port 8000):
$ python manage.py runserver
TRANSLATION
update *.po files, and run
$ django-admin compilemessages
CHANGES REQUIRED BEFORE DEPLOYING ZAPISY FOR NEW ZOSIA
* Change the text of email messages - that is, the content of the txt files in
the zapisy_zosia/templates directory.
* Update all dates - change dates in functions in common/helpers.py
* Update costs: function count_payment(user) in registration/views.py
* Update rest of templates: including place, dates, costs, bank account,
sponsors, links, etc
FIRST DEPLOYMENT
1) Following will create zapisy_zosia directory and put all files inside:
$ git clone http://github.com/dreamer_/zapisy_zosia.git
Cloning using git is recommended; if you don't want to use git, you can
simply unpack tarball with files wherever you want (it will block you from
upgrading in future, so, beware).
2) Update settings.py file with correct database name/pass, mailer address/pass
3) In settings.py change DEBUG variable to False
4) $ python manage.py syncdb
5) Update web server configuration so that it runs this Django project.
6) If you own a domain that you want to point to this application, configure the
domain records and update Apache's configuration so that it recognizes the
redirection.
7) Restart server!
UPDATING ALREADY DEPLOYED VERSION
0) If zosia was not touched since last year, you may want to clean db a bit;
easiest way to achieve it is to go to admin panel and remove all users.
Just remember:
- Don't remove yourself!
- Create backup of blogposts and lectures from previous year - removing
authors will remove their blog notes or lectures.
- Remove old organizations from organization list - leave only those
few that matters (KSI and II for example).
- Remove all rooms, too.
1) Make sure there are no local changes in repository:
$ git diff
If there are no changes, then go to step (2), otherwise (perhaps settings.py
file changed?) commit all changes:
$ git commit -a -m "Local deployment changes"
2) Following incantation will get latest version from origin repo and reapply
changes required by local deployment (such as settings.py file):
$ git pull --rebase
3) In case incantation from step (2) failed, resolve carefully all conflicts.
4) If pulled changes were in:
- templates only: they will be picked up automatically, you're ready to go
- model: you have to manually ALTER tables in database
tip: $ python manage.py sqlall <appname>
- code/translations: you need server restart, contact administrator
5) Follow step (6) or (7) from FIRST DEPLOYMENT section, if they are required
Usually, this procedure could be shortened to:
$ git pull --rebase
# <server restart>
But follow steps 1-4 closely, to make sure you didn't miss anything.
Oh, one more thing:
REMEMBER, never push from deployment repository!
----------------------------------------------------------------------------
Q: How to change, how much does this Zosia cost (breakfasts/dinners/night) ?
-A: look @ function count_payment(user) in registration/views.py
+A: Change values in your zosia definition (admin panel) if there is something different in payment rules,
+ change model, registatration form and look @ function count_payment(user) in registration/views.py
Q: How can I change dates for my zosia deployment? It's not 2010 any more!
-A: look @ common/helpers.py but remember, that in final deployment, changing
- these dates needs server restart
+A: Change values in your zosia definition (admin panel) and change file locale/pl/LC_MESSAGES/django.po,
+ templates/index.html if needed
Q: Where is my CSS on admin pages?! I just deployed zosia and my admin page
is unusable!!!
A: Ops! system expects them to be in /static_media/css/ directory, but for
release deployment this may not work out of the box; try linking
correct files in filesystem, e.g.:
base.css -> /usr/share/python-support/python-django/django/contrib/admin/media/css/base.css
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 10ae36e..00c0390 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,83 +1,83 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
-<a href="http://www.przesieka.pl/markus/">Rezydencja Markus</a> w
-<a href="http://g.co/maps/gb3p2">Przesiece</a>
+<a href="{{ hotel_url }}">{{ hotel }}</a> w
+<a href="{{ city_url }}">{{ city }}</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
- <li>zapisy i wpÅaty<br/>daty zostanÄ
ogÅoszone w styczniu</li>
- <li>zgÅaszanie wykÅadów<br/>do 19 lutego 2012, 23:59</li>
- <li>zapisy na pokoje<br/>od 18 lutego 2012, 18:00</li>
- <li>wyjazd<br/>23 lutego 2012</li>
- <li>powrót<br/>26 lutego 2012</li>
+ <li>zapisy i wpÅaty<br/>od {{ registration_start|date:"d E Y" }}<br/>do {{ registration_final|date:"d E Y, H:i" }}</li>
+ <li>zgÅaszanie wykÅadów<br/>do {{ lectures_suggesting_final|date:"d E Y, H:i" }}</li>
+ <li>zapisy na pokoje<br/>od {{ rooming_start|date:"d E Y" }}<br/>do {{ rooming_final|date:"d E Y, H:i" }}</li>
+ <li>wyjazd<br/>{{ zosia_start|date:"d E Y" }}</li>
+ <li>powrót<br/>{{ zosia_final|date:"d E Y" }}</li>
</ul>
<h4>Kontakt</h4>
<p>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
</p>
{% comment %}
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
{% endcomment %}
{% endblock %}
{% endcache %}
diff --git a/blog/views.py b/blog/views.py
index e6bb640..f512937 100644
--- a/blog/views.py
+++ b/blog/views.py
@@ -1,25 +1,41 @@
# -*- coding: UTF-8 -*-
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from common.forms import LoginForm
+from common.models import ZosiaDefinition
from models import *
def main_view(view):
def new_view(*args):
locals = view(*args)
locals['user'] = args[0].user
locals['title'] = "Blog"
locals['login_form'] = LoginForm()
return render_to_response('blog.html',locals)
return new_view
@main_view
def index(request):
user = request.user
blog_posts = BlogPost.objects.order_by('-pub_date')
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ registration_start = definition.registration_start
+ registration_final = definition.registration_final
+ lectures_suggesting_final = definition.lectures_suggesting_final
+ rooming_start = definition.rooming_start
+ rooming_final = definition.rooming_final
+ zosia_start = definition.zosia_start
+ zosia_final = definition.zosia_final
+ city = definition.city
+ city_url = definition.city_url
+ hotel = definition.hotel
+ hotel_url = definition.hotel_url
return locals()
diff --git a/common/helpers.py b/common/helpers.py
index 4cdca32..a9b8949 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,46 +1,64 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
+from common.models import ZosiaDefinition
+from django.http import Http404
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
- # this is the only place that should be changed
- start_date = datetime(2011,1,30, 1,05)
- final_date = datetime(2011,2,25, 1,05)
- assert start_date < final_date
- return datetime.now() > start_date and datetime.now() < final_date
+ # this is the only place that should be changed
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ start_date = definition.registration_start
+ final_date = definition.registration_final
+ assert start_date < final_date
+ return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
- return not is_registration_enabled()
+ return not is_registration_enabled()
def is_lecture_suggesting_enabled():
- # this is the only place that should be changed
- start_date = datetime(2011,1,30, 1,05)
- final_date = datetime(2012,2,19, 1,05)
- assert start_date < final_date
- return datetime.now() > start_date and datetime.now() < final_date
+ # this is the only place that should be changed
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ start_date = definition.lectures_suggesting_start
+ final_date = definition.lectures_suggesting_final
+ assert start_date < final_date
+ return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
- return not is_lecture_suggesting_enabled()
+ return not is_lecture_suggesting_enabled()
def is_rooming_enabled():
- start_date = datetime(2011,2,26, 20,00)
- final_date = datetime(2011,2,28, 23,00)
- assert start_date < final_date
- return datetime.now() > start_date and datetime.now() < final_date
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ start_date = definition.rooming_start
+ final_date = definition.rooming_final
+ assert start_date < final_date
+ return datetime.now() > start_date and datetime.now() < final_date
def has_user_opened_records(user):
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
prefs = UserPreferences.objects.get(user=user)
- user_openning_hour = datetime(2011,2,26, 20,00) - timedelta(minutes=prefs.minutes_early)
+ user_openning_hour = definition.registration_start - timedelta(minutes=prefs.minutes_early)
return user_openning_hour <= datetime.now()
def is_rooming_disabled():
- return not is_rooming_enabled()
+ return not is_rooming_enabled()
diff --git a/common/models.py b/common/models.py
index e010623..e5b1175 100644
--- a/common/models.py
+++ b/common/models.py
@@ -1,13 +1,34 @@
# -*- coding: UTF-8 -*-
from django.db import models
from datetime import datetime
class ZosiaDefinition(models.Model):
- active_definition = models.BooleanField()
- registration_start = models.DateTimeField()
- registration_final = models.DateTimeField()
- lectures_suggesting_start = models.DateTimeField()
- lectures_suggesting_final = models.DateTimeField()
- rooming_start = models.DateTimeField()
- rooming_final = models.DateTimeField()
-
+ active_definition = models.BooleanField()
+ # dates
+ registration_start = models.DateTimeField()
+ registration_final = models.DateTimeField()
+ payment_deadline = models.DateTimeField()
+ lectures_suggesting_start = models.DateTimeField()
+ lectures_suggesting_final = models.DateTimeField()
+ rooming_start = models.DateTimeField()
+ rooming_final = models.DateTimeField()
+ zosia_start = models.DateTimeField()
+ zosia_final = models.DateTimeField()
+ # prices
+ price_overnight = models.IntegerField()
+ price_overnight_breakfast = models.IntegerField()
+ price_overnight_dinner = models.IntegerField()
+ price_overnight_full = models.IntegerField()
+ price_transport = models.IntegerField()
+ price_organization = models.IntegerField()
+ # bank account
+ account_number = models.CharField(max_length=30)
+ account_data_1 = models.CharField(max_length=40)
+ account_data_2 = models.CharField(max_length=40)
+ account_data_3 = models.CharField(max_length=40)
+ # place
+ city = models.CharField(max_length=20, verbose_name="miasto w celowniku")
+ city_url = models.URLField()
+ hotel = models.CharField(max_length=30)
+ hotel_url = models.URLField()
+
\ No newline at end of file
diff --git a/locale/pl/LC_MESSAGES/django.po b/locale/pl/LC_MESSAGES/django.po
index 92f9e7c..a240f42 100644
--- a/locale/pl/LC_MESSAGES/django.po
+++ b/locale/pl/LC_MESSAGES/django.po
@@ -1,531 +1,531 @@
# SOME DESCRIPTIVE TITLE.
# Copyleft 2008
# This file is distributed under the same license as the zapisy_zosia.
# dreamer_ <[email protected]>, 2008.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-02-01 11:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: dreamer_ <[email protected]>\n"
"Language-Team: noteam <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: common/forms.py:16
msgid "Password too short"
msgstr "HasÅo powinno mieÄ przynajmniej 6 znaków dÅugoÅci"
#: common/templates/bye.html:5
msgid "bye"
msgstr "WylogowaÅeÅ siÄ."
#: common/templates/bye.html:7 common/templates/reactivation.html:7
#: registration/templates/reactivation.html:7
msgid "thanks for visit"
msgstr "DziÄkujemy za wizytÄ i do zobaczenia na ZOSI!"
#: common/templates/login.html:11
msgid "loggedalready"
msgstr "Powtórne logowanie nie byÅo konieczne ;)"
#: common/templates/login.html:14
msgid "loginfail"
msgstr "Niestety, logowanie siÄ nie powiodÅo."
#: common/templates/login.html:16
msgid "loginfailrecover"
msgstr ""
"Jeżeli już posiadasz swoje konto, możesz <a href='/"
"password_reset/'>odzyskaÄ</a> hasÅo."
#: common/templates/login.html:18
msgid "stranger"
msgstr "Zapraszamy do zalogowania siÄ."
#: common/templates/login.html:33
#, fuzzy
msgid "email"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: common/templates/login.html:44
#: registration/templates/change_preferences.html:71
#: registration/templates/register_form.html:73 templates/index.html:53
msgid "password"
msgstr "hasÅo"
#: common/templates/login.html:49
msgid "loginbutton"
msgstr "Zaloguj"
#: common/templates/reactivation.html:5
#: registration/templates/reactivation.html:5
msgid "reactivate"
msgstr "Użyty link aktywacyjny jest nieprawidÅowy lub nieaktualny."
#: lectures/views.py:28
msgid "thankyou"
msgstr "DziÄkujemy! Twój wykÅad czeka na akceptacjÄ moderatora."
#: lectures/templates/lectures.html:10
#, python-format
msgid "<li>%(msg)s</li>"
msgstr ""
#: lectures/templates/lectures.html:16
#: registration/templates/change_preferences.html:55
msgid "Repair errors below, please."
msgstr "Prosimy o poprawienie wskazanych bÅÄdów."
#: lectures/templates/lectures.html:20
msgid "Invited talks"
msgstr "WykÅady zaproszone"
#: lectures/templates/lectures.html:20
msgid "Lectures suggested"
msgstr "Zaproponowane wykÅady"
#: lectures/templates/lectures.html:28
msgid "None yet. You can be first!"
msgstr "Jeszcze nikt nie zaproponowaÅ wykÅadu. Twój może byÄ pierwszy!"
#: lectures/templates/lectures.html:33
msgid "Suggest your lecture"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:36
msgid "Public info"
msgstr "Informacje wymagane"
#: lectures/templates/lectures.html:46
msgid "Title"
msgstr "TytuÅ"
#: lectures/templates/lectures.html:57
msgid "duraszatan"
msgstr "Czas trwania"
#: lectures/templates/lectures.html:57
msgid "inminutes"
msgstr " (w minutach)"
#: lectures/templates/lectures.html:67
msgid "Abstract"
msgstr "Abstrakt"
#: lectures/templates/lectures.html:67
msgid "(max chars)"
msgstr " (do 512 znaków)"
#: lectures/templates/lectures.html:73
msgid "Additional information"
msgstr "Informacje dodatkowe"
#: lectures/templates/lectures.html:83
msgid ""
"Your suggestions, requests and comments intended for organizers and a lot "
"more, what you always wanted to say these philistinic bastards with purulent "
"knees"
msgstr ""
"Uwagi, proÅby i wszelkie komentarze dotyczÄ
ce wykÅadu, którymi chciaÅbyÅ siÄ "
"podzieliÄ z organizatorami oraz ew. proponowany czas trwania wykÅadu z uzasadnieniem."
#: lectures/templates/lectures.html:88
msgid "Suggest"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:98
msgid "Yes we can"
msgstr " "
#: lectures/templates/lectures.html:99
msgid "Hurray"
msgstr " "
#: lectures/templates/lectures.html:101
msgid "Ops, youre not logged in"
msgstr "Ojej, nie jesteÅ zalogowany."
#: lectures/templates/lectures.html:102
msgid "You have to be registered"
msgstr ""
"JeÅli tylko siÄ zarejestrujesz, bÄdziesz mógÅ dodaÄ swój wykÅad (and there "
"will be a cake)."
#: registration/forms.py:30
msgid "You can buy meal only for adequate hotel night."
msgstr "PosiÅki sÄ
dostÄpne tylko na wykupione doby hotelowe."
#: registration/forms.py:103 registration/forms.py:160
msgid "At least one day should be selected."
msgstr "Wybierz przynajmniej jeden nocleg."
#: registration/models.py:22
msgid "classic"
msgstr "mÄska"
#: registration/models.py:23
msgid "women"
msgstr "damska"
#: registration/views.py:68
msgid "activation_mail_title"
msgstr "Mail aktywacyjny systemu zapisów na ZOSIÄ"
#: registration/templates/change_preferences.html:27
msgid "Paid was registered, see you soon!"
msgstr "ZarejestrowaliÅmy TwojÄ
wpÅatÄ, do zobaczenia na ZOSI!"
#: registration/templates/change_preferences.html:60
msgid "Preferences"
msgstr "Ustawienia"
#: registration/templates/change_preferences.html:64
#: registration/templates/register_form.html:52
msgid "authentication"
msgstr "dane do uwierzytelniania"
#: registration/templates/change_preferences.html:72
msgid "change"
msgstr "zmieÅ"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "personal"
msgstr "dane osobowe"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "room openning hour"
msgstr "otwarcie zapisów na pokoje"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:100
msgid "name"
msgstr "imiÄ"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:111
msgid "surname"
msgstr "nazwisko"
#: registration/templates/register_form.html:119
msgid "adding organizations only at registration"
msgstr "Dodanie nowej organizacji jest możliwe tylko podczas rejestracji."
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "organization"
msgstr "organizacja"
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "bus hour"
msgstr "godzina autobusu"
#: registration/templates/change_preferences.html:100
#: registration/templates/register_form.html:141
msgid "nights"
msgstr "noclegi "
#: registration/templates/change_preferences.html:110
#: registration/templates/register_form.html:151
msgid "night12"
-msgstr "23/24 lutego"
+msgstr "dzieÅ 1/dzieÅ 2"
#: registration/templates/change_preferences.html:113
#: registration/templates/register_form.html:154
msgid "night23"
-msgstr "24/25 lutego"
+msgstr "dzieÅ 2/dzieÅ 3"
#: registration/templates/change_preferences.html:116
#: registration/templates/register_form.html:157
msgid "night34"
-msgstr "25/26 lutego"
+msgstr "dzieÅ 3/dzieÅ 4"
#: registration/templates/change_preferences.html:121
#: registration/templates/register_form.html:162
msgid "dinners"
msgstr "obiadokolacje"
#: registration/templates/change_preferences.html:129
#: registration/templates/register_form.html:170
msgid "dinner1"
-msgstr "23 lutego"
+msgstr "dzieÅ 1"
#: registration/templates/change_preferences.html:132
#: registration/templates/register_form.html:173
msgid "dinner2"
-msgstr "24 lutego"
+msgstr "dzieÅ 2"
#: registration/templates/change_preferences.html:135
#: registration/templates/register_form.html:176
msgid "dinner3"
-msgstr "25 lutego"
+msgstr "dzieÅ 3"
#: registration/templates/change_preferences.html:140
#: registration/templates/register_form.html:181
msgid "breakfasts"
msgstr "Åniadania"
#: registration/templates/change_preferences.html:148
#: registration/templates/register_form.html:189
msgid "breakfast2"
-msgstr "24 lutego"
+msgstr "dzieÅ 2"
#: registration/templates/change_preferences.html:151
#: registration/templates/register_form.html:192
msgid "breakfast3"
-msgstr "25 lutego"
+msgstr "dzieÅ 3"
#: registration/templates/change_preferences.html:154
#: registration/templates/register_form.html:195
msgid "breakfast4"
-msgstr "26 lutego"
+msgstr "dzieÅ 4"
#: registration/templates/change_preferences.html:159
#: registration/templates/register_form.html:200
msgid "others"
msgstr "pozostaÅe"
#: registration/templates/change_preferences.html:162
#: registration/templates/register_form.html:203
msgid "veggies"
msgstr "PreferujÄ kuchniÄ wegetariaÅskÄ
."
#: registration/templates/change_preferences.html:165
#: registration/templates/register_form.html:206
msgid "bussies"
msgstr ""
"Jestem zainteresowany zorganizowanym transportem autokarowym na trasie "
"WrocÅaw - Przesieka - WrocÅaw"
#: registration/templates/change_preferences.html:168
#: registration/templates/register_form.html:209
msgid "shirties"
msgstr "rozmiar koszulki"
#: registration/templates/change_preferences.html:171
#: registration/templates/register_form.html:212
msgid "shirt_type"
msgstr "rodzaj koszulki"
#: registration/templates/change_preferences.html:185
msgid "Save"
msgstr ""
#: registration/templates/register_form.html:48
#: registration/templatetags/time_block_helpers.py:14
msgid "Registration"
msgstr "Rejestracja"
#: registration/templates/register_form.html:62
#: registration/templates/register_form.html:73
#: registration/templates/register_form.html:84
#: registration/templates/register_form.html:100
#: registration/templates/register_form.html:111
#: registration/templates/register_form.html:124
msgid "(required)"
msgstr " (wymagane)"
#: registration/templates/register_form.html:84
msgid "repeatepas"
msgstr "powtórz hasÅo"
#: registration/templates/register_form.html:216
msgid "register"
msgstr "Zarejestruj"
#: registration/templates/thanks.html:5
msgid "tyouregister"
msgstr "Rejestracja prawie ukoÅczona."
#: registration/templates/thanks.html:7
msgid "checkmail"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: templates/change_password.html:14
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] ""
msgstr[1] ""
#: templates/change_password.html:33
msgid "Password (again)"
msgstr "HasÅo (ponownie)"
#: templates/change_password.html:38
msgid "Change password"
msgstr "ZmieÅ hasÅo"
#: templates/change_password_done.html:4
msgid "passwordchanged"
msgstr ""
"UdaÅo Ci siÄ zmieniÄ hasÅo.<br />Zanotuj je na żóÅtej karteczce "
"samoprzylepnej i umieÅÄ na monitorze.<br /><img src='/static_media/images/"
"kartka.jpg' width='200'/>"
#: templates/index.html:32
msgid "oh hai"
msgstr "Witaj"
#: templates/index.html:35
msgid "Administration panel"
msgstr "Panel administracyjny"
#: templates/index.html:37
msgid "Logout"
msgstr "Wyloguj"
#: templates/index.html:69
msgid "Blog"
msgstr "Blog"
#: templates/index.html:71
msgid "Change preferences"
msgstr "Moje preferencje"
#: templates/index.html:77
msgid "Lectures"
msgstr "WykÅady"
#: templates/index.html:111
msgid "Except where otherwise noted, content on this site is licensed under a"
msgstr ""
"O ile nie stwierdzono inaczej, wszystkie materiaÅy na stronie sÄ
dostÄpne na "
"licencji"
#: templates/index.html:112
msgid "based on"
msgstr "oparty na"
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:4
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
msgid "Home"
msgstr ""
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:6
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
#: templates/password_reset_form.html:6 templates/password_reset_form.html:10
msgid "Password reset"
msgstr "Odzyskiwanie hasÅa"
#: templates/password_reset_complete.html:6
#: templates/password_reset_complete.html:10
msgid "Password reset complete"
msgstr "Odzyskiwanie hasÅa zakoÅczone"
#: templates/password_reset_complete.html:12
msgid "Your password has been set. You may go ahead and log in now."
msgstr "Możesz siÄ teraz zalogowaÄ."
#: templates/password_reset_complete.html:14
msgid "Log in"
msgstr ""
#: templates/password_reset_confirm.html:4
msgid "Password reset confirmation"
msgstr "la la la"
#: templates/password_reset_confirm.html:12
msgid "Enter new password"
msgstr "Ustaw nowe hasÅo"
#: templates/password_reset_confirm.html:14
msgid ""
"Please enter your new password twice so we can verify you typed it in "
"correctly."
msgstr " "
#: templates/password_reset_confirm.html:18
msgid "New password:"
msgstr "hasÅo"
#: templates/password_reset_confirm.html:20
msgid "Confirm password:"
msgstr "powtórz hasÅo"
#: templates/password_reset_confirm.html:21
msgid "Change my password"
msgstr "Ustaw hasÅo"
#: templates/password_reset_confirm.html:26
msgid "Password reset unsuccessful"
msgstr "Nie udaÅo siÄ odzyskaÄ hasÅa"
#: templates/password_reset_confirm.html:28
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
"Link do odzyskiwania hasÅa byÅ niepoprawny, byÄ może dlatego, że zostaÅ już "
"raz użyty. W razie potrzeby powtórz caÅÄ
procedurÄ. "
#: templates/password_reset_done.html:6 templates/password_reset_done.html:10
msgid "Password reset successful"
msgstr "Odzyskiwanie hasÅa w toku"
#: templates/password_reset_done.html:12
msgid ""
"We've e-mailed you instructions for setting your password to the e-mail "
"address you submitted. You should be receiving it shortly."
msgstr ""
#: templates/password_reset_email.html:2
#: templates/registration/password_reset_email.html:3
msgid "You're receiving this e-mail because you requested a password reset"
msgstr ""
#: templates/password_reset_email.html:3
#: templates/registration/password_reset_email.html:4
#, python-format
msgid "for your user account at %(site_name)s"
msgstr ""
#: templates/password_reset_email.html:5
#: templates/registration/password_reset_email.html:6
msgid "Please go to the following page and choose a new password:"
msgstr "Kliknij w poniższy link i wybierz nowe hasÅo."
#: templates/password_reset_email.html:9
#: templates/registration/password_reset_email.html:10
msgid "Thanks for using our site!"
msgstr "DziÄkujemy za korzystanie z naszego systemu!"
#: templates/password_reset_email.html:11
#: templates/registration/password_reset_email.html:12
#, python-format
msgid "The %(site_name)s team"
msgstr ""
#: templates/password_reset_form.html:12
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
msgstr ""
"ZapomniaÅeÅ hasÅa? Podaj swój adres e-mail, a pomożemy Ci ustawiÄ nowe."
#: templates/password_reset_form.html:16
msgid "E-mail address:"
msgstr "Adres e-mail:"
#: templates/password_reset_form.html:16
msgid "Reset my password"
msgstr "Odzyskaj hasÅo"
#: templates/admin/base_site.html:4
msgid "Django site admin"
msgstr ""
#~ msgid "add"
#~ msgstr "Dodaj"
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 3144c79..6042ffd 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,265 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
-<pre>12 1140 2017 0000 4402 0724 4975
-[ZOSIA11] {{user.first_name}} {{user.last_name}}
-MaÅgorzata Joanna Jurkiewicz
-ul. Mewia 38
-51-418 WrocÅaw
+<pre>{{ account_number }}
+[ZOSIA{{ year }}] {{user.first_name}} {{user.last_name}}
+{{ account_data_1 }}
+{{ account_data_2 }}
+{{ account_data_3 }}
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
- {{ user_openning_hour }}
+ {{ user_openning_hour|date:"D, d E Y, H:i" }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{% trans "breakfast2" %}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
+
<table>
-<tr><td>nocleg:</td><td>40 zÅ</td></tr>
-<tr><td>nocleg ze Åniadaniem:</td><td>55 zÅ</td></tr>
-<tr><td>nocleg z obiadokolacjÄ
:</td><td>60 zÅ</td></tr>
-<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>65 zÅ</td></tr>
-<tr><td>opÅata organizacyjna:</td><td>15 zÅ</td></tr>
-<tr><td>transport:</td><td>45 zÅ</td></tr>
+<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
+<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
+<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
+<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
+{% if price_organization %}
+ <tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
+{% endif %}
+<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/templates/register_form.html b/registration/templates/register_form.html
index e0c1109..abb9113 100644
--- a/registration/templates/register_form.html
+++ b/registration/templates/register_form.html
@@ -1,252 +1,254 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
input[type=text],
input[type=email],
input[type=password] {
width: 15em;
}
input[type=password]:valid,
input[type=email]:valid,
#id_name:valid,
#id_surname:valid {
outline: 1px #03de03 solid;
}
{# This is introduced due to the bug #24. #}
.float_right { float: right; }
{% endblock css %}
{% block javascript %}
function switch_org_form(selEl,addEl) {
if(selEl.value == 'new') {
addEl.style.display = 'inline';
var f_new_org = document.getElementById('id_organization_2');
f_new_org.focus();
} else {
addEl.style.display = 'none';
}
}
function form_onload() {
var f_org = document.getElementById('id_organization_1');
var f_add_org = document.getElementById('id_add_org_1');
f_org.onchange = function () { switch_org_form(f_org,f_add_org); };
switch_org_form(f_org,f_add_org);
}
{% endblock %}
{% block onload %}
form_onload()
{% endblock onload %}
{% block content %}
<h2>{% trans "Registration" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_auth">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
{% if form.email.errors %}
<ul class="errorlist float_right">
{% for error in form.email.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_email">e-mail <span>{% trans "(required)" %}</span></label>
{# In following forms we would love to use build-in form input fields #}
{# e.g. form.email form.password, etc. But currently django doesn't support #}
{# generating html5 fields, therefore we will write html inputs until it #}
{# does :) This way we have client-side validation basically for free. #}
{# #}
{# TODO replace these back to form.field as soon as django will support it #}
<input type="email" name="email" id="id_email" required /> {# form.email #}
</li>
<li>
{% if form.password.errors %}
<ul class="errorlist float_right">
{% for error in form.password.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password">{% trans "password" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password" id="id_password" required pattern="[A-z\d]{6,}" /> {# form.password #}
</li>
<li>
{% if form.password2.errors %}
<ul class="errorlist float_right">
{% for error in form.password2.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_password2">{% trans "repeatepas" %} <span>{% trans "(required)" %}</span></label>
<input type="password" name="password2" id="id_password2" required pattern="[A-z\d]{6,}" /> {# form.password2 #}
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
{% if form.name.errors %}
<ul class="errorlist float_right">
{% for error in form.name.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_name">{% trans "name" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="name" id="id_name" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.name #}
</li>
<li>
{% if form.surname.errors %}
<ul class="errorlist float_right">
{% for error in form.surname.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_surname">{% trans "surname" %} <span>{% trans "(required)" %}</span></label>
<input type="text" name="surname" id="id_surname" required pattern="[^\d\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\;\:\'\,\<\.\>\/\?]+" /> {# form.surname #}
</li>
<li>
<label><span/></label>
<comment>{% trans "adding organizations only at registration" %}</comment>
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist float_right">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %} <span>{% trans "(required)" %}</span>
</label>
{{ form.organization_1 }}
<div id="id_add_org_1" class="hidden">{{ form.organization_2 }}</div>
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist float_right">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist float_right">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist float_right">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{% trans "breakfast2" %}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
<li>
{% trans "RejestrujÄ
c siÄ na obóz, akceptujÄ jego " %}<a href="/register/regulations/">{% trans "regulamin" %}</a>.
</li>
</ol>
</fieldset>
<fieldset><input type="submit" value="{% trans "register" %}" /></fieldset>
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
-<tr><td>nocleg:</td><td>40 zÅ</td></tr>
-<tr><td>nocleg ze Åniadaniem:</td><td>55 zÅ</td></tr>
-<tr><td>nocleg z obiadokolacjÄ
:</td><td>60 zÅ</td></tr>
-<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>65 zÅ</td></tr>
-<tr><td>opÅata organizacyjna:</td><td>15 zÅ</td></tr>
-<tr><td>transport:</td><td>45 zÅ</td></tr>
+<tr><td>nocleg:</td><td>{{ price_overnight }} zÅ</td></tr>
+<tr><td>nocleg ze Åniadaniem:</td><td>{{ price_overnight_breakfast }} zÅ</td></tr>
+<tr><td>nocleg z obiadokolacjÄ
:</td><td>{{ price_overnight_dinner }} zÅ</td></tr>
+<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>{{ price_overnight_full }} zÅ</td></tr>
+{% if price_organization %}
+ <tr><td>opÅata organizacyjna:</td><td>{{ price_organization }} zÅ</td></tr>
+{% endif %}
+<tr><td>transport:</td><td>{{ price_transport }} zÅ</td></tr>
</table>
{% endblock %}
diff --git a/registration/templates/regulations.html b/registration/templates/regulations.html
index 8f2faa9..fd8d878 100644
--- a/registration/templates/regulations.html
+++ b/registration/templates/regulations.html
@@ -1,84 +1,84 @@
{% extends "index.html" %}
{% load i18n %}
{% block css %}
ol ol
{
list-style-type: lower-roman;
}
{% endblock css %}
{% block content %}
<h2>{% trans "Regulamin obozu" %}</h2>
<ol>
<li>
Niniejszy regulamin reguluje zasady obowiÄ
zujÄ
ce uczestników
-obozu naukowo-rekreacyjnego ZOSIA 2012, majÄ
cego miejsce w Przesiece
-w dniach 23-26 lutego 2012, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
+obozu naukowo-rekreacyjnego ZOSIA {{ zosia_final|date:"Y" }}, majÄ
cego miejsce w Przesiece
+w dniach {{ zosia_start|date:"d E Y" }} - {{ zosia_final|date:"d E Y" }}, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
</li>
<li>Organizatorem obozu jest KoÅo Studentów Informatyki z siedzibÄ
w Instytucie Informatyki Uniwersytetu WrocÅawskiego,
przy ul. Joliot-Curie 15, 50-383 WrocÅaw.
</li>
<li>Uczestnikami obozu, zwanymi dalej uczestnikami, mogÄ
byÄ jedynie
te osoby zarejestrowane w serwisie internetowym obozu, które uiÅciÅy
odpowiedniÄ
opÅatÄ wyliczonÄ
indywidualnie dla każdego uczestnika.
</li>
-<li>Obóz rozpoczyna siÄ dnia 23 lutego 2012 i koÅczy dnia 26 lutego 2012,
+<li>Obóz rozpoczyna siÄ dnia {{ zosia_start|date:"d E Y" }} i koÅczy dnia {{ zosia_final|date:"d E Y" }},
jednakże czas pobytu każdego z uczestników jest zależny od jego preferencji
zadeklarowanych w systemie internetowym.
</li>
<li>W trakcie trwania obozu, uczestnik zobowiÄ
zany jest do stosowania siÄ
do poleceŠOrganizatora i osób przez niego wyznaczonych.
</li>
<li>Nieodpowiednie zachowanie uczestnika w trakcie obozu, w szczególnoÅci
niestosowanie siÄ do poleceÅ osób wymienionych w pkt. 5, nadużywanie alkoholu,
stosowanie Årodków odurzajÄ
cych, bÄ
dź inne zachowania nieobyczajne, a także
zachowania stwarzajÄ
ce zagrożenie zdrowia i bezpieczeÅstwa uczestnika
bÄ
dź innych uczestników stanowiÄ
podstawÄ do zastosowania nastÄpujÄ
cych
Årodków dyscyplinujÄ
cych:
<ol>
<li>upomnienia;</li>
<li>powiadomienia wÅadz organizacji macierzystej (uczelni) o zachowaniu uczestnika;</li>
<li>wydalenia z obozu.</li>
</ol>
<li>O zastosowaniu Årodka dyscyplinujÄ
cego, w tym także o rodzaju zastosowanego
Årodka, decyduje jednoosobowo osoba wskazana przez Organizatora jako Kierownik
obozu. Kierownik obozu może zdecydowaÄ o naÅożeniu Årodka najbardziej dotkliwego
bez uprzedniego stosowania pozostaÅych Årodków. Kierownik obozu może zdecydowaÄ
o zastosowaniu wszystkich Årodków dyscyplinujÄ
cych ÅÄ
cznie. WÅadze uczelni
macierzystych wzglÄdem osób bÄdÄ
cych uczestnikami mogÄ
za to samo zachowanie
zastosowaÄ kary dyscyplinarne wynikajÄ
ce z Regulaminu Studiów.
</li>
<li>Uczestnik ponosi odpowiedzialnoÅÄ za szkody wyrzÄ
dzone osobom trzecim
w czasie przebywania na obozie. Organizator nie przejmuje odpowiedzialnoÅci
wzglÄdem osób trzecich za zachowania uczestnika w trakcie obozu.
</li>
<li>Poprzez swój udziaÅ w obozie uczestnik oÅwiadcza wzglÄdem Organizatora,
iż jest w stanie zdrowia umożliwiajÄ
cym bezpieczne uczestnictwo w programie obozu.
</li>
<li>Organizator nie sprawuje pieczy nad osobÄ
uczestnika oraz jego mieniem
w trakcie obozu. W szczególnoÅci Organizator nie ponosi odpowiedzialnoÅci
za mienie uczestnika pozostawione w obiekcie, w którym organizowany jest obóz.
</li>
<li>Uczestnikowi nie przysÅuguje zwrot jego Åwiadczenia na rzecz Organizatora
bÄ
dź czÄÅci tego Åwiadczenia w przypadku niepeÅnego udziaÅu w obozie z przyczyn,
za które Organizator nie odpowiada. W szczególnoÅci zwrot Åwiadczenia bÄ
dź czÄÅci
Åwiadczenia nie przysÅuguje uczestnikowi, wzglÄdem którego zastosowano karÄ
przewidzianÄ
w pkt 6.3.
</li>
<li>Warunki rezygnacji:
<ol>
<li>Rezygnacja z imprezy nastÄpuje w momencie zÅożenia przez uczestnika rezygnacji
w formie pisemnej lub elektronicznej na adres pocztowy Organizatora.
</li>
<li>W przypadku rezygnacji potrÄ
ca siÄ 100% wpÅaconej kwoty.
</li>
<li>Istnieje możliwoÅÄ zwrotu wpÅaconej kwoty, gdy rezygnujÄ
cy uczestnik znajdzie
na to miejsce innego uczestnika.
</li>
</ol>
</ol>
{% endblock content %}
diff --git a/registration/views.py b/registration/views.py
index 68b4625..d16b3aa 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -1,239 +1,314 @@
# -*- coding: UTF-8 -*-
from django.shortcuts import render_to_response, HttpResponse
from django.http import HttpResponseRedirect, Http404
from django.contrib.auth.models import User
from django.contrib.auth import logout
from forms import *
from models import UserPreferences, Organization
+from common.models import ZosiaDefinition
from common.forms import LoginForm
from django.core.mail import send_mail
from django.contrib.auth.tokens import default_token_generator as token_generator
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.http import base36_to_int, int_to_base36
from django.template import Context, loader
from django.contrib.sites.models import RequestSite
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import never_cache
from common.helpers import *
from datetime import datetime, timedelta
def activate_user(request, uidb36=None, token=None):
assert uidb36 is not None and token is not None
try:
uid_int = base36_to_int(uidb36)
usr = get_object_or_404(User, id=uid_int)
except Exception:
return render_to_response('reactivation.html', {})
if token_generator.check_token(usr, token):
usr.is_active = True
usr.save()
else:
return render_to_response('reactivation.html', {})
return HttpResponseRedirect('/login/?next=/change_preferences/') # yeah, right...
def register(request):
if is_registration_disabled():
raise Http404
user = request.user
title = "Registration"
+
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+
+ price_overnight = definition.price_overnight
+ price_overnight_breakfast = definition.price_overnight_breakfast
+ price_overnight_dinner = definition.price_overnight_dinner
+ price_overnight_full = definition.price_overnight_full
+ price_organization = definition.price_organization
+ price_transport = definition.price_transport
# login_form = LoginForm()
#if user.is_authenticated:
# return HttpResponseRedirect('/blog/')
if request.method == 'POST':
form = RegisterForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password']
username = form.cleaned_data['email']
try:
user = User.objects.get(email=email)
return HttpResponseRedirect('/password_reset/')
except User.DoesNotExist:
user = User.objects.create_user(email, email, password)
user.first_name = form.cleaned_data['name']
user.last_name = form.cleaned_data['surname']
user.is_active = False
# send activation mail
t = loader.get_template("activation_email.txt")
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
c = {
'site_name': RequestSite(request),
'uid': int_to_base36(user.id),
'token': token_generator.make_token(user),
+ 'payment_deadline': definition.payment_deadline,
}
send_mail( _('activation_mail_title'),
t.render(Context(c)),
'[email protected]',
[ user.email ],
fail_silently=True )
user.save()
#saving organization
try:
org1 = form.cleaned_data['organization_1']
org2 = form.cleaned_data['organization_2']
if org1 == 'new':
org = Organization(name=org2, accepted=False)
org.save()
else:
org = Organization.objects.get(id=org1)
except Exception:
org = Organization("fail",accepted=False)
org.save()
prefs = UserPreferences(user=user)
prefs.org = org
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.bus = form.cleaned_data['bus']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.minutes_early = 0
prefs.save()
return HttpResponseRedirect('/register/thanks/')
else:
form = RegisterForm()
return render_to_response('register_form.html', locals())
def regulations(request):
# Setting title makes "Registration" link visible on the panel.
- title = "Registration"
+ title = "Registration"
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ zosia_start = definition.zosia_start
+ zosia_final = definition.zosia_final
return render_to_response('regulations.html', locals())
def thanks(request):
user = request.user
title = "Registration"
login_form = LoginForm()
return render_to_response('thanks.html', locals())
def count_payment(user):
+ # returns how much money user is going to pay
# hmm, we want to work for preferences, too
if user.__class__ == UserPreferences:
prefs = user
else:
prefs = UserPreferences.objects.get(user=user)
- # returns how much money user is going to pay
- # ok, temporarily it is hardcoded, probably should
- # be moved somewhere else
- days_payment = (prefs.day_1 + prefs.day_2 + prefs.day_3) * 40
- breakfasts_payment = (prefs.breakfast_2 + prefs.breakfast_3 + prefs.breakfast_4) * 15
- dinners_payment = (prefs.dinner_1 + prefs.dinner_2 + prefs.dinner_3) * 20
- transport_payment = 0;
- if prefs.bus: transport_payment += 45;
- bonus_payment = 15
- if prefs.day_1 and prefs.breakfast_2 and prefs.dinner_1: bonus_payment -= 10
- if prefs.day_2 and prefs.breakfast_3 and prefs.dinner_2: bonus_payment -= 10
- if prefs.day_3 and prefs.breakfast_4 and prefs.dinner_3: bonus_payment -= 10
- return days_payment + breakfasts_payment + dinners_payment + bonus_payment + transport_payment
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ payment = 0
+
+ # payments: overnight stays + board
+ if prefs.day_1 and prefs.dinner_1 and prefs.breakfast_2:
+ payment += definition.price_overnight_full
+ else:
+ if prefs.day_1:
+ if prefs.dinner_1:
+ payment += definition.price_overnight_dinner
+ elif prefs.breakfast_2:
+ payment += definition.price_overnight_breakfast
+ else:
+ payment += definition.price_overnight
+
+ if prefs.day_2 and prefs.dinner_2 and prefs.breakfast_3:
+ payment += definition.price_overnight_full
+ else:
+ if prefs.day_2:
+ if prefs.dinner_2:
+ payment += definition.price_overnight_dinner
+ elif prefs.breakfast_3:
+ payment += definition.price_overnight_breakfast
+ else:
+ payment += definition.price_overnight
+
+ if prefs.day_3 and prefs.dinner_3 and prefs.breakfast_4:
+ payment += definition.price_overnight_full
+ else:
+ if prefs.day_3:
+ if prefs.dinner_3:
+ payment += definition.price_overnight_dinner
+ elif prefs.breakfast_4:
+ payment += definition.price_overnight_breakfast
+ else:
+ payment += definition.price_overnight
+
+ # payment: transport
+ if prefs.bus:
+ payment += definition.price_transport
+
+ # payment: organization fee
+ payment += definition.price_organization
+ return payment
@never_cache
@login_required
def change_preferences(request):
user = request.user
title = "Change preferences"
prefs = UserPreferences.objects.get(user=user)
form = ChangePrefsForm()
user_paid = prefs.paid
- user_openning_hour = datetime(2011,2,26,20,00) - timedelta(minutes=prefs.minutes_early) # for sure to change
+ try:
+ definition = ZosiaDefinition.objects.get(active_definition=True)
+ except Exception:
+ raise Http404
+ user_openning_hour = definition.rooming_start - timedelta(minutes=prefs.minutes_early) # for sure to change
+
+ price_overnight = definition.price_overnight
+ price_overnight_breakfast = definition.price_overnight_breakfast
+ price_overnight_dinner = definition.price_overnight_dinner
+ price_overnight_full = definition.price_overnight_full
+ price_organization = definition.price_organization
+ price_transport = definition.price_transport
+ account_number = definition.account_number
+ account_data_1 = definition.account_data_1
+ account_data_2 = definition.account_data_2
+ account_data_3 = definition.account_data_3
+ year = definition.zosia_final.year
if request.POST:
# raise Http404 # the most nooby way of blocking evar (dreamer_)
form = ChangePrefsForm(request.POST)
# bug with settings not updateble
# after user paid
if user_paid: # remove or True after zosia
post = request.POST
rewritten_post = {}
for k in post.keys():
rewritten_post[k] = post[k]
for k in [ 'day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_3', 'dinner_2', 'bus', 'vegetarian' ]:
if prefs.__dict__[k]:
rewritten_post[k] = u'on'
rewritten_post['shirt_type'] = prefs.__dict__['shirt_type']
rewritten_post['shirt_size'] = prefs.__dict__['shirt_size']
form = ChangePrefsForm(rewritten_post)
form.add_bad_org(prefs)
form.set_paid(user_paid)
form.set_bus_hour(prefs.bus_hour)
if form.is_valid():
# save everything
prefs.org = Organization.objects.get(id=form.cleaned_data['organization_1'])
if prefs.paid:
pass
else:
prefs.day_1 = form.cleaned_data['day_1']
prefs.day_2 = form.cleaned_data['day_2']
prefs.day_3 = form.cleaned_data['day_3']
prefs.breakfast_2 = form.cleaned_data['breakfast_2']
prefs.breakfast_3 = form.cleaned_data['breakfast_3']
prefs.breakfast_4 = form.cleaned_data['breakfast_4']
prefs.dinner_1 = form.cleaned_data['dinner_1']
prefs.dinner_2 = form.cleaned_data['dinner_2']
prefs.dinner_3 = form.cleaned_data['dinner_3']
prefs.shirt_size = form.cleaned_data['shirt_size']
prefs.shirt_type = form.cleaned_data['shirt_type']
prefs.bus = form.cleaned_data['bus']
prefs.bus_hour = form.cleaned_data['bus_hour']
prefs.vegetarian = form.cleaned_data['vegetarian']
prefs.save()
payment = count_payment(user)
else:
form.initialize(prefs)
payment = count_payment(user)
user_wants_bus = prefs.bus
return render_to_response('change_preferences.html', locals())
@login_required
def users_status(request):
if not ( request.user.is_staff and request.user.is_active ):
raise Http404
# nie no, to jest źle...
# users = User.objects.all()
# prefs = UserPreferences.objects.all()
#list = zip(users,prefs)
list = []
return render_to_response('the_great_table.html', locals())
def register_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid = True
prefs.save()
return HttpResponse("ok")
# TODO(Karol): remove after successful verification.
"""
def register_bus_payment(request):
user = request.user
if not user.is_authenticated() or not user.is_staff or not user.is_active:
raise Http404
if not request.POST:
raise Http404
pid = request.POST['id']
prefs = UserPreferences.objects.get(id=pid)
prefs.paid_for_bus = True
prefs.save()
return HttpResponse("ok")
"""
diff --git a/scripts/rooms_csv_to_json.py b/scripts/rooms_csv_to_json.py
index 92c7eb2..341a513 100644
--- a/scripts/rooms_csv_to_json.py
+++ b/scripts/rooms_csv_to_json.py
@@ -1,2 +1,30 @@
-__author__ = 'dominika'
-
\ No newline at end of file
+# -*- coding: UTF-8 -*-
+
+"""
+reads file (name given as call parameter) of following format:
+header
+(room number, whatever, capacity, (whatever,)*)*
+prints json to standard output
+"""
+
+import datetime
+import sys
+
+print '[',
+
+id_start = 100
+
+try:
+ file = open( sys.argv[1], mode='r', )
+ for line in file.readlines()[1:-1]:
+ try:
+ room = line.split(',')
+ print "{\"pk\": " + str(id_start) + ", \"model\": \"newrooms.nroom\", \"fields\": {\"short_unlock_time\": \"" + \
+ str(datetime.datetime.now()) + "\", \"capacity\": " + str(room[2]) + ", \"number\": \"" + str(room[0]) + "\"}}, "
+ id_start += 1
+ except IndexError:
+ pass
+except IndexError:
+ print "type: python get_corp.py filename_in filename_out"
+
+print ' ]'
\ No newline at end of file
diff --git a/settings.py b/settings.py
index 0f8c3e5..ee23a2a 100644
--- a/settings.py
+++ b/settings.py
@@ -1,112 +1,112 @@
# -*- coding: UTF-8 -*-
# Django settings for zapisy_zosia project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[email protected]'),
('dreamer_', '[email protected]')
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'CET'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'pl'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^(*+wz_l2paerc)u(si)-a#aotpk#6___9e*o4(_0tlegdmfl+'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
ROOT_URLCONF = 'zapisy_zosia.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.getcwd()+os.sep+'templates'
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.markup',
#'django.contrib.sites',
'django.contrib.admin',
'django.contrib.formtools',
#'zapisy_zosia.rooms',
'zapisy_zosia.newrooms',
'zapisy_zosia.lectures',
'zapisy_zosia.registration',
'zapisy_zosia.blog',
'zapisy_zosia.common',
'zapisy_zosia.blurb',
)
AUTHENTICATION_BACKENDS = (
'zapisy_zosia.email-auth.EmailBackend',
)
# well, it's temporary, of course...
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '25'
-EMAIL_HOST_USER = '[email protected]' # it doesn't exist afaik
-EMAIL_HOST_PASSWORD = 'zosiatest'
+EMAIL_HOST_USER = '[email protected]' # it doesn't exist afaik
+EMAIL_HOST_PASSWORD = 'akwarium'
EMAIL_USE_TLS = True
CACHE_BACKEND = 'locmem:///'
CACHE_MIDDLEWARE_SECONDS = 30
SESSION_ENGINE = "django.contrib.sessions.backends.file"
diff --git a/templates/activation_email.txt b/templates/activation_email.txt
index 8f1f0c2..d0887ed 100644
--- a/templates/activation_email.txt
+++ b/templates/activation_email.txt
@@ -1,14 +1,14 @@
DziÄkujemy za rejestracjÄ w systemie zapisów na ZOSIÄ.
Aby aktywowaÄ konto oraz zobaczyÄ dane potrzebne do wpÅaty
kliknij w poniższy link:
http://{{site_name}}/register/activate/{{uid}}-{{token}}/
-Przypominamy, że termin wpÅat upÅywa 24 lutego 2011r.
+Przypominamy, że termin wpÅat upÅywa {{payment_deadline|date:"d M Y"}}.
--
Organizatorzy
Zimowego Obozu Studentów Informatyki ZOSIA
[email protected]
|
dreamer/zapisy_zosia
|
c9e9d72d421e54308f915ab3648e2cad45237b1d
|
no more hardcoded data
|
diff --git a/scripts/rooms_csv_to_json.py b/scripts/rooms_csv_to_json.py
new file mode 100644
index 0000000..92c7eb2
--- /dev/null
+++ b/scripts/rooms_csv_to_json.py
@@ -0,0 +1,2 @@
+__author__ = 'dominika'
+
\ No newline at end of file
|
dreamer/zapisy_zosia
|
04c95ed4b95fd260da0ffb6de2c84b3780e87731
|
Changes in preparation for 2012
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index 673180a..10ae36e 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,82 +1,83 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
-<a href="http://www.michalowice-piechowice.pl/">OÅrodek Uroczysko</a> w
-<a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Piechowice,+Wczasowa+6,+Poland&aq=0&sll=50.835432,15.608826&sspn=0.288377,0.710678&ie=UTF8&hq=&hnear=Wczasowa+6,+Piechowice,+Jeleniog%C3%B3rski,+Dolno%C5%9Bl%C4%85skie,+Poland&ll=50.818083,15.590973&spn=0.144242,0.486145&z=12">MichaÅowicach â Piechowicach</a>
-
+<a href="http://www.przesieka.pl/markus/">Rezydencja Markus</a> w
+<a href="http://g.co/maps/gb3p2">Przesiece</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
- <li>zapisy i wpÅaty<br/>do 24 lutego 2011, 23:59</li>
- <li>zgÅaszanie wykÅadów<br/>do 24 lutego 2011, 23:59</li>
- <li>zapisy na pokoje<br/>od 26 lutego 2011, 18:00</li>
- <li>wyjazd<br/>3 marca 2011</li>
- <li>powrót<br/>6 marca 2011</li>
+ <li>zapisy i wpÅaty<br/>daty zostanÄ
ogÅoszone w styczniu</li>
+ <li>zgÅaszanie wykÅadów<br/>do 19 lutego 2012, 23:59</li>
+ <li>zapisy na pokoje<br/>od 18 lutego 2012, 18:00</li>
+ <li>wyjazd<br/>23 lutego 2012</li>
+ <li>powrót<br/>26 lutego 2012</li>
</ul>
<h4>Kontakt</h4>
<p>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
-<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
+<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/logo_uwr.jpg' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
</p>
+{% comment %}
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
+{% endcomment %}
{% endblock %}
{% endcache %}
diff --git a/common/helpers.py b/common/helpers.py
index 8cccf33..4cdca32 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,46 +1,46 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
# this is the only place that should be changed
start_date = datetime(2011,1,30, 1,05)
final_date = datetime(2011,2,25, 1,05)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
return not is_registration_enabled()
def is_lecture_suggesting_enabled():
# this is the only place that should be changed
start_date = datetime(2011,1,30, 1,05)
- final_date = datetime(2011,2,25, 1,05)
+ final_date = datetime(2012,2,19, 1,05)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
return not is_lecture_suggesting_enabled()
def is_rooming_enabled():
start_date = datetime(2011,2,26, 20,00)
final_date = datetime(2011,2,28, 23,00)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def has_user_opened_records(user):
prefs = UserPreferences.objects.get(user=user)
user_openning_hour = datetime(2011,2,26, 20,00) - timedelta(minutes=prefs.minutes_early)
return user_openning_hour <= datetime.now()
def is_rooming_disabled():
return not is_rooming_enabled()
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index f631521..d7c4a03 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,213 +1,152 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
-<h2>Warsztaty</h2>
-
-<article class="lecture_special">
- <h3>CodeRetreat@ZOSIA2011</h3>
-<div id="lecture_abstract">
-CodeRetreat to warsztaty majÄ
ce na celu poznanie oraz zgÅÄbienie Test-Driven Development i innych dobrych praktyk programistycznych. Skupimy siÄ gÅównie na tym, jak programowaÄ, aby powstaÅy kod byÅ jak najlepszej jakoÅci: czysty i Åatwy w późniejszym utrzymaniu. <br><br>
-
-Warsztaty bÄdÄ
skÅadaÅy siÄ z czterech 45-minutowych sesji programowania w parach. Aby wziÄ
Ä w nich udziaÅ, należy przynieÅÄ ze sobÄ
komputer (co najmniej jeden na dwie osoby) z zainstalowanym Årodowiskiem programistycznym, umożliwiajÄ
cym pisanie i uruchamianie testów jednostkowych.<br><br>
-
-</div><div id="lecture_time"><strong>Plan warsztatów (sobota, 5.03.2011,10:00-15:30):</strong><br>
-
-10:00 - 10:40 Wprowadzenie: co to jest TDD i jak je stosowaÄ?<br>
-
-10:40 - 15:00 Cztery sesje programowania w parach (45 min), rozdzielone 15-20 min przerwami<br>
-
-15:00 - 15:30 Podsumowanie i dyskusja<br>
-
-</div>
-</article>
+{% comment %}
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
- <h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
- <div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
-<div id="lecture_abstract">
-BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
-</article>
-<article class="lecture_special">
- <h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
- <div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
-<div id="lecture_abstract">
-W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
-jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
-potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
-aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
-dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
-obliczeniowej na serwerach.</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek o 17:00</strong></div>
-</article>
-
-<article class="lecture_special">
- <h3>Jak siÄ programuje w NK</h3>
- <div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
-<div id="lecture_abstract">
-Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
-W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
-Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek o 17:45</strong></div>
-</article>
-
-<article class="lecture_special">
- <h3>Sztuczna inteligencja w praktyce</h3>
- <div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
-<div id="lecture_abstract">
-Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
-Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
-Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
-kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
-</article>
-
-<article class="lecture_special">
- <h3>Tworzenie gier to nie zabawa</h3>
- <div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
- <div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
-<div id="lecture_abstract">
-Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:30 </strong></div>
+ <h3>TytuÅ</h3>
+ <div id="lecture_author">Autor</div>
+ <div id="lecture_abstract">Abstrakt</div>
</article>
+{% endcomment %}
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
diff --git a/locale/pl/LC_MESSAGES/django.mo b/locale/pl/LC_MESSAGES/django.mo
index 0c5454b..a054b20 100644
Binary files a/locale/pl/LC_MESSAGES/django.mo and b/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/locale/pl/LC_MESSAGES/django.po b/locale/pl/LC_MESSAGES/django.po
index b0a6b11..92f9e7c 100644
--- a/locale/pl/LC_MESSAGES/django.po
+++ b/locale/pl/LC_MESSAGES/django.po
@@ -1,531 +1,531 @@
# SOME DESCRIPTIVE TITLE.
# Copyleft 2008
# This file is distributed under the same license as the zapisy_zosia.
# dreamer_ <[email protected]>, 2008.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-02-01 11:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: dreamer_ <[email protected]>\n"
"Language-Team: noteam <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: common/forms.py:16
msgid "Password too short"
msgstr "HasÅo powinno mieÄ przynajmniej 6 znaków dÅugoÅci"
#: common/templates/bye.html:5
msgid "bye"
msgstr "WylogowaÅeÅ siÄ."
#: common/templates/bye.html:7 common/templates/reactivation.html:7
#: registration/templates/reactivation.html:7
msgid "thanks for visit"
msgstr "DziÄkujemy za wizytÄ i do zobaczenia na ZOSI!"
#: common/templates/login.html:11
msgid "loggedalready"
msgstr "Powtórne logowanie nie byÅo konieczne ;)"
#: common/templates/login.html:14
msgid "loginfail"
msgstr "Niestety, logowanie siÄ nie powiodÅo."
#: common/templates/login.html:16
msgid "loginfailrecover"
msgstr ""
"Jeżeli już posiadasz swoje konto, możesz <a href='/"
"password_reset/'>odzyskaÄ</a> hasÅo."
#: common/templates/login.html:18
msgid "stranger"
msgstr "Zapraszamy do zalogowania siÄ."
#: common/templates/login.html:33
#, fuzzy
msgid "email"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: common/templates/login.html:44
#: registration/templates/change_preferences.html:71
#: registration/templates/register_form.html:73 templates/index.html:53
msgid "password"
msgstr "hasÅo"
#: common/templates/login.html:49
msgid "loginbutton"
msgstr "Zaloguj"
#: common/templates/reactivation.html:5
#: registration/templates/reactivation.html:5
msgid "reactivate"
msgstr "Użyty link aktywacyjny jest nieprawidÅowy lub nieaktualny."
#: lectures/views.py:28
msgid "thankyou"
msgstr "DziÄkujemy! Twój wykÅad czeka na akceptacjÄ moderatora."
#: lectures/templates/lectures.html:10
#, python-format
msgid "<li>%(msg)s</li>"
msgstr ""
#: lectures/templates/lectures.html:16
#: registration/templates/change_preferences.html:55
msgid "Repair errors below, please."
msgstr "Prosimy o poprawienie wskazanych bÅÄdów."
#: lectures/templates/lectures.html:20
msgid "Invited talks"
msgstr "WykÅady zaproszone"
#: lectures/templates/lectures.html:20
msgid "Lectures suggested"
msgstr "Zaproponowane wykÅady"
#: lectures/templates/lectures.html:28
msgid "None yet. You can be first!"
msgstr "Jeszcze nikt nie zaproponowaÅ wykÅadu. Twój może byÄ pierwszy!"
#: lectures/templates/lectures.html:33
msgid "Suggest your lecture"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:36
msgid "Public info"
msgstr "Informacje wymagane"
#: lectures/templates/lectures.html:46
msgid "Title"
msgstr "TytuÅ"
#: lectures/templates/lectures.html:57
msgid "duraszatan"
msgstr "Czas trwania"
#: lectures/templates/lectures.html:57
msgid "inminutes"
msgstr " (w minutach)"
#: lectures/templates/lectures.html:67
msgid "Abstract"
msgstr "Abstrakt"
#: lectures/templates/lectures.html:67
msgid "(max chars)"
msgstr " (do 512 znaków)"
#: lectures/templates/lectures.html:73
msgid "Additional information"
msgstr "Informacje dodatkowe"
#: lectures/templates/lectures.html:83
msgid ""
"Your suggestions, requests and comments intended for organizers and a lot "
"more, what you always wanted to say these philistinic bastards with purulent "
"knees"
msgstr ""
"Uwagi, proÅby i wszelkie komentarze dotyczÄ
ce wykÅadu, którymi chciaÅbyÅ siÄ "
"podzieliÄ z organizatorami oraz ew. proponowany czas trwania wykÅadu z uzasadnieniem."
#: lectures/templates/lectures.html:88
msgid "Suggest"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:98
msgid "Yes we can"
msgstr " "
#: lectures/templates/lectures.html:99
msgid "Hurray"
msgstr " "
#: lectures/templates/lectures.html:101
msgid "Ops, youre not logged in"
msgstr "Ojej, nie jesteÅ zalogowany."
#: lectures/templates/lectures.html:102
msgid "You have to be registered"
msgstr ""
"JeÅli tylko siÄ zarejestrujesz, bÄdziesz mógÅ dodaÄ swój wykÅad (and there "
"will be a cake)."
#: registration/forms.py:30
msgid "You can buy meal only for adequate hotel night."
msgstr "PosiÅki sÄ
dostÄpne tylko na wykupione doby hotelowe."
#: registration/forms.py:103 registration/forms.py:160
msgid "At least one day should be selected."
msgstr "Wybierz przynajmniej jeden nocleg."
#: registration/models.py:22
msgid "classic"
msgstr "mÄska"
#: registration/models.py:23
msgid "women"
msgstr "damska"
#: registration/views.py:68
msgid "activation_mail_title"
msgstr "Mail aktywacyjny systemu zapisów na ZOSIÄ"
#: registration/templates/change_preferences.html:27
msgid "Paid was registered, see you soon!"
msgstr "ZarejestrowaliÅmy TwojÄ
wpÅatÄ, do zobaczenia na ZOSI!"
#: registration/templates/change_preferences.html:60
msgid "Preferences"
msgstr "Ustawienia"
#: registration/templates/change_preferences.html:64
#: registration/templates/register_form.html:52
msgid "authentication"
msgstr "dane do uwierzytelniania"
#: registration/templates/change_preferences.html:72
msgid "change"
msgstr "zmieÅ"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "personal"
msgstr "dane osobowe"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "room openning hour"
msgstr "otwarcie zapisów na pokoje"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:100
msgid "name"
msgstr "imiÄ"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:111
msgid "surname"
msgstr "nazwisko"
#: registration/templates/register_form.html:119
msgid "adding organizations only at registration"
msgstr "Dodanie nowej organizacji jest możliwe tylko podczas rejestracji."
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "organization"
msgstr "organizacja"
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "bus hour"
msgstr "godzina autobusu"
#: registration/templates/change_preferences.html:100
#: registration/templates/register_form.html:141
msgid "nights"
msgstr "noclegi "
#: registration/templates/change_preferences.html:110
#: registration/templates/register_form.html:151
msgid "night12"
-msgstr "3/4 marca"
+msgstr "23/24 lutego"
#: registration/templates/change_preferences.html:113
#: registration/templates/register_form.html:154
msgid "night23"
-msgstr "4/5 marca"
+msgstr "24/25 lutego"
#: registration/templates/change_preferences.html:116
#: registration/templates/register_form.html:157
msgid "night34"
-msgstr "5/6 marca"
+msgstr "25/26 lutego"
#: registration/templates/change_preferences.html:121
#: registration/templates/register_form.html:162
msgid "dinners"
msgstr "obiadokolacje"
#: registration/templates/change_preferences.html:129
#: registration/templates/register_form.html:170
msgid "dinner1"
-msgstr "3 marca"
+msgstr "23 lutego"
#: registration/templates/change_preferences.html:132
#: registration/templates/register_form.html:173
msgid "dinner2"
-msgstr "4 marca"
+msgstr "24 lutego"
#: registration/templates/change_preferences.html:135
#: registration/templates/register_form.html:176
msgid "dinner3"
-msgstr "5 marca"
+msgstr "25 lutego"
#: registration/templates/change_preferences.html:140
#: registration/templates/register_form.html:181
msgid "breakfasts"
msgstr "Åniadania"
#: registration/templates/change_preferences.html:148
#: registration/templates/register_form.html:189
msgid "breakfast2"
-msgstr "4 marca"
+msgstr "24 lutego"
#: registration/templates/change_preferences.html:151
#: registration/templates/register_form.html:192
msgid "breakfast3"
-msgstr "5 marca"
+msgstr "25 lutego"
#: registration/templates/change_preferences.html:154
#: registration/templates/register_form.html:195
msgid "breakfast4"
-msgstr "6 marca"
+msgstr "26 lutego"
#: registration/templates/change_preferences.html:159
#: registration/templates/register_form.html:200
msgid "others"
msgstr "pozostaÅe"
#: registration/templates/change_preferences.html:162
#: registration/templates/register_form.html:203
msgid "veggies"
msgstr "PreferujÄ kuchniÄ wegetariaÅskÄ
."
#: registration/templates/change_preferences.html:165
#: registration/templates/register_form.html:206
msgid "bussies"
msgstr ""
"Jestem zainteresowany zorganizowanym transportem autokarowym na trasie "
-"WrocÅaw - MichaÅowice - WrocÅaw"
+"WrocÅaw - Przesieka - WrocÅaw"
#: registration/templates/change_preferences.html:168
#: registration/templates/register_form.html:209
msgid "shirties"
msgstr "rozmiar koszulki"
#: registration/templates/change_preferences.html:171
#: registration/templates/register_form.html:212
msgid "shirt_type"
msgstr "rodzaj koszulki"
#: registration/templates/change_preferences.html:185
msgid "Save"
msgstr ""
#: registration/templates/register_form.html:48
#: registration/templatetags/time_block_helpers.py:14
msgid "Registration"
msgstr "Rejestracja"
#: registration/templates/register_form.html:62
#: registration/templates/register_form.html:73
#: registration/templates/register_form.html:84
#: registration/templates/register_form.html:100
#: registration/templates/register_form.html:111
#: registration/templates/register_form.html:124
msgid "(required)"
msgstr " (wymagane)"
#: registration/templates/register_form.html:84
msgid "repeatepas"
msgstr "powtórz hasÅo"
#: registration/templates/register_form.html:216
msgid "register"
msgstr "Zarejestruj"
#: registration/templates/thanks.html:5
msgid "tyouregister"
msgstr "Rejestracja prawie ukoÅczona."
#: registration/templates/thanks.html:7
msgid "checkmail"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: templates/change_password.html:14
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] ""
msgstr[1] ""
#: templates/change_password.html:33
msgid "Password (again)"
msgstr "HasÅo (ponownie)"
#: templates/change_password.html:38
msgid "Change password"
msgstr "ZmieÅ hasÅo"
#: templates/change_password_done.html:4
msgid "passwordchanged"
msgstr ""
"UdaÅo Ci siÄ zmieniÄ hasÅo.<br />Zanotuj je na żóÅtej karteczce "
"samoprzylepnej i umieÅÄ na monitorze.<br /><img src='/static_media/images/"
"kartka.jpg' width='200'/>"
#: templates/index.html:32
msgid "oh hai"
msgstr "Witaj"
#: templates/index.html:35
msgid "Administration panel"
msgstr "Panel administracyjny"
#: templates/index.html:37
msgid "Logout"
msgstr "Wyloguj"
#: templates/index.html:69
msgid "Blog"
msgstr "Blog"
#: templates/index.html:71
msgid "Change preferences"
msgstr "Moje preferencje"
#: templates/index.html:77
msgid "Lectures"
msgstr "WykÅady"
#: templates/index.html:111
msgid "Except where otherwise noted, content on this site is licensed under a"
msgstr ""
"O ile nie stwierdzono inaczej, wszystkie materiaÅy na stronie sÄ
dostÄpne na "
"licencji"
#: templates/index.html:112
msgid "based on"
msgstr "oparty na"
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:4
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
msgid "Home"
msgstr ""
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:6
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
#: templates/password_reset_form.html:6 templates/password_reset_form.html:10
msgid "Password reset"
msgstr "Odzyskiwanie hasÅa"
#: templates/password_reset_complete.html:6
#: templates/password_reset_complete.html:10
msgid "Password reset complete"
msgstr "Odzyskiwanie hasÅa zakoÅczone"
#: templates/password_reset_complete.html:12
msgid "Your password has been set. You may go ahead and log in now."
msgstr "Możesz siÄ teraz zalogowaÄ."
#: templates/password_reset_complete.html:14
msgid "Log in"
msgstr ""
#: templates/password_reset_confirm.html:4
msgid "Password reset confirmation"
msgstr "la la la"
#: templates/password_reset_confirm.html:12
msgid "Enter new password"
msgstr "Ustaw nowe hasÅo"
#: templates/password_reset_confirm.html:14
msgid ""
"Please enter your new password twice so we can verify you typed it in "
"correctly."
msgstr " "
#: templates/password_reset_confirm.html:18
msgid "New password:"
msgstr "hasÅo"
#: templates/password_reset_confirm.html:20
msgid "Confirm password:"
msgstr "powtórz hasÅo"
#: templates/password_reset_confirm.html:21
msgid "Change my password"
msgstr "Ustaw hasÅo"
#: templates/password_reset_confirm.html:26
msgid "Password reset unsuccessful"
msgstr "Nie udaÅo siÄ odzyskaÄ hasÅa"
#: templates/password_reset_confirm.html:28
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
"Link do odzyskiwania hasÅa byÅ niepoprawny, byÄ może dlatego, że zostaÅ już "
"raz użyty. W razie potrzeby powtórz caÅÄ
procedurÄ. "
#: templates/password_reset_done.html:6 templates/password_reset_done.html:10
msgid "Password reset successful"
msgstr "Odzyskiwanie hasÅa w toku"
#: templates/password_reset_done.html:12
msgid ""
"We've e-mailed you instructions for setting your password to the e-mail "
"address you submitted. You should be receiving it shortly."
msgstr ""
#: templates/password_reset_email.html:2
#: templates/registration/password_reset_email.html:3
msgid "You're receiving this e-mail because you requested a password reset"
msgstr ""
#: templates/password_reset_email.html:3
#: templates/registration/password_reset_email.html:4
#, python-format
msgid "for your user account at %(site_name)s"
msgstr ""
#: templates/password_reset_email.html:5
#: templates/registration/password_reset_email.html:6
msgid "Please go to the following page and choose a new password:"
msgstr "Kliknij w poniższy link i wybierz nowe hasÅo."
#: templates/password_reset_email.html:9
#: templates/registration/password_reset_email.html:10
msgid "Thanks for using our site!"
msgstr "DziÄkujemy za korzystanie z naszego systemu!"
#: templates/password_reset_email.html:11
#: templates/registration/password_reset_email.html:12
#, python-format
msgid "The %(site_name)s team"
msgstr ""
#: templates/password_reset_form.html:12
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
msgstr ""
"ZapomniaÅeÅ hasÅa? Podaj swój adres e-mail, a pomożemy Ci ustawiÄ nowe."
#: templates/password_reset_form.html:16
msgid "E-mail address:"
msgstr "Adres e-mail:"
#: templates/password_reset_form.html:16
msgid "Reset my password"
msgstr "Odzyskaj hasÅo"
#: templates/admin/base_site.html:4
msgid "Django site admin"
msgstr ""
#~ msgid "add"
#~ msgstr "Dodaj"
diff --git a/registration/templates/regulations.html b/registration/templates/regulations.html
index b02f83e..8f2faa9 100644
--- a/registration/templates/regulations.html
+++ b/registration/templates/regulations.html
@@ -1,84 +1,84 @@
{% extends "index.html" %}
{% load i18n %}
{% block css %}
ol ol
{
list-style-type: lower-roman;
}
{% endblock css %}
{% block content %}
<h2>{% trans "Regulamin obozu" %}</h2>
<ol>
<li>
Niniejszy regulamin reguluje zasady obowiÄ
zujÄ
ce uczestników
-obozu naukowo-rekreacyjnego ZOSIA 2011, majÄ
cego miejsce w Piechowicach â MichaÅowicach,
-w dniach 3-6 marca 2011, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
+obozu naukowo-rekreacyjnego ZOSIA 2012, majÄ
cego miejsce w Przesiece
+w dniach 23-26 lutego 2012, a także definiuje konsekwencje wynikajÄ
ce z nieprzestrzegania tych zasad.
</li>
<li>Organizatorem obozu jest KoÅo Studentów Informatyki z siedzibÄ
w Instytucie Informatyki Uniwersytetu WrocÅawskiego,
przy ul. Joliot-Curie 15, 50-383 WrocÅaw.
</li>
<li>Uczestnikami obozu, zwanymi dalej uczestnikami, mogÄ
byÄ jedynie
te osoby zarejestrowane w serwisie internetowym obozu, które uiÅciÅy
odpowiedniÄ
opÅatÄ wyliczonÄ
indywidualnie dla każdego uczestnika.
</li>
-<li>Obóz rozpoczyna siÄ w dniu 3 marca 2011 i koÅczy w dniu 6 marca 2011,
+<li>Obóz rozpoczyna siÄ dnia 23 lutego 2012 i koÅczy dnia 26 lutego 2012,
jednakże czas pobytu każdego z uczestników jest zależny od jego preferencji
zadeklarowanych w systemie internetowym.
</li>
<li>W trakcie trwania obozu, uczestnik zobowiÄ
zany jest do stosowania siÄ
do poleceŠOrganizatora i osób przez niego wyznaczonych.
</li>
<li>Nieodpowiednie zachowanie uczestnika w trakcie obozu, w szczególnoÅci
niestosowanie siÄ do poleceÅ osób wymienionych w pkt. 5, nadużywanie alkoholu,
stosowanie Årodków odurzajÄ
cych, bÄ
dź inne zachowania nieobyczajne, a także
zachowania stwarzajÄ
ce zagrożenie zdrowia i bezpieczeÅstwa uczestnika
bÄ
dź innych uczestników stanowiÄ
podstawÄ do zastosowania nastÄpujÄ
cych
Årodków dyscyplinujÄ
cych:
<ol>
<li>upomnienia;</li>
<li>powiadomienia wÅadz organizacji macierzystej (uczelni) o zachowaniu uczestnika;</li>
<li>wydalenia z obozu.</li>
</ol>
<li>O zastosowaniu Årodka dyscyplinujÄ
cego, w tym także o rodzaju zastosowanego
Årodka, decyduje jednoosobowo osoba wskazana przez Organizatora jako Kierownik
obozu. Kierownik obozu może zdecydowaÄ o naÅożeniu Årodka najbardziej dotkliwego
bez uprzedniego stosowania pozostaÅych Årodków. Kierownik obozu może zdecydowaÄ
o zastosowaniu wszystkich Årodków dyscyplinujÄ
cych ÅÄ
cznie. WÅadze uczelni
macierzystych wzglÄdem osób bÄdÄ
cych uczestnikami mogÄ
za to samo zachowanie
zastosowaÄ kary dyscyplinarne wynikajÄ
ce z Regulaminu Studiów.
</li>
<li>Uczestnik ponosi odpowiedzialnoÅÄ za szkody wyrzÄ
dzone osobom trzecim
w czasie przebywania na obozie. Organizator nie przejmuje odpowiedzialnoÅci
wzglÄdem osób trzecich za zachowania uczestnika w trakcie obozu.
</li>
<li>Poprzez swój udziaÅ w obozie uczestnik oÅwiadcza wzglÄdem Organizatora,
iż jest w stanie zdrowia umożliwiajÄ
cym bezpieczne uczestnictwo w programie obozu.
</li>
<li>Organizator nie sprawuje pieczy nad osobÄ
uczestnika oraz jego mieniem
w trakcie obozu. W szczególnoÅci Organizator nie ponosi odpowiedzialnoÅci
za mienie uczestnika pozostawione w obiekcie, w którym organizowany jest obóz.
</li>
<li>Uczestnikowi nie przysÅuguje zwrot jego Åwiadczenia na rzecz Organizatora
bÄ
dź czÄÅci tego Åwiadczenia w przypadku niepeÅnego udziaÅu w obozie z przyczyn,
za które Organizator nie odpowiada. W szczególnoÅci zwrot Åwiadczenia bÄ
dź czÄÅci
Åwiadczenia nie przysÅuguje uczestnikowi, wzglÄdem którego zastosowano karÄ
przewidzianÄ
w pkt 6.3.
</li>
<li>Warunki rezygnacji:
<ol>
<li>Rezygnacja z imprezy nastÄpuje w momencie zÅożenia przez uczestnika rezygnacji
w formie pisemnej lub elektronicznej na adres pocztowy Organizatora.
</li>
<li>W przypadku rezygnacji potrÄ
ca siÄ 100% wpÅaconej kwoty.
</li>
<li>Istnieje możliwoÅÄ zwrotu wpÅaconej kwoty, gdy rezygnujÄ
cy uczestnik znajdzie
na to miejsce innego uczestnika.
</li>
</ol>
</ol>
{% endblock content %}
diff --git a/static_media/images/logo_uwr.jpg b/static_media/images/logo_uwr.jpg
new file mode 100644
index 0000000..4d99de3
Binary files /dev/null and b/static_media/images/logo_uwr.jpg differ
diff --git a/templates/activation_email.txt b/templates/activation_email.txt
index 332cdd1..8f1f0c2 100644
--- a/templates/activation_email.txt
+++ b/templates/activation_email.txt
@@ -1,14 +1,14 @@
DziÄkujemy za rejestracjÄ w systemie zapisów na ZOSIÄ.
Aby aktywowaÄ konto oraz zobaczyÄ dane potrzebne do wpÅaty
kliknij w poniższy link:
http://{{site_name}}/register/activate/{{uid}}-{{token}}/
-Przypominamy, że termin wpÅat upÅywa 24 lutego 2010r.
+Przypominamy, że termin wpÅat upÅywa 24 lutego 2011r.
--
Organizatorzy
Zimowego Obozu Studentów Informatyki ZOSIA
[email protected]
diff --git a/templates/index.html b/templates/index.html
index bdf51ae..0506aa3 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,132 +1,132 @@
<!doctype html>
{% load i18n %}
{% load cache %}
{% load blurb_edit %}
{% cache 60 header_index_template %}
<html lang="pl">
<head>
- <title>ZOSIA 2011</title>
+ <title>ZOSIA 2012</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="pl" />
<link href="/static_media/css/layout_2col_right_13.css" rel="stylesheet" type="text/css"/>
<link href="/static_media/css/zosia.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="/static_media/css/patches/patch_2col_right_13.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="RSS"
href="/feeds/blog/"/>
<link rel="icon" href="/static_media/images/favicon.png">
<script type="text/javascript">
window.onload=function(){ AddFillerLink("col1_content","col3_content"); }
</script>
<script type="text/javascript">
{% endcache %}
{% block javascript %}{% endblock %}
</script>
<style type="text/css">
<!--
{% block css %}{% endblock %}
-->
</style>
{% block superextra %}{% endblock %}
</head>
<body onload='{% block onload%}{% endblock %}'>
<div id="wrapper">
<div id="page_margins">
<div id="page">
<div id="header">
<div id="topnav">
{% if user.is_authenticated %}
{% trans "oh hai" %}, {{ user.first_name }} {{ user.last_name}} |
{# <a href="/password_change/">{% trans "Change password" %}</a> | #}
{% if user.is_staff %}
<a href="/admin/">{% trans "Administration panel" %}</a> |
{% endif %}
<a href="/logout/">{% trans "Logout" %}</a>
{% else %}
{% if login_form %}
<form action="/login/" method="post" id="login_form">
<fieldset>
{% if login_form.email.errors %}
<ul class="errorlist">
{% for error in login_form.email.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_email">e-mail</label> {{ login_form.email }}
{% if form.password.errors %}
<ul class="errorlist">
{% for error in form.password.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_password">{% trans "password" %}</label> {{ login_form.password }}
<input type="submit" value="login" />
</fieldset>
</form>
<div class="main_page_password_reset">
<a href="/password_reset">zapomniaÅem hasÅa</a>
</div>
{% endif %} {# login_form #}
{# <a href="/register/">{% trans "Register" %}</a> #}
{% endif %}
</div>
<a href="/blog/"><img src="/static_media/images/logo_zosi_shadow.png" alt="ZOSIA" /></a>
- <span>Zimowy Obóz Studentów Informatyki A • Piechowice â MichaÅowice 2011</span></div>
+ <span>Zimowy Obóz Studentów Informatyki A • Przesieka 2012</span></div>
<!-- begin: main navigation #nav -->
<div id="nav"> <a id="navigation" name="navigation"></a>
<!-- skiplink anchor: navigation -->
<div id="nav_main">
<ul>
<li {% ifequal title "Blog" %}id="current"{% endifequal %}><a href="/blog/">{% trans "Blog" %}</a></li>
{% load time_block_helpers %}
{% if user.is_authenticated %}
<li {% ifequal title "Change preferences" %}id="current"{% endifequal %}><a href="/change_preferences/">{% trans "Change preferences" %}</a></li>
{% else %}
{% if title %}{% registration_link title %}{% endif %} {# see registration/templatetags #}
{% endif %}
<li {% ifequal title "Lectures" %}id="current"{% endifequal %}><a href="/lectures/">{% trans "Lectures" %}</a></li>
- <li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li>
+ {# <li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li> #}
{% if user.is_authenticated %}
{% if title %}{% rooming_link user title %}{% endif %} {# see registration/templatetags #}
{% endif %}
</ul>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col1 - first float column -->
<div id="col1">
{% if messages_list %} <!-- TODO -->
<ul>
<li>The lecture "Lecture object" was added successfully.</li>
</ul>
{% endif %}
<div id="col1_content" class="clearfix"> <a id="content" name="content"></a>
<!-- skiplink anchor: Content -->
{% block content %}page content{% endblock %}
</div>
</div>
<!-- end: #col1 -->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
{% block right_column %}{% endblock %}
</div>
<div id="ie_clearing"> </div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="footer">
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/"><img alt="Creative Commons License" style="border-width:0; margin: 0.2em 0.4em 0 0; float:left;" src="http://i.creativecommons.org/l/by/2.5/pl/88x31.png" /></a>{% trans "Except where otherwise noted, content on this site is licensed under a" %} <a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/">Creative Commons Attribution 2.5 Poland</a>.<br/>
copyleft Patryk Obara, RafaÅ KuliÅski | <a href="http://github.com/dreamer/zapisy_zosia">src</a> | Layout {% trans "based on" %} <a href="http://www.yaml.de/">YAML</a>
</div>
<!-- end: #footer -->
</div>
</div>
</div><!-- wrapper -->
</body>
</html>
|
dreamer/zapisy_zosia
|
e1d794f7a84743c355479fa5eb7071372126454d
|
favicon at last :)
|
diff --git a/static_media/images/favicon.png b/static_media/images/favicon.png
new file mode 100644
index 0000000..b7a583e
Binary files /dev/null and b/static_media/images/favicon.png differ
diff --git a/templates/index.html b/templates/index.html
index 88cfd8e..bdf51ae 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,131 +1,132 @@
<!doctype html>
{% load i18n %}
{% load cache %}
{% load blurb_edit %}
{% cache 60 header_index_template %}
<html lang="pl">
<head>
<title>ZOSIA 2011</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="pl" />
<link href="/static_media/css/layout_2col_right_13.css" rel="stylesheet" type="text/css"/>
<link href="/static_media/css/zosia.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="/static_media/css/patches/patch_2col_right_13.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="RSS"
href="/feeds/blog/"/>
+<link rel="icon" href="/static_media/images/favicon.png">
<script type="text/javascript">
window.onload=function(){ AddFillerLink("col1_content","col3_content"); }
</script>
<script type="text/javascript">
{% endcache %}
{% block javascript %}{% endblock %}
</script>
<style type="text/css">
<!--
{% block css %}{% endblock %}
-->
</style>
{% block superextra %}{% endblock %}
</head>
<body onload='{% block onload%}{% endblock %}'>
<div id="wrapper">
<div id="page_margins">
<div id="page">
<div id="header">
<div id="topnav">
{% if user.is_authenticated %}
{% trans "oh hai" %}, {{ user.first_name }} {{ user.last_name}} |
{# <a href="/password_change/">{% trans "Change password" %}</a> | #}
{% if user.is_staff %}
<a href="/admin/">{% trans "Administration panel" %}</a> |
{% endif %}
<a href="/logout/">{% trans "Logout" %}</a>
{% else %}
{% if login_form %}
<form action="/login/" method="post" id="login_form">
<fieldset>
{% if login_form.email.errors %}
<ul class="errorlist">
{% for error in login_form.email.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_email">e-mail</label> {{ login_form.email }}
{% if form.password.errors %}
<ul class="errorlist">
{% for error in form.password.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_password">{% trans "password" %}</label> {{ login_form.password }}
<input type="submit" value="login" />
</fieldset>
</form>
<div class="main_page_password_reset">
<a href="/password_reset">zapomniaÅem hasÅa</a>
</div>
{% endif %} {# login_form #}
{# <a href="/register/">{% trans "Register" %}</a> #}
{% endif %}
</div>
<a href="/blog/"><img src="/static_media/images/logo_zosi_shadow.png" alt="ZOSIA" /></a>
<span>Zimowy Obóz Studentów Informatyki A • Piechowice â MichaÅowice 2011</span></div>
<!-- begin: main navigation #nav -->
<div id="nav"> <a id="navigation" name="navigation"></a>
<!-- skiplink anchor: navigation -->
<div id="nav_main">
<ul>
<li {% ifequal title "Blog" %}id="current"{% endifequal %}><a href="/blog/">{% trans "Blog" %}</a></li>
{% load time_block_helpers %}
{% if user.is_authenticated %}
<li {% ifequal title "Change preferences" %}id="current"{% endifequal %}><a href="/change_preferences/">{% trans "Change preferences" %}</a></li>
{% else %}
{% if title %}{% registration_link title %}{% endif %} {# see registration/templatetags #}
{% endif %}
<li {% ifequal title "Lectures" %}id="current"{% endifequal %}><a href="/lectures/">{% trans "Lectures" %}</a></li>
<li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li>
{% if user.is_authenticated %}
{% if title %}{% rooming_link user title %}{% endif %} {# see registration/templatetags #}
{% endif %}
</ul>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col1 - first float column -->
<div id="col1">
{% if messages_list %} <!-- TODO -->
<ul>
<li>The lecture "Lecture object" was added successfully.</li>
</ul>
{% endif %}
<div id="col1_content" class="clearfix"> <a id="content" name="content"></a>
<!-- skiplink anchor: Content -->
{% block content %}page content{% endblock %}
</div>
</div>
<!-- end: #col1 -->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
{% block right_column %}{% endblock %}
</div>
<div id="ie_clearing"> </div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="footer">
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/"><img alt="Creative Commons License" style="border-width:0; margin: 0.2em 0.4em 0 0; float:left;" src="http://i.creativecommons.org/l/by/2.5/pl/88x31.png" /></a>{% trans "Except where otherwise noted, content on this site is licensed under a" %} <a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/">Creative Commons Attribution 2.5 Poland</a>.<br/>
copyleft Patryk Obara, RafaÅ KuliÅski | <a href="http://github.com/dreamer/zapisy_zosia">src</a> | Layout {% trans "based on" %} <a href="http://www.yaml.de/">YAML</a>
</div>
<!-- end: #footer -->
</div>
</div>
</div><!-- wrapper -->
</body>
</html>
|
dreamer/zapisy_zosia
|
6eff8350594bd2fd42b92703310f413bd6bbdceb
|
Fix django 1.0 admin urls
|
diff --git a/urls.py b/urls.py
index 23d126d..6acad32 100644
--- a/urls.py
+++ b/urls.py
@@ -1,90 +1,90 @@
import os
from django.conf.urls.defaults import *
from django.contrib import admin
import registration.views
import blog.views
import lectures.views
import newrooms.views
import common.views
from blog.feeds import *
feeds = {
'blog': LatestBlogEntries,
}
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^zapisy_zosia/', include('zapisy_zosia.foo.urls')),
(r'^$', blog.views.index),
(r'^rooms/$', newrooms.views.index),
(r'^rooms/list.json$', newrooms.views.json_rooms_list),
#(r'^rooms/fill/$', newrooms.views.fill_rooms),
(r'^rooms/modify/$', newrooms.views.modify_room),
(r'^rooms/open/$', newrooms.views.open_room),
(r'^rooms/close/$', newrooms.views.close_room),
(r'^rooms/trytogetin/$', newrooms.views.trytogetin_room),
(r'^leave_room/$', newrooms.views.leave_room),
(r'^blog/$', blog.views.index),
# rss feed
(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
{'feed_dict': feeds}),
# admin related
(r'^admin/register_payment/$', registration.views.register_payment),
# TODO(Karol): we disable separate transportation payment for this edition.
# (r'^admin/register_bus_payment/$', registration.views.register_bus_payment),
- (r'^admin/(.*)', admin.site.root),
+ url(r'^admin/', include(admin.site.urls)),
# registration related
(r'^register/$', registration.views.register),
(r'^register/thanks/$', registration.views.thanks),
(r'^register/regulations/$', registration.views.regulations),
# (r'^register/add_org/$', registration.views.add_organization),
(r'^register/activate/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', registration.views.activate_user),
(r'^change_preferences/$', registration.views.change_preferences),
# login / logout
(r'^login/$', common.views.login_view),
(r'^accounts/login/', common.views.login_view),
(r'^logout/$', common.views.logout_view),
(r'^logout/bye/$', common.views.thanks),
# apps main urls
(r'^lectures/$', lectures.views.index),
(r'^program/$', lectures.views.program),
# static media
# note, that this should be disabled for production code
# (may be disabled outside of django, though)
(r'^static_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.getcwd()+os.sep+'static_media', 'show_indexes': True}),
# urls required for password change/reset
(r'^password_change/$', common.views.password_change),
(r'^password_change/done/$', common.views.password_change_done),
(r'^password_reset/$',
'django.contrib.auth.views.password_reset',
{ 'template_name':'password_reset_form.html' }),
(r'^password_reset/done/$',
'django.contrib.auth.views.password_reset_done',
{ 'template_name':'password_reset_done.html' }),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
'django.contrib.auth.views.password_reset_confirm',
{ 'template_name':'password_reset_confirm.html' }),
(r'^reset/done/$',
'django.contrib.auth.views.password_reset_complete',
{ 'template_name':'password_reset_complete.html' }),
)
|
dreamer/zapisy_zosia
|
8622f2d0495db9eab38389b3f4145f0250d5da3e
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 7a54711..3b2ac32 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,268 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
<div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:55</div>
<div class="cell_text1"><strong>Sesja 1</strong></div>, prowadzÄ
ca: <strong>Lucyna Frank</strong>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
<div class="cell_text1"><strong>WykÅady zaproszone</strong></div>, prowadzÄ
cy: <strong>Piotr Modrzyk</strong>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 2</strong></div>, prowadzÄ
ca: <strong>Anna Dwojak</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong>, <i>Krótki kurs bebeszenia gita</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text1"><strong>WykÅad zaproszony</strong></div>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>, prowadzÄ
cy: <strong>Witold Charatonik</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 6</strong></div>, prowadzÄ
cy: <strong>Marcin MÅotkowski</strong>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
- <div class="cell_text1"><strong>Sesja 7</strong></div>
+ <div class="cell_text1"><strong>Sesja 7</strong></div>, prowadzi: <strong>Maciej Piróg</strong>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
1907c0dfd1e3a26924b4bdd16bb90a7a20de587f
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 496ab97..7a54711 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,268 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
<div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:55</div>
<div class="cell_text1"><strong>Sesja 1</strong></div>, prowadzÄ
ca: <strong>Lucyna Frank</strong>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
<div class="cell_text1"><strong>WykÅady zaproszone</strong></div>, prowadzÄ
cy: <strong>Piotr Modrzyk</strong>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
- <div class="cell_text1"><strong>Sesja 2</strong></div>, prowadzÄ
cy: <strong>Anna Dwojak</strong>
+ <div class="cell_text1"><strong>Sesja 2</strong></div>, prowadzÄ
ca: <strong>Anna Dwojak</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong>, <i>Krótki kurs bebeszenia gita</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text1"><strong>WykÅad zaproszony</strong></div>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>, prowadzÄ
cy: <strong>Witold Charatonik</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 6</strong></div>, prowadzÄ
cy: <strong>Marcin MÅotkowski</strong>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
<div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
e0320978cd837df0afe48296ffaeda0f787d28a6
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 393da0d..496ab97 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,268 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
- <div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>
+ <div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>, prowadzÄ
cy: <strong>Arkadiusz Flinik</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:55</div>
- <div class="cell_text1"><strong>Sesja 1</strong></div>
+ <div class="cell_text1"><strong>Sesja 1</strong></div>, prowadzÄ
ca: <strong>Lucyna Frank</strong>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
- <div class="cell_text1"><strong>WykÅady zaproszone</strong></div>
+ <div class="cell_text1"><strong>WykÅady zaproszone</strong></div>, prowadzÄ
cy: <strong>Piotr Modrzyk</strong>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
- <div class="cell_text1"><strong>Sesja 2</strong></div>
+ <div class="cell_text1"><strong>Sesja 2</strong></div>, prowadzÄ
cy: <strong>Anna Dwojak</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong>, <i>Krótki kurs bebeszenia gita</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
- <div class="cell_text1"><strong>WykÅad zaproszony</strong></div>
+ <div class="cell_text1"><strong>WykÅad zaproszony</strong></div>, prowadzÄ
cy: <strong>Jerzy Marcinkowski</strong>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
- <div class="cell_text1"><strong>Sesja 5</strong></div>
+ <div class="cell_text1"><strong>Sesja 5</strong></div>, prowadzÄ
cy: <strong>Witold Charatonik</strong>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
- <div class="cell_text1"><strong>Sesja 6</strong></div>
+ <div class="cell_text1"><strong>Sesja 6</strong></div>, prowadzÄ
cy: <strong>Marcin MÅotkowski</strong>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
<div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
a67af8ae8d211ee9cc1a31362e478fb3ab25d44c
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 2d3afe0..ee74a4a 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,266 +1,268 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
<div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:55</div>
<div class="cell_text1"><strong>Sesja 1</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
+</div>
+ <div class="row">
+ <div class="cell_hour">00:00-</div>
+ <div class="cell_text1">Zabawa przy gitarze</div>
+ </div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
<div class="cell_text1"><strong>WykÅady zaproszone</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 2</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
-<br>
+</div>
<div class="row">
<div class="cell_hour">00:00-</div>
- <div class="cell_text1">Zabawa przy gitarze</div>
+ <div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text1"><strong>WykÅad zaproszony</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 6</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
</div>
-<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:35</div>
<div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
-</div><br>
- <div class="row">
- <div class="cell_hour">00:00-</div>
- <div class="cell_text1">Karaoke</div>
- </div>
+
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
diff --git a/registration/templates/change_preferences.html b/registration/templates/change_preferences.html
index 16f007f..3144c79 100644
--- a/registration/templates/change_preferences.html
+++ b/registration/templates/change_preferences.html
@@ -1,265 +1,265 @@
{% extends "index.html"%}
{% load i18n %}
{% block css %}
#register_nights,
#register_breakfasts,
#register_dinners {
display: inline;
}
#register_nights label,
#register_breakfasts label,
#register_dinners label {
width: 10em;
}
#register_other label {
display: inline;
width: 15.3em;
}
.nasty_choices_li label { float: left; }
.nasty_choices_li select { width: 7em; }
}
{% endblock css %}
{% block content %}
{% if user_paid %}
<ul class="messages">
{# <li>{% trans "Paid was registered, see you soon!" %}</li> #}
<li>OtrzymaliÅmy TwojÄ
wpÅatÄ za ZOSIÄ. Jeżeli chcesz dokonaÄ zmian, skontaktuj siÄ z organizatorami.</li>
</ul>
{% else %}
{% if payment and not user_paid %}
<h2>Dane do przelewu</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<pre>12 1140 2017 0000 4402 0724 4975
[ZOSIA11] {{user.first_name}} {{user.last_name}}
MaÅgorzata Joanna Jurkiewicz
ul. Mewia 38
51-418 WrocÅaw
{{ payment }} zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% else %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
{% endif %}
{# a teraz to samo, tylko dla wpÅat na busy #}
{# a w tym roku laczymy wplaty za obie rzeczy w jedna - Karol #}
{% comment %}
{% if user_paid_for_bus %}
<ul class="messages">
<li>ZarejestrowaliÅmy również wpÅatÄ za transport. Do zobaczenia na ZOSI!</li>
</ul>
{% else %}
{% if user_wants_bus and not user_paid_for_bus %}
<h2>Dane do przelewu za transport</h2>
<table>
<tr><td>
<pre>rachunek odbiorcy
tytuÅ przelewu
imiÄ, nazwisko odbiorcy
adres
miejscowoÅÄ
kwota
</pre>
</td><td>
<!-- FIXME -->
<pre>42 1140 2004 0000 3902 5907 3265
[ZOSIA10] Autokar - {{user.first_name}} {{user.last_name}}
Aleksandra Czernecka
ul. JagieÅÅy 41c/10
41-106 Siemianowice ÅlÄ
skie
40 zÅ
</pre>
</table>
<p>
Potwierdzenie przyjÄcia wpÅaty zostanie wysÅane na Twój adres e-mail.
</p>
{% endif %}
{% endif %}
{% endcomment %}
{# brr, to trzeba bÄdzie naprawiÄ... ale po zosi; nie lubiÄ dostawaÄ wymagaÅ w dniu #}
{# w którym trzeba je zaimplementowaÄ :/ #}
<h2>{% trans "Preferences" %}</h2>
<form action="." method="post" id="register_form">
<fieldset id="register_personal">
<legend>{% trans "authentication" %}</legend>
<ol>
<li>
<label>e-mail</label>
{{ user.email }}
</li>
<li>
<label>{% trans "password" %}</label>
<a href="/password_change/">{% trans "change" %}</a>
</li>
</ol>
</fieldset>
<fieldset id="register_personal">
<legend>{% trans "personal" %}</legend>
<ol>
<li>
<label>{% trans "name" %}, {% trans "surname" %}</label>
{{ user.first_name }} {{ user.last_name }}
</li>
<li>
{# bw careful with errors here - if there are more than 1 orgs#}
{% if form.organization_1.errors %}
<ul class="errorlist">
{% for error in form.organization_1.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_organization_1">
{% trans "organization" %}
</label>
{{ form.organization_1 }}
</li>
<li>
<label>{% trans "room openning hour" %}</label>
{{ user_openning_hour }}
</li>
<li>
<label>{% trans "bus hour" %}</label> {{ form.bus_hour}}
</li>
</ol>
</fieldset>
<fieldset id="register_nights">
<legend>{% trans "nights" %}</legend>
<ol>
{% if form.day_3.errors %}
<ul class="errorlist">
{% for error in form.day_3.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<li>
{{ form.day_1 }} <label for="id_day_1">{% trans "night12" %}</label>
</li>
<li>
{{ form.day_2 }} <label for="id_day_2">{% trans "night23" %}</label>
</li>
<li>
{{ form.day_3 }} <label for="id_day_3">{% trans "night34" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_dinners">
<legend>{% trans "dinners" %}</legend>
<ol>
{% if form.dinner_3.errors %}
<ul class="errorlist">
{% for error in form.dinner_3.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.dinner_1}} <label for="id_dinner_1">{% trans "dinner1" %}</label>
</li>
<li>
{{ form.dinner_2}} <label for="id_dinner_2">{% trans "dinner2" %}</label>
</li>
<li>
{{ form.dinner_3}} <label for="id_dinner_3">{% trans "dinner3" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_breakfasts">
<legend>{% trans "breakfasts" %}</legend>
<ol>
{% if form.breakfast_4.errors %}
<ul class="errorlist">
{% for error in form.breakfast_4.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<li>
{{ form.breakfast_2 }} <label for="id_breakfast_2">{% trans "breakfast2" %}</label>
</li>
<li>
{{ form.breakfast_3 }} <label for="id_breakfast_3">{% trans "breakfast3" %}</label>
</li>
<li>
{{ form.breakfast_4 }} <label for="id_breakfast_4">{% trans "breakfast4" %}</label>
</li>
</ol>
</fieldset>
<fieldset id="register_other">
<legend>{% trans "others" %}</legend>
<ol>
<li>
{{ form.vegetarian }} <label for="id_vegetarian">{% trans "veggies" %}</label>
</li>
<li>
{{ form.bus }} <label for="id_bus">{% trans "bussies" %}</label>
</li>
<li class="nasty_choices_li">
<label for="id_shirt_size">{% trans "shirties" %}</label> {{ form.shirt_size}}
</li>
<li class="nasty_choices_li">
<label for="id_shirt_type">{% trans "shirt_type" %}</label> {{ form.shirt_type}}
</li>
</ol>
</fieldset>
{% if user_paid %} {# FIXME better way to disable this one is required #}
<script type="text/javascript">
<!--
var ids = ['day_1', 'day_2', 'day_3',
'breakfast_2', 'breakfast_3', 'breakfast_4',
'dinner_1', 'dinner_2', 'dinner_3', 'shirt_type', 'shirt_size',
- 'vegetarian', 'bus' ]
+ 'vegetarian', 'bus', 'bus_hour' ]
for ( i in ids ) document.getElementById('id_'+ids[i]).disabled=true;
//-->
</script>
{% endif %}
{% if not prefs.bus %}
<script type="text/javascript">
document.getElementById('id_bus_hour').disabled=true;
</script>
{% endif %}
{% if user_paid and user_paid_for_bus %}
<script type="text/javascript">
<!--
document.getElementById('id_bus').disabled=true;
document.getElementById('id_organization_1').disabled=true;
//-->
</script>
{% else %}
<fieldset><input type="submit" value="{% trans "Save" %}" /></fieldset>
{% endif %}
</form>
{% endblock content %}
{% block right_column %}
<span class="cennik">Cennik</span>
<table>
<tr><td>nocleg:</td><td>40 zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem:</td><td>55 zÅ</td></tr>
<tr><td>nocleg z obiadokolacjÄ
:</td><td>60 zÅ</td></tr>
<tr><td>nocleg ze Åniadaniem i obiadokolacjÄ
:</td><td>65 zÅ</td></tr>
<tr><td>opÅata organizacyjna:</td><td>15 zÅ</td></tr>
<tr><td>transport:</td><td>45 zÅ</td></tr>
</table>
{% endblock %}
|
dreamer/zapisy_zosia
|
1d5d46eae2521b875d182d8b81527b54d97d7d3a
|
my lecture
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 2d3afe0..06688a0 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,266 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
<div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:55</div>
<div class="cell_text1"><strong>Sesja 1</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
<div class="cell_text1"><strong>WykÅady zaproszone</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 2</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
- <div class="cell_text2"><strong>Patryk Obara</strong></div>
+ <div class="cell_text2"><strong>Patryk Obara</strong>, <i>Krótki kurs bebeszenia gita</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
<br>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text1"><strong>WykÅad zaproszony</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 6</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
</div>
<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:35</div>
<div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div><br>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
9e97ff517d021678eb58b90d73ec1be787f81327
|
Few changes
|
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index f20b2c9..f631521 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,212 +1,213 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
<h2>Warsztaty</h2>
<article class="lecture_special">
<h3>CodeRetreat@ZOSIA2011</h3>
<div id="lecture_abstract">
CodeRetreat to warsztaty majÄ
ce na celu poznanie oraz zgÅÄbienie Test-Driven Development i innych dobrych praktyk programistycznych. Skupimy siÄ gÅównie na tym, jak programowaÄ, aby powstaÅy kod byÅ jak najlepszej jakoÅci: czysty i Åatwy w późniejszym utrzymaniu. <br><br>
Warsztaty bÄdÄ
skÅadaÅy siÄ z czterech 45-minutowych sesji programowania w parach. Aby wziÄ
Ä w nich udziaÅ, należy przynieÅÄ ze sobÄ
komputer (co najmniej jeden na dwie osoby) z zainstalowanym Årodowiskiem programistycznym, umożliwiajÄ
cym pisanie i uruchamianie testów jednostkowych.<br><br>
</div><div id="lecture_time"><strong>Plan warsztatów (sobota, 5.03.2011,10:00-15:30):</strong><br>
10:00 - 10:40 Wprowadzenie: co to jest TDD i jak je stosowaÄ?<br>
10:40 - 15:00 Cztery sesje programowania w parach (45 min), rozdzielone 15-20 min przerwami<br>
15:00 - 15:30 Podsumowanie i dyskusja<br>
</div>
</article>
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
<h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
<div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
<div id="lecture_abstract">
BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
</article>
-<article class="lecture_special">
- <h3>Jak siÄ programuje w NK</h3>
- <div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
-<div id="lecture_abstract">
-Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
-W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
-Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
-</article>
<article class="lecture_special">
<h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
<div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
obliczeniowej na serwerach.</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
+<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek o 17:00</strong></div>
+</article>
+
+<article class="lecture_special">
+ <h3>Jak siÄ programuje w NK</h3>
+ <div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
+<div id="lecture_abstract">
+Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
+W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
+Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
+<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek o 17:45</strong></div>
</article>
<article class="lecture_special">
<h3>Sztuczna inteligencja w praktyce</h3>
<div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
<div id="lecture_abstract">
Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Tworzenie gier to nie zabawa</h3>
<div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
<div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
<div id="lecture_abstract">
Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:30 </strong></div>
</article>
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
|
dreamer/zapisy_zosia
|
6c6b58548492e457ccf6adfd2266d92abdfdd71f
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 288fc44..2d3afe0 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,247 +1,266 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">Familiada</div>
</div><br>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:00-21:25</div>
<div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">21:30-22:00</div>
<div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
+</div>
<div class="row">
<div class="cell_hour">22:30-23:55</div>
<div class="cell_text1"><strong>Sesja 1</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:00-18:30</div>
<div class="cell_text1"><strong>WykÅady zaproszone</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
- <div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></<div>
+ <div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</i></div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 2</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
+</div>
<div class="row">
<div class="cell_hour">22:30-23:40</div>
<div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
- </div><br>
+ </div>
+<br>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text1"><strong>WykÅad zaproszony</strong></div>
</div>
<div class="row">
<div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">19:00-20:15</div>
<div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">20:45-22:05</div>
<div class="cell_text1"><strong>Sesja 6</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
+</div>
+<div style="margin-bottom: 8px">
<div class="row">
<div class="cell_hour">22:30-23:35</div>
<div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
- </div><br>
+ </div>
+</div><br>
<div class="row">
<div class="cell_hour">00:00-</div>
<div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">13:00</div>
<div class="cell_text1">Wyjazd z oÅrodka</div>
</div>
<div class="row">
<div class="cell_hour">16:00</div>
<div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
3ed54863696bad4072ba95a959bcdecae8c7d3e1
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 0681189..288fc44 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,219 +1,247 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
+.cell_text3{margin-left: 30px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
- <div class="cell_text1">obiadokolacja</div>
+ <div class="cell_text1">Obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
- <div class="cell_text1">niespodzianka</div>
+ <div class="cell_text1">Familiada</div>
</div><br>
<div class="row">
- <div class="cell">21:00-22:00</div>
+ <div class="cell_hour">21:00-21:25</div>
+ <div class="cell_text1">Oficjalne rozpoczÄcie</div>
</div>
<div class="row">
- <div class="cell_part_hour">21:00-21:25</div>
- <div class="cell_text2">Oficjalne rozpoczÄcie</div>
+ <div class="cell_hour">21:30-22:00</div>
+ <div class="cell_text1"><strong>WykÅad inauguracyjny</strong></div>
</div>
<div class="row">
- <div class="cell_part_hour">21:30-22:00</div>
- <div class="cell_text2"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
+ <div class="cell_text3"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
<div class="row">
- <div class="cell">22:30-23:55</div>
+ <div class="cell_hour">22:30-23:55</div>
+ <div class="cell_text1"><strong>Sesja 1</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
+ <div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
- <div class="cell_text1">obiadokolacja</div>
- </div>
+ <div class="cell_text1">Obiadokolacja</div>
+ </div><br>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
- <div class="cell_text1">wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod A)</div>
+ <div class="cell_text1">Wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod budynkiem A)</div>
</div><br>
<div class="row">
<div class="cell_hour">17:00-18:30</div>
+ <div class="cell_text1"><strong>WykÅady zaproszone</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></<div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
+ <div class="cell_text1"><strong>Sesja 2</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
+ <div class="cell_text1"><strong>Sesja 3</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:40</div>
+ <div class="cell_text1"><strong>Sesja 4</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
+ </div><br>
+ <div class="row">
+ <div class="cell_hour">00:00-</div>
+ <div class="cell_text1">Zabawa przy gitarze</div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
+ <div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
- <div class="cell_text1">obiadokolacja</div>
+ <div class="cell_text1">Obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
- <div class="cell_text2"> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</div>
+ <div class="cell_text2"> Cztery sesje programowania w parach po 45 min</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div class="row">
<div class="cell_hour">17:30-18:30</div>
- <div class="cell_text2"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
+ <div class="cell_text1"><strong>WykÅad zaproszony</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_text3"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
+ <div class="cell_text1"><strong>Sesja 5</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
+ <div class="cell_text1"><strong>Sesja 6</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
+ <div class="cell_text1"><strong>Sesja 7</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
+ </div><br>
+ <div class="row">
+ <div class="cell_hour">00:00-</div>
+ <div class="cell_text1">Karaoke</div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
- <div class="cell_hour_1">8:30-10:30</div>
- <div class="cell_text1">Åniadanie</div>
+ <div class="cell_hour">8:30-10:30</div>
+ <div class="cell_text1">Åniadanie</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">13:00</div>
+ <div class="cell_text1">Wyjazd z oÅrodka</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">16:00</div>
+ <div class="cell_text1">Powrót do WrocÅawia</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
0b62acb04585931fdab9d2827579f7cdeb290d77
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index a8c6b01..0681189 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,219 +1,219 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">niespodzianka</div>
</div><br>
<div class="row">
<div class="cell">21:00-22:00</div>
</div>
<div class="row">
<div class="cell_part_hour">21:00-21:25</div>
<div class="cell_text2">Oficjalne rozpoczÄcie</div>
</div>
<div class="row">
<div class="cell_part_hour">21:30-22:00</div>
<div class="cell_text2"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
<div class="row">
<div class="cell">22:30-23:55</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod A)</div>
</div><br>
<div class="row">
<div class="cell_hour">17:00-18:30</div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></<div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:40</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text2"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:35-22:05</div>
- <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
+ <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i>Flight Simulation</i></div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
dff4432730ef5b030f72d0e55ac939d88ee287ce
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 1e2511b..a8c6b01 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,215 +1,219 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
div.program {background: #fff; display: block;}
.cell_text1{margin-left: 10px; display:inline; }
.cell_text2{margin-left: 10px; display:inline; }
div.cell_part_hour {margin-left: 30px; display: inline;}
div.cell_hour {display: inline; margin-top:10px;}
div.cell_hour_1 {display: inline; margin-left:6px;}
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<br>
<h3>Czwartek</h3>
<div class="program">
<div class="row">
<div class="cell_hour">19:00-21:30</div>
<div class="cell_text1">obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">20:15-21:00</div>
<div class="cell_text1">niespodzianka</div>
</div><br>
<div class="row">
<div class="cell">21:00-22:00</div>
</div>
<div class="row">
<div class="cell_part_hour">21:00-21:25</div>
<div class="cell_text2">Oficjalne rozpoczÄcie</div>
</div>
<div class="row">
<div class="cell_part_hour">21:30-22:00</div>
<div class="cell_text2"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
</div>
<div class="row">
<div class="cell">22:30-23:55</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:45</div>
<div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:45-23:15</div>
<div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
</div>
<div class="row">
<div class="cell_part_hour">23:15-23:55</div>
<div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
</div>
</div>
<br><br>
<h3>PiÄ
tek</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">obiadokolacja</div>
</div>
<div class="row">
<div class="cell_hour">10:00-16:00</div>
<div class="cell_text1">wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod A)</div>
</div><br>
<div class="row">
<div class="cell_hour">17:00-18:30</div>
</div>
<div class="row">
<div class="cell_part_hour">17:00-17:45</div>
<div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></<div>
</div>
<div class="row">
<div class="cell_part_hour">17:45-18:30</div>
<div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
</div>
<div class="row">
<div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Patryk Obara</strong></div>
</div>
<div class="row">
<div class="cell_part_hour">21:15-21:45</div>
<div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
</div>
<div class="row">
<div class="cell_part_hour">21:45-22:05</div>
<div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
</div>
<div class="row">
<div class="cell_hour">22:30-23:40</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:55</div>
<div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:55-23:40</div>
<div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
</div>
</div>
<br><br>
<h3>Sobota</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1"> 8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
<div class="row">
<div class="cell_hour">16:30-19:00</div>
<div class="cell_text1">obiadokolacja</div>
</div><br>
<div class="row">
<div class="cell_hour">10:00-15:30</div>
<div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
</div>
<div class="row">
<div class="cell_part_hour">10:00-10:40</div>
<div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
</div>
<div class="row">
<div class="cell_part_hour">10:40-15:00</div>
<div class="cell_text2"> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</div>
</div>
<div class="row">
<div class="cell_part_hour">15:00-15:30</div>
<div class="cell_text2"> Podsumowanie i dyskusja</div>
</div><br>
<div class="row">
<div class="cell_hour">17:30-18:30</div>
<div class="cell_text2"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
</div>
<div class="row">
<div class="cell_hour">19:00-20:15</div>
</div>
<div class="row">
<div class="cell_part_hour">19:00-19:30</div>
<div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
</div>
<div class="row">
<div class="cell_part_hour">19:30-20:15</div>
<div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
</div>
<div class="row">
<div class="cell_hour">20:45-22:05</div>
</div>
<div class="row">
- <div class="cell_part_hour">20:45-21:45</div>
+ <div class="cell_part_hour">20:45-21:15</div>
<div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
</div>
<div class="row">
- <div class="cell_part_hour">21:45-22:05</div>
+ <div class="cell_part_hour">21:15-21:35</div>
<div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
</div>
+ <div class="row">
+ <div class="cell_part_hour">21:35-22:05</div>
+ <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
+ </div>
<div class="row">
<div class="cell_hour">22:30-23:35</div>
</div>
<div class="row">
<div class="cell_part_hour">22:30-22:50</div>
<div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
</div>
<div class="row">
<div class="cell_part_hour">22:50-23:35</div>
<div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
</div>
</div>
<br><br>
<h3>Niedziela</h3>
<div class="program">
<div class="row">
<div class="cell_hour_1">8:30-10:30</div>
<div class="cell_text1">Åniadanie</div>
</div>
</div>
{% endblock content %}
|
dreamer/zapisy_zosia
|
1b37a5e35a3ec8df4ab10318b9109ccf90babe7e
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index d5e421f..1e2511b 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,232 +1,215 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
-table.program {table-layout: fixed; width: 100%; }
+div.program {background: #fff; display: block;}
+.cell_text1{margin-left: 10px; display:inline; }
+.cell_text2{margin-left: 10px; display:inline; }
+div.cell_part_hour {margin-left: 30px; display: inline;}
+div.cell_hour {display: inline; margin-top:10px;}
+div.cell_hour_1 {display: inline; margin-left:6px;}
+
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
-
+<br>
<h3>Czwartek</h3>
-<table>
- <tr>
- <td>19:00-21:30</td>
- <td>obiadokolacja</td>
- </tr>
- <tr><td></td></tr> <tr><td></td></tr>
- <tr>
- <td>20:15-21:00</td>
- <td>Niespodzianka</td>
- </tr>
- <tr>
- <td>21:00-22:00</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>21:00-21:25</td>
- <td>Oficjalne rozpoczÄcie</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>21:30-22:00</td>
- <td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
- </tr>
- <tr>
- <td>22:30-23:55</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:30-22:45</td>
- <td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:45-23:15</td>
- <td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>23:15-23:55</td>
- <td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
- </tr>
-</table>
-
+<div class="program">
+ <div class="row">
+ <div class="cell_hour">19:00-21:30</div>
+ <div class="cell_text1">obiadokolacja</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">20:15-21:00</div>
+ <div class="cell_text1">niespodzianka</div>
+ </div><br>
+ <div class="row">
+ <div class="cell">21:00-22:00</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:00-21:25</div>
+ <div class="cell_text2">Oficjalne rozpoczÄcie</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:30-22:00</div>
+ <div class="cell_text2"><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></div>
+ </div>
+ <div class="row">
+ <div class="cell">22:30-23:55</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:30-22:45</div>
+ <div class="cell_text2"><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:45-23:15</div>
+ <div class="cell_text2"><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">23:15-23:55</div>
+ <div class="cell_text2"><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></div>
+ </div>
+</div>
+<br><br>
<h3>PiÄ
tek</h3>
-<table>
- <tr>
- <td>8:30-10:30</td>
- <td>Åniadanie</td>
- </tr>
- <tr>
- <td>16:30-19:00</td>
- <td>obiadokolacja</td>
- </tr>
- <tr><td></td></tr> <tr><td></td></tr>
- <tr>
- <td>17:00-18:30</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>17:00-17:45</td>
- <td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>17:45-18:30</td>
- <td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
- </tr>
- <tr>
- <td>19:00-20:15</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>19:00-19:30</td>
- <td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>19:30-20:15</td>
- <td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
- </tr>
- <tr>
- <td>20:45-22:05</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>20:45-21:15</td>
- <td><strong>Patryk Obara</strong></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>21:15-21:45</td>
- <td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>21:45-22:05</td>
- <td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
- </tr>
- <tr>
- <td>22:30-23:40</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:30-22:55</td>
- <td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:55-23:40</td>
- <td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
- </tr>
-</table>
-
+<div class="program">
+ <div class="row">
+ <div class="cell_hour_1">8:30-10:30</div>
+ <div class="cell_text1">Åniadanie</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">16:30-19:00</div>
+ <div class="cell_text1">obiadokolacja</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">10:00-16:00</div>
+ <div class="cell_text1">wycieczka na <a href="http://www.karkonosze.info.pl/mapy/szlaki_szklarska.htm">Åabski Szczyt</a> (zbiórka pod A)</div>
+ </div><br>
+ <div class="row">
+ <div class="cell_hour">17:00-18:30</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">17:00-17:45</div>
+ <div class="cell_text2"><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></<div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">17:45-18:30</div>
+ <div class="cell_text2"><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">19:00-20:15</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:00-19:30</div>
+ <div class="cell_text2"><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:30-20:15</div>
+ <div class="cell_text1"><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">20:45-22:05</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">20:45-21:15</div>
+ <div class="cell_text2"><strong>Patryk Obara</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:15-21:45</div>
+ <div class="cell_text2"><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:45-22:05</div>
+ <div class="cell_text2"><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">22:30-23:40</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:30-22:55</div>
+ <div class="cell_text2"><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:55-23:40</div>
+ <div class="cell_text2"><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></div>
+ </div>
+</div>
+<br><br>
<h3>Sobota</h3>
-<table>
- <tr>
- <td>8:30-10:30</td>
- <td>Åniadanie</td>
- </tr>
- <tr>
- <td>16:30-19:00</td>
- <td>obiadokolacja</td>
- </tr>
- <tr><td></td></tr> <tr><td></td></tr>
- <tr>
- <td>10:00-15:30</td>
- <td></td>
- <td>Warsztaty CodeRetreat@ZOSIA2011</td>
- </tr>
- <td class="blank"></td>
- <td>10:00-10:40</td><td> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>10:40-15:00</td><td> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>15:00-15:30</td><td> Podsumowanie i dyskusja</td>
- </tr>
- <tr><td></td></tr> <tr><td></td></tr>
- <tr>
- <td>17:30-18:30</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>17:30-18:30</td>
- <td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
- </tr>
- <tr>
- <td>19:00-20:15</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>19:00-19:30</td>
- <td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>19:30-20:15</td>
- <td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
- </tr>
- <tr>
- <td>20:45-22:05</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>20:45-21:45</td>
- <td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>21:45-22:05</td>
- <td><strong>Jerzy Marcinkowski</strong></td>
- </tr>
- <tr>
- <td>22:30-23:35</td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:30-22:50</td>
- <td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
- </tr>
- <tr>
- <td class="blank"></td>
- <td>22:50-23:35</td>
- <td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
- </tr>
-</table>
-
+<div class="program">
+ <div class="row">
+ <div class="cell_hour_1"> 8:30-10:30</div>
+ <div class="cell_text1">Åniadanie</div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">16:30-19:00</div>
+ <div class="cell_text1">obiadokolacja</div>
+ </div><br>
+ <div class="row">
+ <div class="cell_hour">10:00-15:30</div>
+ <div class="cell_text1">Warsztaty CodeRetreat@ZOSIA2011</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">10:00-10:40</div>
+ <div class="cell_text2"> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">10:40-15:00</div>
+ <div class="cell_text2"> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">15:00-15:30</div>
+ <div class="cell_text2"> Podsumowanie i dyskusja</div>
+ </div><br>
+ <div class="row">
+ <div class="cell_hour">17:30-18:30</div>
+ <div class="cell_text2"><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">19:00-20:15</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:00-19:30</div>
+ <div class="cell_text2"><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">19:30-20:15</div>
+ <div class="cell_text2"><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">20:45-22:05</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">20:45-21:45</div>
+ <div class="cell_text2"><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">21:45-22:05</div>
+ <div class="cell_text2"><strong>Jerzy Marcinkowski</strong></div>
+ </div>
+ <div class="row">
+ <div class="cell_hour">22:30-23:35</div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:30-22:50</div>
+ <div class="cell_text2"><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></div>
+ </div>
+ <div class="row">
+ <div class="cell_part_hour">22:50-23:35</div>
+ <div class="cell_text2"><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></div>
+ </div>
+</div>
+<br><br>
<h3>Niedziela</h3>
-<table>
- <tr>
- <td>8:30-10:30</td>
- <td>Åniadanie</td>
- </tr>
-</table>
+<div class="program">
+ <div class="row">
+ <div class="cell_hour_1">8:30-10:30</div>
+ <div class="cell_text1">Åniadanie</div>
+ </div>
+</div>
+
{% endblock content %}
|
dreamer/zapisy_zosia
|
31eec9e985607eac89080a6a69f52f019d0572e1
|
Few changes
|
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index bea929d..f20b2c9 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,212 +1,212 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
<h2>Warsztaty</h2>
<article class="lecture_special">
<h3>CodeRetreat@ZOSIA2011</h3>
<div id="lecture_abstract">
CodeRetreat to warsztaty majÄ
ce na celu poznanie oraz zgÅÄbienie Test-Driven Development i innych dobrych praktyk programistycznych. Skupimy siÄ gÅównie na tym, jak programowaÄ, aby powstaÅy kod byÅ jak najlepszej jakoÅci: czysty i Åatwy w późniejszym utrzymaniu. <br><br>
Warsztaty bÄdÄ
skÅadaÅy siÄ z czterech 45-minutowych sesji programowania w parach. Aby wziÄ
Ä w nich udziaÅ, należy przynieÅÄ ze sobÄ
komputer (co najmniej jeden na dwie osoby) z zainstalowanym Årodowiskiem programistycznym, umożliwiajÄ
cym pisanie i uruchamianie testów jednostkowych.<br><br>
</div><div id="lecture_time"><strong>Plan warsztatów (sobota, 5.03.2011,10:00-15:30):</strong><br>
10:00 - 10:40 Wprowadzenie: co to jest TDD i jak je stosowaÄ?<br>
10:40 - 15:00 Cztery sesje programowania w parach (45 min), rozdzielone 15-20 min przerwami<br>
15:00 - 15:30 Podsumowanie i dyskusja<br>
</div>
</article>
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
<h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
<div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
<div id="lecture_abstract">
BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Jak siÄ programuje w NK</h3>
<div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
<div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
obliczeniowej na serwerach.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>Sztuczna inteligencja w praktyce</h3>
<div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
<div id="lecture_abstract">
Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Tworzenie gier to nie zabawa</h3>
<div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
<div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
<div id="lecture_abstract">
Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
-<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:20 </strong></div>
+<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:30 </strong></div>
</article>
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
|
dreamer/zapisy_zosia
|
eba05ab10afe7661ae4b4628186bb496850b3e0b
|
Ending records
|
diff --git a/common/helpers.py b/common/helpers.py
index 233455b..8cccf33 100644
--- a/common/helpers.py
+++ b/common/helpers.py
@@ -1,46 +1,46 @@
# -*- coding: UTF-8 -*-
from datetime import datetime, timedelta
from registration.models import UserPreferences
# TODO: this module should be replaced by calls to database
def is_registration_enabled():
# this is the only place that should be changed
start_date = datetime(2011,1,30, 1,05)
final_date = datetime(2011,2,25, 1,05)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_registration_disabled():
return not is_registration_enabled()
def is_lecture_suggesting_enabled():
# this is the only place that should be changed
start_date = datetime(2011,1,30, 1,05)
final_date = datetime(2011,2,25, 1,05)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def is_lecture_suggesting_disabled():
return not is_lecture_suggesting_enabled()
def is_rooming_enabled():
- start_date = datetime(2011,2,26, 15,00)
- final_date = datetime(2011,3,1, 15,00)
+ start_date = datetime(2011,2,26, 20,00)
+ final_date = datetime(2011,2,28, 23,00)
assert start_date < final_date
return datetime.now() > start_date and datetime.now() < final_date
def has_user_opened_records(user):
prefs = UserPreferences.objects.get(user=user)
user_openning_hour = datetime(2011,2,26, 20,00) - timedelta(minutes=prefs.minutes_early)
return user_openning_hour <= datetime.now()
def is_rooming_disabled():
return not is_rooming_enabled()
|
dreamer/zapisy_zosia
|
8028a66bec0d3cd88c3ca6891c9645cc442dfc1e
|
Few changes
|
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index d3a183d..bea929d 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,213 +1,212 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
<h2>Warsztaty</h2>
<article class="lecture_special">
<h3>CodeRetreat@ZOSIA2011</h3>
- <div id="lecture_author"><strong>MichaÅ PochwaÅa</strong></div>
<div id="lecture_abstract">
CodeRetreat to warsztaty majÄ
ce na celu poznanie oraz zgÅÄbienie Test-Driven Development i innych dobrych praktyk programistycznych. Skupimy siÄ gÅównie na tym, jak programowaÄ, aby powstaÅy kod byÅ jak najlepszej jakoÅci: czysty i Åatwy w późniejszym utrzymaniu. <br><br>
Warsztaty bÄdÄ
skÅadaÅy siÄ z czterech 45-minutowych sesji programowania w parach. Aby wziÄ
Ä w nich udziaÅ, należy przynieÅÄ ze sobÄ
komputer (co najmniej jeden na dwie osoby) z zainstalowanym Årodowiskiem programistycznym, umożliwiajÄ
cym pisanie i uruchamianie testów jednostkowych.<br><br>
</div><div id="lecture_time"><strong>Plan warsztatów (sobota, 5.03.2011,10:00-15:30):</strong><br>
10:00 - 10:40 Wprowadzenie: co to jest TDD i jak je stosowaÄ?<br>
10:40 - 15:00 Cztery sesje programowania w parach (45 min), rozdzielone 15-20 min przerwami<br>
15:00 - 15:30 Podsumowanie i dyskusja<br>
</div>
</article>
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
<h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
<div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
<div id="lecture_abstract">
BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Jak siÄ programuje w NK</h3>
<div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
<div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
obliczeniowej na serwerach.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>Sztuczna inteligencja w praktyce</h3>
<div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
<div id="lecture_abstract">
Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Tworzenie gier to nie zabawa</h3>
<div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
<div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
<div id="lecture_abstract">
Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:20 </strong></div>
</article>
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index bfb2b0a..d5e421f 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,232 +1,232 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
table.program {table-layout: fixed; width: 100%; }
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<h3>Czwartek</h3>
<table>
<tr>
<td>19:00-21:30</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>20:15-21:00</td>
<td>Niespodzianka</td>
</tr>
<tr>
<td>21:00-22:00</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:00-21:25</td>
<td>Oficjalne rozpoczÄcie</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:30-22:00</td>
<td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
</tr>
<tr>
<td>22:30-23:55</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:45</td>
<td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:45-23:15</td>
<td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>23:15-23:55</td>
<td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
</tr>
</table>
<h3>PiÄ
tek</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:00-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:00-17:45</td>
<td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>17:45-18:30</td>
<td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:15</td>
<td><strong>Patryk Obara</strong></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:15-21:45</td>
<td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
</tr>
<tr>
<td>22:30-23:40</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:55</td>
<td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:55-23:40</td>
<td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
</tr>
</table>
<h3>Sobota</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>10:00-15:30</td>
<td></td>
- <td><strong>MichaÅ PochwaÅa</strong>, Warsztaty CodeRetreat@ZOSIA2011</td>
+ <td>Warsztaty CodeRetreat@ZOSIA2011</td>
</tr>
<td class="blank"></td>
<td>10:00-10:40</td><td> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</td>
</tr>
<tr>
<td class="blank"></td>
<td>10:40-15:00</td><td> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</td>
</tr>
<tr>
<td class="blank"></td>
<td>15:00-15:30</td><td> Podsumowanie i dyskusja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:30-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:30-18:30</td>
<td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:45</td>
<td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Jerzy Marcinkowski</strong></td>
</tr>
<tr>
<td>22:30-23:35</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:50</td>
<td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:50-23:35</td>
<td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
</tr>
</table>
<h3>Niedziela</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
</table>
{% endblock content %}
|
dreamer/zapisy_zosia
|
4520bb227d35902a0f5c657963fa3c1b55a34d2b
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 390bc13..bfb2b0a 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,232 +1,232 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
table.program {table-layout: fixed; width: 100%; }
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<h3>Czwartek</h3>
<table>
<tr>
<td>19:00-21:30</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>20:15-21:00</td>
<td>Niespodzianka</td>
</tr>
<tr>
<td>21:00-22:00</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:00-21:25</td>
<td>Oficjalne rozpoczÄcie</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:30-22:00</td>
<td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
</tr>
<tr>
- <td>22:30-23:45</td>
+ <td>22:30-23:55</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:45</td>
<td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:45-23:15</td>
<td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
</tr>
<tr>
<td class="blank"></td>
- <td>23:15-23:45</td>
+ <td>23:15-23:55</td>
<td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
</tr>
</table>
<h3>PiÄ
tek</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:00-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:00-17:45</td>
<td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>17:45-18:30</td>
<td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:15</td>
<td><strong>Patryk Obara</strong></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:15-21:45</td>
<td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
</tr>
<tr>
<td>22:30-23:40</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:55</td>
<td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:55-23:40</td>
<td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
</tr>
</table>
<h3>Sobota</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>10:00-15:30</td>
<td></td>
<td><strong>MichaÅ PochwaÅa</strong>, Warsztaty CodeRetreat@ZOSIA2011</td>
</tr>
<td class="blank"></td>
<td>10:00-10:40</td><td> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</td>
</tr>
<tr>
<td class="blank"></td>
<td>10:40-15:00</td><td> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</td>
</tr>
<tr>
<td class="blank"></td>
<td>15:00-15:30</td><td> Podsumowanie i dyskusja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:30-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:30-18:30</td>
<td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:45</td>
<td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Jerzy Marcinkowski</strong></td>
</tr>
<tr>
<td>22:30-23:35</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:50</td>
<td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:50-23:35</td>
<td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
</tr>
</table>
<h3>Niedziela</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
</table>
{% endblock content %}
|
dreamer/zapisy_zosia
|
503df88f48d22dd831949d53ac5e0a99539a1007
|
Few changes
|
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index faadc6f..d3a183d 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,192 +1,213 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
+<h2>Warsztaty</h2>
+
+<article class="lecture_special">
+ <h3>CodeRetreat@ZOSIA2011</h3>
+ <div id="lecture_author"><strong>MichaÅ PochwaÅa</strong></div>
+<div id="lecture_abstract">
+CodeRetreat to warsztaty majÄ
ce na celu poznanie oraz zgÅÄbienie Test-Driven Development i innych dobrych praktyk programistycznych. Skupimy siÄ gÅównie na tym, jak programowaÄ, aby powstaÅy kod byÅ jak najlepszej jakoÅci: czysty i Åatwy w późniejszym utrzymaniu. <br><br>
+
+Warsztaty bÄdÄ
skÅadaÅy siÄ z czterech 45-minutowych sesji programowania w parach. Aby wziÄ
Ä w nich udziaÅ, należy przynieÅÄ ze sobÄ
komputer (co najmniej jeden na dwie osoby) z zainstalowanym Årodowiskiem programistycznym, umożliwiajÄ
cym pisanie i uruchamianie testów jednostkowych.<br><br>
+
+</div><div id="lecture_time"><strong>Plan warsztatów (sobota, 5.03.2011,10:00-15:30):</strong><br>
+
+10:00 - 10:40 Wprowadzenie: co to jest TDD i jak je stosowaÄ?<br>
+
+10:40 - 15:00 Cztery sesje programowania w parach (45 min), rozdzielone 15-20 min przerwami<br>
+
+15:00 - 15:30 Podsumowanie i dyskusja<br>
+
+</div>
+</article>
+
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
<h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
<div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
<div id="lecture_abstract">
BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Jak siÄ programuje w NK</h3>
<div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
<div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
<div id="lecture_abstract">
W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
obliczeniowej na serwerach.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
</article>
<article class="lecture_special">
<h3>Sztuczna inteligencja w praktyce</h3>
<div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
<div id="lecture_abstract">
Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Tworzenie gier to nie zabawa</h3>
<div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
<div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
<div id="lecture_abstract">
Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:20 </strong></div>
</article>
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index ae2c6fc..390bc13 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,214 +1,232 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
+table.program {table-layout: fixed; width: 100%; }
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<h3>Czwartek</h3>
<table>
<tr>
<td>19:00-21:30</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>20:15-21:00</td>
<td>Niespodzianka</td>
</tr>
<tr>
<td>21:00-22:00</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:00-21:25</td>
<td>Oficjalne rozpoczÄcie</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:30-22:00</td>
<td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
</tr>
<tr>
<td>22:30-23:45</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:45</td>
<td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:45-23:15</td>
<td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>23:15-23:45</td>
<td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
</tr>
</table>
<h3>PiÄ
tek</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:00-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:00-17:45</td>
<td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>17:45-18:30</td>
<td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:15</td>
<td><strong>Patryk Obara</strong></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:15-21:45</td>
<td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
</tr>
<tr>
<td>22:30-23:40</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:55</td>
<td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:55-23:40</td>
<td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
</tr>
</table>
<h3>Sobota</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
+ <tr>
+ <td>10:00-15:30</td>
+ <td></td>
+ <td><strong>MichaÅ PochwaÅa</strong>, Warsztaty CodeRetreat@ZOSIA2011</td>
+ </tr>
+ <td class="blank"></td>
+ <td>10:00-10:40</td><td> Wprowadzenie: co to jest TDD i jak je stosowaÄ?</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>10:40-15:00</td><td> Cztery sesje programowania w parach (45 min), rozdzielone 15â20 min przerwami</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>15:00-15:30</td><td> Podsumowanie i dyskusja</td>
+ </tr>
+ <tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:30-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:30-18:30</td>
<td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:45</td>
<td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Jerzy Marcinkowski</strong></td>
</tr>
<tr>
<td>22:30-23:35</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:50</td>
<td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:50-23:35</td>
<td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
</tr>
</table>
<h3>Niedziela</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
</table>
{% endblock content %}
|
dreamer/zapisy_zosia
|
09b0f78dc74bb556bf3a87afe938b6fca096fbbd
|
Few changes
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index e43e5e9..ae2c6fc 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,211 +1,214 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
-table tr td.blank { width: 10px; }
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<h3>Czwartek</h3>
<table>
<tr>
<td>19:00-21:30</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
+ <tr>
+ <td>20:15-21:00</td>
+ <td>Niespodzianka</td>
+ </tr>
<tr>
<td>21:00-22:00</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:00-21:25</td>
<td>Oficjalne rozpoczÄcie</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:30-22:00</td>
<td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
</tr>
<tr>
<td>22:30-23:45</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:45</td>
<td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:45-23:15</td>
<td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>23:15-23:45</td>
<td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
</tr>
</table>
<h3>PiÄ
tek</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:00-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:00-17:45</td>
<td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>17:45-18:30</td>
<td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:15</td>
<td><strong>Patryk Obara</strong></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:15-21:45</td>
<td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
</tr>
<tr>
<td>22:30-23:40</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:55</td>
<td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
</tr>
<tr>
<td class="blank"></td>
- <td>22:55-22:40</td>
+ <td>22:55-23:40</td>
<td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
</tr>
</table>
<h3>Sobota</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:30-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:30-18:30</td>
<td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:45</td>
<td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Jerzy Marcinkowski</strong></td>
</tr>
<tr>
<td>22:30-23:35</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:50</td>
<td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
</tr>
<tr>
<td class="blank"></td>
- <td>22:50-22:35</td>
+ <td>22:50-23:35</td>
<td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
</tr>
</table>
<h3>Niedziela</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
</table>
{% endblock content %}
|
dreamer/zapisy_zosia
|
e2aeb55aa618d582f66ce7e610c99e05954c1222
|
Added links in /program/ for sign in users
|
diff --git a/lectures/views.py b/lectures/views.py
index 607b306..a7ed30d 100644
--- a/lectures/views.py
+++ b/lectures/views.py
@@ -1,38 +1,39 @@
# -*- coding: UTF-8 -*-
from django.utils.translation import ugettext as _
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from common.forms import LoginForm
from common.helpers import *
from models import *
from forms import *
def index(request):
title = "Lectures"
user = request.user
lectures = Lecture.objects.filter(accepted=True)
if is_lecture_suggesting_enabled():
login_form = LoginForm()
if user.is_authenticated() and user.is_active:
if request.method == 'POST':
lecture_proposition_form = NewLectureForm(request.POST)
if lecture_proposition_form.is_valid():
form = lecture_proposition_form
Lecture.objects.create_lecture(form, request.user)
messages = [ _("thankyou") ]
lecture_proposition_form = NewLectureForm()
else:
lecture_proposition_form = NewLectureForm()
return render_to_response('lectures.html', locals())
def program(request):
title = "Program"
+ user = request.user
return render_to_response('program.html', locals())
diff --git a/templates/index.html b/templates/index.html
index 70db0b0..88cfd8e 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,131 +1,131 @@
<!doctype html>
{% load i18n %}
{% load cache %}
{% load blurb_edit %}
{% cache 60 header_index_template %}
<html lang="pl">
<head>
<title>ZOSIA 2011</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="pl" />
<link href="/static_media/css/layout_2col_right_13.css" rel="stylesheet" type="text/css"/>
<link href="/static_media/css/zosia.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="/static_media/css/patches/patch_2col_right_13.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="RSS"
href="/feeds/blog/"/>
<script type="text/javascript">
window.onload=function(){ AddFillerLink("col1_content","col3_content"); }
</script>
<script type="text/javascript">
{% endcache %}
{% block javascript %}{% endblock %}
</script>
<style type="text/css">
<!--
{% block css %}{% endblock %}
-->
</style>
{% block superextra %}{% endblock %}
</head>
<body onload='{% block onload%}{% endblock %}'>
<div id="wrapper">
<div id="page_margins">
<div id="page">
<div id="header">
<div id="topnav">
{% if user.is_authenticated %}
{% trans "oh hai" %}, {{ user.first_name }} {{ user.last_name}} |
{# <a href="/password_change/">{% trans "Change password" %}</a> | #}
{% if user.is_staff %}
<a href="/admin/">{% trans "Administration panel" %}</a> |
{% endif %}
<a href="/logout/">{% trans "Logout" %}</a>
{% else %}
{% if login_form %}
<form action="/login/" method="post" id="login_form">
<fieldset>
{% if login_form.email.errors %}
<ul class="errorlist">
{% for error in login_form.email.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_email">e-mail</label> {{ login_form.email }}
{% if form.password.errors %}
<ul class="errorlist">
{% for error in form.password.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_password">{% trans "password" %}</label> {{ login_form.password }}
<input type="submit" value="login" />
</fieldset>
</form>
<div class="main_page_password_reset">
<a href="/password_reset">zapomniaÅem hasÅa</a>
</div>
{% endif %} {# login_form #}
{# <a href="/register/">{% trans "Register" %}</a> #}
{% endif %}
</div>
<a href="/blog/"><img src="/static_media/images/logo_zosi_shadow.png" alt="ZOSIA" /></a>
<span>Zimowy Obóz Studentów Informatyki A • Piechowice â MichaÅowice 2011</span></div>
<!-- begin: main navigation #nav -->
<div id="nav"> <a id="navigation" name="navigation"></a>
<!-- skiplink anchor: navigation -->
<div id="nav_main">
<ul>
<li {% ifequal title "Blog" %}id="current"{% endifequal %}><a href="/blog/">{% trans "Blog" %}</a></li>
{% load time_block_helpers %}
{% if user.is_authenticated %}
<li {% ifequal title "Change preferences" %}id="current"{% endifequal %}><a href="/change_preferences/">{% trans "Change preferences" %}</a></li>
{% else %}
{% if title %}{% registration_link title %}{% endif %} {# see registration/templatetags #}
{% endif %}
<li {% ifequal title "Lectures" %}id="current"{% endifequal %}><a href="/lectures/">{% trans "Lectures" %}</a></li>
- <li><a href="/program/">{% trans "Program" %}</a></li>
+ <li {% ifequal title "Program" %}id="current"{% endifequal %}><a href="/program/">{% trans "Program" %}</a></li>
{% if user.is_authenticated %}
{% if title %}{% rooming_link user title %}{% endif %} {# see registration/templatetags #}
{% endif %}
</ul>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col1 - first float column -->
<div id="col1">
{% if messages_list %} <!-- TODO -->
<ul>
<li>The lecture "Lecture object" was added successfully.</li>
</ul>
{% endif %}
<div id="col1_content" class="clearfix"> <a id="content" name="content"></a>
<!-- skiplink anchor: Content -->
{% block content %}page content{% endblock %}
</div>
</div>
<!-- end: #col1 -->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
{% block right_column %}{% endblock %}
</div>
<div id="ie_clearing"> </div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="footer">
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/"><img alt="Creative Commons License" style="border-width:0; margin: 0.2em 0.4em 0 0; float:left;" src="http://i.creativecommons.org/l/by/2.5/pl/88x31.png" /></a>{% trans "Except where otherwise noted, content on this site is licensed under a" %} <a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/">Creative Commons Attribution 2.5 Poland</a>.<br/>
copyleft Patryk Obara, RafaÅ KuliÅski | <a href="http://github.com/dreamer/zapisy_zosia">src</a> | Layout {% trans "based on" %} <a href="http://www.yaml.de/">YAML</a>
</div>
<!-- end: #footer -->
</div>
</div>
</div><!-- wrapper -->
</body>
</html>
|
dreamer/zapisy_zosia
|
420eca2a814318de2cb17fa951c54dcad41eac3e
|
More info about lectures and program
|
diff --git a/lectures/templates/lectures.html b/lectures/templates/lectures.html
index 426d85a..faadc6f 100644
--- a/lectures/templates/lectures.html
+++ b/lectures/templates/lectures.html
@@ -1,171 +1,192 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
{% endblock css %}
{% block content %}
{% if messages %}
<ul class="messages">
{% for msg in messages %}
{% blocktrans %}<li>{{ msg }}</li>{% endblocktrans %}
{% endfor %}
</ul>
{% endif %}
{% if lecture_proposition_form.errors %}
<ul class="error_messages">
<li>{% trans "Repair errors below, please." %}</li>
</ul>
{% endif %}
<h2>{% trans "Invited talks" %}</h2>
<article class="lecture_special">
<h3>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej<span id="note">    <strong>WykÅad inauguracyjny</strong></span></h3>
<div id="lecture_author"><strong>Maciej Piróg, absolwent Instytutu Informatyki, doktorant Oxford University</strong></div>
<div id="lecture_abstract">
BÄdzie o tym, jak najnowsze trendy w paryskim fryzjerstwie pozwalajÄ
nam zaoszczÄdziÄ trochÄ czasu i pieniÄdzy na destrukcyjnych aktualizacjach mienia publicznego, a to dlatego, że robienie nawet najbrzydszych rzeczy po kryjomu jest w porzÄ
dku, dopóki nikt siÄ o tym nie dowie. No i bÄdzie coÅ, co naprawdÄ pobudza wyobraźniÄ, czyli (odwrotna) funkcja Ackermanna.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w czwartek o 21:30 </strong></div>
</article>
+<article class="lecture_special">
+ <h3>Jak siÄ programuje w NK</h3>
+ <div id="lecture_author"><strong>Marek ZióÅkowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
+<div id="lecture_abstract">
+Jak wyglÄ
da na ogólnym poziomie struktura dziaÅu IT? Z kim wspóÅpracujemy? Jak wyglÄ
da podziaÅ na zespoÅy projektowe?
+W jaki sposób umieszczamy kod na produkcji, z jakimi problemami siÄ to wiÄ
że, jakie sÄ
nasze rozwiÄ
zania?
+Jak wyglÄ
da proces rozwoju oprogramowania? Jakich narzÄdzi i Årodowisk używamy do rozwijania oprogramowania?</div>
+<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
+</article>
+<article class="lecture_special">
+ <h3>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym</h3>
+ <div id="lecture_author"><strong>PaweÅ Sadowski, firma <a href="http://nk.pl/">nk.pl</a></strong></div>
+<div id="lecture_abstract">
+W prezentacji zostanie poruszony problem zarzÄ
dzania obciÄ
żeniem oraz
+jak wybrana przez NK metodologia przekÅada siÄ na iloÅÄ sprzÄtu
+potrzebnego do obsÅugi ruchu na portalu. BÄdÄ
poruszone również inne
+aspekty bezpoÅrednio zwiÄ
zane z zagadnieniem: czas generowania strony
+dla użytkowników, przypinanie użytkowników do serwerów, zapas mocy
+obliczeniowej na serwerach.</div>
+<div id="lecture_time"><strong> Na wykÅad zapraszamy w piÄ
tek</strong></div>
+</article>
<article class="lecture_special">
<h3>Sztuczna inteligencja w praktyce</h3>
<div id="lecture_author"><strong>Cezary DoÅÄga, firma <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, Dyrektor ds. BadaÅ i Rozwoju </strong></div>
<div id="lecture_abstract">
Sztuczna Inteligencja to pojÄcie opisujÄ
ce bardzo różnorodne techniki informatyczne.
Co dokÅadnie oznacza to pojÄcie? W jakich dziedzinach życia sztuczna inteligencja ma praktyczne zastosowanie?
Jakie projekty realizuje Neurosoft? Jakie problemy napotykamy w implementacjach? Czy maszyny
kiedykolwiek zacznÄ
samodzielnie myÅleÄ â sztuczna ÅwiadomoÅÄ?</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 17:30 </strong></div>
</article>
<article class="lecture_special">
<h3>Tworzenie gier to nie zabawa</h3>
<div><strong>PaweÅ Rohleder, <a href="http://www.techland.pl/">Techland</a>, Build Process Management Lead / R&D Coordinator</strong></div>
<div id="lecture_author"><strong>Tomek UrbaÅski, <a href="http://www.techland.pl/">Techland</a>, Junior Game Programmer</strong></div>
<div id="lecture_abstract">
Gry komputerowe sÄ
jednymi z najbardziej ambitnych i zÅożonych projektów informatycznych. Jak powstajÄ
gry komputerowe Åwiatowego kalibru? Jak siÄ do tego zabraÄ? Jakie wyzwania stojÄ
przed zespoÅami uczestniczÄ
cymi w procesie produkcji? Jakimi technologiami siÄ bawimy? Te i inne zagadnienia omówimy na przykÅadzie pracy we wrocÅawskim oddziale firmy Techland.</div>
<div id="lecture_time"><strong> Na wykÅad zapraszamy w sobotÄ o 19:20 </strong></div>
</article>
<h2>{% trans "Lectures suggested" %}</h2>
{% if lectures %}
{% for lecture in lectures %}
<article class="lecture">
<h3>{{ lecture.title }}</h3>
<strong class="lecture_author">{{ lecture.author }}</strong>
{{ lecture.abstract|textile }}
</article>
{% endfor %}
{% else %}
{% trans "None yet. You can be first!" %}<p />
{% endif %}
{% if not messages %}
{% if lecture_proposition_form %}
<h2>{% trans "Suggest your lecture" %}</h2>
<form action="." method="post">
<fieldset>
<legend>{% trans "Public info" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.title.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.title.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_title">{% trans "Title" %}</label>
{{ lecture_proposition_form.title }}
</li>
<li>
{% if lecture_proposition_form.duration.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.duration.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_duration">{% trans "duraszatan" %}<span>{% trans "inminutes" %}</span></label>
{{ lecture_proposition_form.duration }}
</li>
<li>
{% if lecture_proposition_form.abstract.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.abstract.errors %}
<li>{{error|escape}}</li>
{% endfor %}
{% endif %}
<label for="id_abstract">{% trans "Abstract" %}<span>{% trans "(max chars)" %}</span></label>
{{ lecture_proposition_form.abstract }}
</li>
</ol>
</fieldset>
<fieldset>
<legend>{% trans "Additional information" %}</legend>
<ol>
<li>
{% if lecture_proposition_form.info.errors %}
<ul class="errorlist">
{% for error in lecture_proposition_form.info.errors %}
<li>{{error|escape}}</li>
{% endfor %}
</ul>
{% endif %}
<label for="id_info">{% trans "Your suggestions, requests and comments intended for organizers and a lot more, what you always wanted to say these philistinic bastards with purulent knees" %}</label>
{{ lecture_proposition_form.info }}
</li>
{# <li> #}
{# <p> #}
{# Nasz partner - portal <a href="http://sprezentuj.pl">Sprezentuj.pl</a> - przygotowaÅ dla prelegentów specjalne upominki. Sprezentuj.pl to jednak tylko trafione prezenty - wiÄc by sprostaÄ zadaniu, prosimy w imieniu sponsora o utworzenie konta w serwisie <a href="http://sprezentuj.pl">Sprezentuj.pl</a> i dodanie do swojej listy prezentów upominku (o wartoÅci do 80zÅ), który chciaÅ(a)byÅ otrzymaÄ. Na koniec prosimy o podanie nazwy użytkownika serwisu <a href="http://sprezentuj.pl">Sprezentuj.pl</a> poniżej, a prezenty bÄdÄ
czekaÅy!</p> #}
{# {% if lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <ul class="errorlist"> #}
{# {% for error in lecture_proposition_form.sprezentujpl_email.errors %} #}
{# <li>{{error|escape}}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# <label for="id_email">Login <a href="http://sprezentuj.pl">sprezentuj.pl</a></label> #}
{# {{ lecture_proposition_form.sprezentujpl_email }} #}
{# </li> #}
</ol>
</fieldset>
<p><input type="submit" value="{% trans "Suggest" %}" /></p>
</form>
{% endif %}
{% endif %}
{% endblock content %}
{% block right_column %}
{% if user.is_authenticated %}
<h2>{% trans "Yes we can" %}</h2>
<p>{% trans "Hurray" %}</p>
{% else %}
<h2>{% trans "Ops, youre not logged in" %}</h2>
<p>{% trans "You have to be registered" %}</p>
{% endif %}
{% endblock right_column %}
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
index 94084ed..e43e5e9 100644
--- a/lectures/templates/program.html
+++ b/lectures/templates/program.html
@@ -1,206 +1,211 @@
{% extends "index.html"%}
{% load i18n %}
{% load markup %}
{% block css %}
.lecture p, #lecture_abstract {
text-indent: 1.5em;
text-align: justify;
text-justify: inter-word;
text-align-last: left;
max-width: 45em;
}
strong.lecture_author + p { text-indent: 0; }
#lecture_author { margin-bottom: 2px;}
#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
#lecture_time { margin-bottom: 1em;}
#note {
color: #444444;
font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
font-size: 11px;
}
table tr td.blank { width: 10px; }
{% endblock css %}
{% block content %}
<h2>{% trans "Program" %}</h2>
<h3>Czwartek</h3>
<table>
+ <tr>
+ <td>19:00-21:30</td>
+ <td>obiadokolacja</td>
+ </tr>
+ <tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>21:00-22:00</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:00-21:25</td>
<td>Oficjalne rozpoczÄcie</td>
</tr>
<tr>
<td class="blank"></td>
<td>21:30-22:00</td>
<td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
</tr>
<tr>
<td>22:30-23:45</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:45</td>
<td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:45-23:15</td>
<td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>23:15-23:45</td>
<td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
</tr>
</table>
<h3>PiÄ
tek</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
- <td>16:45-18:30</td>
+ <td>17:00-18:30</td>
</tr>
<tr>
<td class="blank"></td>
- <td>16:45-17:30</td>
- <td><strong>PaweÅ Sadowski</strong>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów klastrze webowym.</i></td>
+ <td>17:00-17:45</td>
+ <td><strong>PaweÅ Sadowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów w klastrze webowym.</i></td>
</tr>
<tr>
<td class="blank"></td>
- <td>17:30-18:30</td>
- <td><strong>Marek ZióÅkowski</strong>, <i>Jak siÄ programuje w NK</i></td>
+ <td>17:45-18:30</td>
+ <td><strong>Marek ZióÅkowski</strong>, <a href="http://nk.pl/">nk.pl</a>, <i>Jak siÄ programuje w NK</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:15</td>
<td><strong>Patryk Obara</strong></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:15-21:45</td>
<td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
</tr>
<tr>
<td>22:30-23:40</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:55</td>
<td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:55-22:40</td>
<td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
</tr>
</table>
<h3>Sobota</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
<tr>
<td>16:30-19:00</td>
<td>obiadokolacja</td>
</tr>
<tr><td></td></tr> <tr><td></td></tr>
<tr>
<td>17:30-18:30</td>
</tr>
<tr>
<td class="blank"></td>
<td>17:30-18:30</td>
<td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
</tr>
<tr>
<td>19:00-20:15</td>
</tr>
<tr>
<td class="blank"></td>
<td>19:00-19:30</td>
<td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>19:30-20:15</td>
<td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
</tr>
<tr>
<td>20:45-22:05</td>
</tr>
<tr>
<td class="blank"></td>
<td>20:45-21:45</td>
<td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>21:45-22:05</td>
<td><strong>Jerzy Marcinkowski</strong></td>
</tr>
<tr>
<td>22:30-23:35</td>
</tr>
<tr>
<td class="blank"></td>
<td>22:30-22:50</td>
<td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
</tr>
<tr>
<td class="blank"></td>
<td>22:50-22:35</td>
<td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
</tr>
</table>
<h3>Niedziela</h3>
<table>
<tr>
<td>8:30-10:30</td>
<td>Åniadanie</td>
</tr>
</table>
{% endblock content %}
diff --git a/templates/index.html b/templates/index.html
index b8562ac..70db0b0 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,130 +1,131 @@
<!doctype html>
{% load i18n %}
{% load cache %}
{% load blurb_edit %}
{% cache 60 header_index_template %}
<html lang="pl">
<head>
<title>ZOSIA 2011</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="pl" />
<link href="/static_media/css/layout_2col_right_13.css" rel="stylesheet" type="text/css"/>
<link href="/static_media/css/zosia.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="/static_media/css/patches/patch_2col_right_13.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="RSS"
href="/feeds/blog/"/>
<script type="text/javascript">
window.onload=function(){ AddFillerLink("col1_content","col3_content"); }
</script>
<script type="text/javascript">
{% endcache %}
{% block javascript %}{% endblock %}
</script>
<style type="text/css">
<!--
{% block css %}{% endblock %}
-->
</style>
{% block superextra %}{% endblock %}
</head>
<body onload='{% block onload%}{% endblock %}'>
<div id="wrapper">
<div id="page_margins">
<div id="page">
<div id="header">
<div id="topnav">
{% if user.is_authenticated %}
{% trans "oh hai" %}, {{ user.first_name }} {{ user.last_name}} |
{# <a href="/password_change/">{% trans "Change password" %}</a> | #}
{% if user.is_staff %}
<a href="/admin/">{% trans "Administration panel" %}</a> |
{% endif %}
<a href="/logout/">{% trans "Logout" %}</a>
{% else %}
{% if login_form %}
<form action="/login/" method="post" id="login_form">
<fieldset>
{% if login_form.email.errors %}
<ul class="errorlist">
{% for error in login_form.email.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_email">e-mail</label> {{ login_form.email }}
{% if form.password.errors %}
<ul class="errorlist">
{% for error in form.password.errors %}<li>{{error|escape}}</li>{% endfor %}
</ul>
{% endif %}
<label for="id_login_password">{% trans "password" %}</label> {{ login_form.password }}
<input type="submit" value="login" />
</fieldset>
</form>
<div class="main_page_password_reset">
<a href="/password_reset">zapomniaÅem hasÅa</a>
</div>
{% endif %} {# login_form #}
{# <a href="/register/">{% trans "Register" %}</a> #}
{% endif %}
</div>
<a href="/blog/"><img src="/static_media/images/logo_zosi_shadow.png" alt="ZOSIA" /></a>
<span>Zimowy Obóz Studentów Informatyki A • Piechowice â MichaÅowice 2011</span></div>
<!-- begin: main navigation #nav -->
<div id="nav"> <a id="navigation" name="navigation"></a>
<!-- skiplink anchor: navigation -->
<div id="nav_main">
<ul>
<li {% ifequal title "Blog" %}id="current"{% endifequal %}><a href="/blog/">{% trans "Blog" %}</a></li>
{% load time_block_helpers %}
{% if user.is_authenticated %}
<li {% ifequal title "Change preferences" %}id="current"{% endifequal %}><a href="/change_preferences/">{% trans "Change preferences" %}</a></li>
{% else %}
{% if title %}{% registration_link title %}{% endif %} {# see registration/templatetags #}
{% endif %}
<li {% ifequal title "Lectures" %}id="current"{% endifequal %}><a href="/lectures/">{% trans "Lectures" %}</a></li>
+ <li><a href="/program/">{% trans "Program" %}</a></li>
{% if user.is_authenticated %}
{% if title %}{% rooming_link user title %}{% endif %} {# see registration/templatetags #}
{% endif %}
</ul>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col1 - first float column -->
<div id="col1">
{% if messages_list %} <!-- TODO -->
<ul>
<li>The lecture "Lecture object" was added successfully.</li>
</ul>
{% endif %}
<div id="col1_content" class="clearfix"> <a id="content" name="content"></a>
<!-- skiplink anchor: Content -->
{% block content %}page content{% endblock %}
</div>
</div>
<!-- end: #col1 -->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
{% block right_column %}{% endblock %}
</div>
<div id="ie_clearing"> </div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="footer">
<a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/"><img alt="Creative Commons License" style="border-width:0; margin: 0.2em 0.4em 0 0; float:left;" src="http://i.creativecommons.org/l/by/2.5/pl/88x31.png" /></a>{% trans "Except where otherwise noted, content on this site is licensed under a" %} <a rel="license" href="http://creativecommons.org/licenses/by/2.5/pl/">Creative Commons Attribution 2.5 Poland</a>.<br/>
copyleft Patryk Obara, RafaÅ KuliÅski | <a href="http://github.com/dreamer/zapisy_zosia">src</a> | Layout {% trans "based on" %} <a href="http://www.yaml.de/">YAML</a>
</div>
<!-- end: #footer -->
</div>
</div>
</div><!-- wrapper -->
</body>
</html>
|
dreamer/zapisy_zosia
|
3b3a8d95eeff731d3022ba25517d37cf39b0a1c4
|
Added program of zosia11
|
diff --git a/lectures/templates/program.html b/lectures/templates/program.html
new file mode 100644
index 0000000..94084ed
--- /dev/null
+++ b/lectures/templates/program.html
@@ -0,0 +1,206 @@
+{% extends "index.html"%}
+{% load i18n %}
+{% load markup %}
+
+{% block css %}
+
+.lecture p, #lecture_abstract {
+ text-indent: 1.5em;
+ text-align: justify;
+ text-justify: inter-word;
+ text-align-last: left;
+ max-width: 45em;
+}
+strong.lecture_author + p { text-indent: 0; }
+#lecture_author { margin-bottom: 2px;}
+#lecture_abstract { margin-bottom: 5px;text-indent: 0;}
+#lecture_time { margin-bottom: 1em;}
+#note {
+ color: #444444;
+ font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;
+ font-size: 11px;
+}
+
+table tr td.blank { width: 10px; }
+{% endblock css %}
+
+{% block content %}
+
+<h2>{% trans "Program" %}</h2>
+
+<h3>Czwartek</h3>
+
+<table>
+ <tr>
+ <td>21:00-22:00</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>21:00-21:25</td>
+ <td>Oficjalne rozpoczÄcie</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>21:30-22:00</td>
+ <td><strong>Maciej Piróg</strong>, <i>Przychodzi baba do fryzjera i mówi: ProszÄ póŠtrwaÅej</i></td>
+ </tr>
+ <tr>
+ <td>22:30-23:45</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:30-22:45</td>
+ <td><strong>Marcin WÅodarczak</strong>, <i>Wirtualizacja zasobów IT</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:45-23:15</td>
+ <td><strong>PrzemysÅaw Pietrzkiewicz</strong>, <i>Algorytmy wizyjne dla mas</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>23:15-23:45</td>
+ <td><strong>Krzysztof Sakwerda</strong>, <i>Proof Carrying Code - a co to takiego?</i></td>
+ </tr>
+</table>
+
+<h3>PiÄ
tek</h3>
+
+<table>
+ <tr>
+ <td>8:30-10:30</td>
+ <td>Åniadanie</td>
+ </tr>
+ <tr>
+ <td>16:30-19:00</td>
+ <td>obiadokolacja</td>
+ </tr>
+ <tr><td></td></tr> <tr><td></td></tr>
+ <tr>
+ <td>16:45-18:30</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>16:45-17:30</td>
+ <td><strong>PaweÅ Sadowski</strong>, <i>ZarzÄ
dzanie obciÄ
żeniem serwerów klastrze webowym.</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>17:30-18:30</td>
+ <td><strong>Marek ZióÅkowski</strong>, <i>Jak siÄ programuje w NK</i></td>
+ </tr>
+ <tr>
+ <td>19:00-20:15</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>19:00-19:30</td>
+ <td><strong>Dariusz Jackowski</strong>, <i>Prezentacja osiÄ
gnieÄ EMI</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>19:30-20:15</td>
+ <td><strong>Filip Sieczkowski</strong>, <i>Weryfikacja zaawansowanych struktur danych w HOSL</i></td>
+ </tr>
+ <tr>
+ <td>20:45-22:05</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>20:45-21:15</td>
+ <td><strong>Patryk Obara</strong></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>21:15-21:45</td>
+ <td><strong>Marek Materzok</strong>, <i>Wyklikaj sobie dowód</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>21:45-22:05</td>
+ <td><strong>Piotr Wasilewski</strong>, <i>Wordpress dla freelancera</i></td>
+ </tr>
+ <tr>
+ <td>22:30-23:40</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:30-22:55</td>
+ <td><strong>PaweÅ HaÅdrzyÅski</strong>, <i>Co za dużo to niezdrowo</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:55-22:40</td>
+ <td><strong>Janusz Dziemidowicz</strong>, <i>OpenSocial w nk.pl</i></td>
+ </tr>
+</table>
+
+<h3>Sobota</h3>
+
+<table>
+ <tr>
+ <td>8:30-10:30</td>
+ <td>Åniadanie</td>
+ </tr>
+ <tr>
+ <td>16:30-19:00</td>
+ <td>obiadokolacja</td>
+ </tr>
+ <tr><td></td></tr> <tr><td></td></tr>
+ <tr>
+ <td>17:30-18:30</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>17:30-18:30</td>
+ <td><strong>Cezary DoÅÄga</strong>, <a href="http://www.neurosoft.pl/?lang=pl">Neurosoft</a>, <i>Sztuczna inteligencja w praktyce</i></td>
+ </tr>
+ <tr>
+ <td>19:00-20:15</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>19:00-19:30</td>
+ <td><strong>Maciej Kotowicz</strong>, <i>Typowy bughunting</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>19:30-20:15</td>
+ <td><strong>PaweÅ Rohleder, Tomasz UrbaÅski</strong>, <a href="http://www.techland.pl/">Techland</a>, <i>Tworzenie gier to nie zabawa</i></td>
+ </tr>
+ <tr>
+ <td>20:45-22:05</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>20:45-21:45</td>
+ <td><strong>Hans de Nivelle</strong>, <i><a href="http://cade23.ii.uni.wroc.pl/">CADE 23</a> in Wroclaw</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>21:45-22:05</td>
+ <td><strong>Jerzy Marcinkowski</strong></td>
+ </tr>
+ <tr>
+ <td>22:30-23:35</td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:30-22:50</td>
+ <td><strong>Jakub Michaliszyn</strong>, <i>Za kulisami nauki</i></td>
+ </tr>
+ <tr>
+ <td class="blank"></td>
+ <td>22:50-22:35</td>
+ <td><strong>PaweÅ NowoÅwiat</strong>, <i>Skrzydlaci zabójcy</i></td>
+ </tr>
+</table>
+
+<h3>Niedziela</h3>
+<table>
+ <tr>
+ <td>8:30-10:30</td>
+ <td>Åniadanie</td>
+ </tr>
+</table>
+{% endblock content %}
diff --git a/lectures/views.py b/lectures/views.py
index 447566a..607b306 100644
--- a/lectures/views.py
+++ b/lectures/views.py
@@ -1,33 +1,38 @@
# -*- coding: UTF-8 -*-
from django.utils.translation import ugettext as _
from django.http import *
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from common.forms import LoginForm
from common.helpers import *
from models import *
from forms import *
def index(request):
title = "Lectures"
user = request.user
lectures = Lecture.objects.filter(accepted=True)
if is_lecture_suggesting_enabled():
login_form = LoginForm()
if user.is_authenticated() and user.is_active:
if request.method == 'POST':
lecture_proposition_form = NewLectureForm(request.POST)
if lecture_proposition_form.is_valid():
form = lecture_proposition_form
Lecture.objects.create_lecture(form, request.user)
messages = [ _("thankyou") ]
lecture_proposition_form = NewLectureForm()
else:
lecture_proposition_form = NewLectureForm()
return render_to_response('lectures.html', locals())
+
+def program(request):
+ title = "Program"
+ return render_to_response('program.html', locals())
+
diff --git a/urls.py b/urls.py
index ce81162..23d126d 100644
--- a/urls.py
+++ b/urls.py
@@ -1,89 +1,90 @@
import os
from django.conf.urls.defaults import *
from django.contrib import admin
import registration.views
import blog.views
import lectures.views
import newrooms.views
import common.views
from blog.feeds import *
feeds = {
'blog': LatestBlogEntries,
}
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^zapisy_zosia/', include('zapisy_zosia.foo.urls')),
(r'^$', blog.views.index),
(r'^rooms/$', newrooms.views.index),
(r'^rooms/list.json$', newrooms.views.json_rooms_list),
#(r'^rooms/fill/$', newrooms.views.fill_rooms),
(r'^rooms/modify/$', newrooms.views.modify_room),
(r'^rooms/open/$', newrooms.views.open_room),
(r'^rooms/close/$', newrooms.views.close_room),
(r'^rooms/trytogetin/$', newrooms.views.trytogetin_room),
(r'^leave_room/$', newrooms.views.leave_room),
(r'^blog/$', blog.views.index),
# rss feed
(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
{'feed_dict': feeds}),
# admin related
(r'^admin/register_payment/$', registration.views.register_payment),
# TODO(Karol): we disable separate transportation payment for this edition.
# (r'^admin/register_bus_payment/$', registration.views.register_bus_payment),
(r'^admin/(.*)', admin.site.root),
# registration related
(r'^register/$', registration.views.register),
(r'^register/thanks/$', registration.views.thanks),
(r'^register/regulations/$', registration.views.regulations),
# (r'^register/add_org/$', registration.views.add_organization),
(r'^register/activate/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', registration.views.activate_user),
(r'^change_preferences/$', registration.views.change_preferences),
# login / logout
(r'^login/$', common.views.login_view),
(r'^accounts/login/', common.views.login_view),
(r'^logout/$', common.views.logout_view),
(r'^logout/bye/$', common.views.thanks),
# apps main urls
(r'^lectures/$', lectures.views.index),
+ (r'^program/$', lectures.views.program),
# static media
# note, that this should be disabled for production code
# (may be disabled outside of django, though)
(r'^static_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.getcwd()+os.sep+'static_media', 'show_indexes': True}),
# urls required for password change/reset
(r'^password_change/$', common.views.password_change),
(r'^password_change/done/$', common.views.password_change_done),
(r'^password_reset/$',
'django.contrib.auth.views.password_reset',
{ 'template_name':'password_reset_form.html' }),
(r'^password_reset/done/$',
'django.contrib.auth.views.password_reset_done',
{ 'template_name':'password_reset_done.html' }),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
'django.contrib.auth.views.password_reset_confirm',
{ 'template_name':'password_reset_confirm.html' }),
(r'^reset/done/$',
'django.contrib.auth.views.password_reset_complete',
{ 'template_name':'password_reset_complete.html' }),
)
|
dreamer/zapisy_zosia
|
62301ef1498ff6f4de9ff8a649de09b0dab60f1c
|
20 -> 18
|
diff --git a/blog/templates/blog.html b/blog/templates/blog.html
index bf43c42..673180a 100644
--- a/blog/templates/blog.html
+++ b/blog/templates/blog.html
@@ -1,82 +1,82 @@
{% extends "index.html"%}
{% load cache %}
{% cache 120 blog_template %}
{% load markup %}
{% load blurb_edit %}
{% block content %}
{% for post in blog_posts %}
<h2>{{ post.title }}</h2>
<div class="bp_author">by {{ post.author.get_full_name }}</div>
<span class="bp_date"><em>{{ post.pub_date|date:"l, j F Y"|lower }}</em></span>
<div class="blog_post">{{ post.text|textile }}</div>
{% endfor %}
{% endblock %}
{% block css %}
.sponsor_logo {
margin: 20px;
}
{% endblock css %}
{% block right_column %}
{# {% wiki_blurb blog_right_column %} #}
{# wydaje mi siÄ, że ten blok nie powinien byÄ wszucany do trans-stringów #}
{# uÅatwi to wrzucanie niektórych ważnych informacji (np linków do sponsorów), #}
{# w przyszÅoÅci to powinno byÄ przesuniÄte do bazy. (dreamer_) #}
<h2>Informacje:</h2>
<h4>Miejsce</h4>
<p>
<a href="http://www.michalowice-piechowice.pl/">OÅrodek Uroczysko</a> w
<a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Piechowice,+Wczasowa+6,+Poland&aq=0&sll=50.835432,15.608826&sspn=0.288377,0.710678&ie=UTF8&hq=&hnear=Wczasowa+6,+Piechowice,+Jeleniog%C3%B3rski,+Dolno%C5%9Bl%C4%85skie,+Poland&ll=50.818083,15.590973&spn=0.144242,0.486145&z=12">MichaÅowicach â Piechowicach</a>
</p>
<p>
<h4>Planowane terminy</h4>
</p>
<ul style="margin-left:0.2em">
<li>zapisy i wpÅaty<br/>do 24 lutego 2011, 23:59</li>
<li>zgÅaszanie wykÅadów<br/>do 24 lutego 2011, 23:59</li>
- <li>zapisy na pokoje<br/>od 26 lutego 2011, 20:00</li>
+ <li>zapisy na pokoje<br/>od 26 lutego 2011, 18:00</li>
<li>wyjazd<br/>3 marca 2011</li>
<li>powrót<br/>6 marca 2011</li>
</ul>
<h4>Kontakt</h4>
<p>
<a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
<a href="http://sites.google.com/a/cs.uni.wroc.pl/ksi/"><img src='/static_media/images/ksi1.png' alt='KoÅo Studentów Informatyki' title='KoÅo Studentów Informatyki UWr' /></a>
</p>
<br/>
<h4>Patronat</h4>
<p>
<ul>
<li><a href="http://www.wmi.uni.wroc.pl/">WydziaÅ Matematyki i Informatyki Uniwersytetu WrocÅawskiego</a></li>
{# <li><a href="http://www.uni.wroc.pl/">JM. Rektor Uniwersytetu WrocÅawskiego</a></li> #}
<li>Dyrektor Insytutu Informatyki Uniwersytetu WrocÅawskiego - prof. Leszek Pacholski</li>
</ul>
</p>
<h4>Sponsorzy</h4>
<p>
<div class="sponsor_logo">
<a href="http://www.ii.uni.wroc.pl/"><img src='/static_media/images/ii1.png' alt='Instytut Informatyki UWr' title='Instytut Informatyki UWr' /></a>
</div>
{#<div class="sponsor_logo">#}
{# <a href="http://sprezentuj.pl"><img src='/static_media/images/logo_sprezentuj.pl_175x120.png' alt='Sprezentuj.pl' title='Sprezentuj.pl' /></a> #}
{# </div> #}
<div class="sponsor_logo">
<a href="http://nk.pl/"><img src='/static_media/images/logo_poziome_175x88_bg.png' alt='Nasza Klasa - miejsce spotkaÅ' title='Nasza Klasa - miejsce spotkaÅ' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.neurosoft.pl/?lang=pl"><img src='/static_media/images/Logo_neurosoft175x30_ciemne.jpg' alt='Neurosoft' title='Neurosoft' /></a>
</div>
<div class="sponsor_logo">
<a href="http://www.techland.pl/"><img src='/static_media/images/logo_techland175x60.png' alt='Techland' title='Techland' /></a>
</div>
</p>
{% endblock %}
{% endcache %}
|
dreamer/zapisy_zosia
|
f7f5d3cb0f1d346ed53f20cef20957a471dd48cf
|
Zmien preferencje -> Moje preferencje
|
diff --git a/locale/pl/LC_MESSAGES/django.mo b/locale/pl/LC_MESSAGES/django.mo
index dee1d77..0c5454b 100644
Binary files a/locale/pl/LC_MESSAGES/django.mo and b/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/locale/pl/LC_MESSAGES/django.po b/locale/pl/LC_MESSAGES/django.po
index 645c9aa..b0a6b11 100644
--- a/locale/pl/LC_MESSAGES/django.po
+++ b/locale/pl/LC_MESSAGES/django.po
@@ -1,531 +1,531 @@
# SOME DESCRIPTIVE TITLE.
# Copyleft 2008
# This file is distributed under the same license as the zapisy_zosia.
# dreamer_ <[email protected]>, 2008.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-02-01 11:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: dreamer_ <[email protected]>\n"
"Language-Team: noteam <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: common/forms.py:16
msgid "Password too short"
msgstr "HasÅo powinno mieÄ przynajmniej 6 znaków dÅugoÅci"
#: common/templates/bye.html:5
msgid "bye"
msgstr "WylogowaÅeÅ siÄ."
#: common/templates/bye.html:7 common/templates/reactivation.html:7
#: registration/templates/reactivation.html:7
msgid "thanks for visit"
msgstr "DziÄkujemy za wizytÄ i do zobaczenia na ZOSI!"
#: common/templates/login.html:11
msgid "loggedalready"
msgstr "Powtórne logowanie nie byÅo konieczne ;)"
#: common/templates/login.html:14
msgid "loginfail"
msgstr "Niestety, logowanie siÄ nie powiodÅo."
#: common/templates/login.html:16
msgid "loginfailrecover"
msgstr ""
"Jeżeli już posiadasz swoje konto, możesz <a href='/"
"password_reset/'>odzyskaÄ</a> hasÅo."
#: common/templates/login.html:18
msgid "stranger"
msgstr "Zapraszamy do zalogowania siÄ."
#: common/templates/login.html:33
#, fuzzy
msgid "email"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: common/templates/login.html:44
#: registration/templates/change_preferences.html:71
#: registration/templates/register_form.html:73 templates/index.html:53
msgid "password"
msgstr "hasÅo"
#: common/templates/login.html:49
msgid "loginbutton"
msgstr "Zaloguj"
#: common/templates/reactivation.html:5
#: registration/templates/reactivation.html:5
msgid "reactivate"
msgstr "Użyty link aktywacyjny jest nieprawidÅowy lub nieaktualny."
#: lectures/views.py:28
msgid "thankyou"
msgstr "DziÄkujemy! Twój wykÅad czeka na akceptacjÄ moderatora."
#: lectures/templates/lectures.html:10
#, python-format
msgid "<li>%(msg)s</li>"
msgstr ""
#: lectures/templates/lectures.html:16
#: registration/templates/change_preferences.html:55
msgid "Repair errors below, please."
msgstr "Prosimy o poprawienie wskazanych bÅÄdów."
#: lectures/templates/lectures.html:20
msgid "Invited talks"
msgstr "WykÅady zaproszone"
#: lectures/templates/lectures.html:20
msgid "Lectures suggested"
msgstr "Zaproponowane wykÅady"
#: lectures/templates/lectures.html:28
msgid "None yet. You can be first!"
msgstr "Jeszcze nikt nie zaproponowaÅ wykÅadu. Twój może byÄ pierwszy!"
#: lectures/templates/lectures.html:33
msgid "Suggest your lecture"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:36
msgid "Public info"
msgstr "Informacje wymagane"
#: lectures/templates/lectures.html:46
msgid "Title"
msgstr "TytuÅ"
#: lectures/templates/lectures.html:57
msgid "duraszatan"
msgstr "Czas trwania"
#: lectures/templates/lectures.html:57
msgid "inminutes"
msgstr " (w minutach)"
#: lectures/templates/lectures.html:67
msgid "Abstract"
msgstr "Abstrakt"
#: lectures/templates/lectures.html:67
msgid "(max chars)"
msgstr " (do 512 znaków)"
#: lectures/templates/lectures.html:73
msgid "Additional information"
msgstr "Informacje dodatkowe"
#: lectures/templates/lectures.html:83
msgid ""
"Your suggestions, requests and comments intended for organizers and a lot "
"more, what you always wanted to say these philistinic bastards with purulent "
"knees"
msgstr ""
"Uwagi, proÅby i wszelkie komentarze dotyczÄ
ce wykÅadu, którymi chciaÅbyÅ siÄ "
"podzieliÄ z organizatorami oraz ew. proponowany czas trwania wykÅadu z uzasadnieniem."
#: lectures/templates/lectures.html:88
msgid "Suggest"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:98
msgid "Yes we can"
msgstr " "
#: lectures/templates/lectures.html:99
msgid "Hurray"
msgstr " "
#: lectures/templates/lectures.html:101
msgid "Ops, youre not logged in"
msgstr "Ojej, nie jesteÅ zalogowany."
#: lectures/templates/lectures.html:102
msgid "You have to be registered"
msgstr ""
"JeÅli tylko siÄ zarejestrujesz, bÄdziesz mógÅ dodaÄ swój wykÅad (and there "
"will be a cake)."
#: registration/forms.py:30
msgid "You can buy meal only for adequate hotel night."
msgstr "PosiÅki sÄ
dostÄpne tylko na wykupione doby hotelowe."
#: registration/forms.py:103 registration/forms.py:160
msgid "At least one day should be selected."
msgstr "Wybierz przynajmniej jeden nocleg."
#: registration/models.py:22
msgid "classic"
msgstr "mÄska"
#: registration/models.py:23
msgid "women"
msgstr "damska"
#: registration/views.py:68
msgid "activation_mail_title"
msgstr "Mail aktywacyjny systemu zapisów na ZOSIÄ"
#: registration/templates/change_preferences.html:27
msgid "Paid was registered, see you soon!"
msgstr "ZarejestrowaliÅmy TwojÄ
wpÅatÄ, do zobaczenia na ZOSI!"
#: registration/templates/change_preferences.html:60
msgid "Preferences"
msgstr "Ustawienia"
#: registration/templates/change_preferences.html:64
#: registration/templates/register_form.html:52
msgid "authentication"
msgstr "dane do uwierzytelniania"
#: registration/templates/change_preferences.html:72
msgid "change"
msgstr "zmieÅ"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "personal"
msgstr "dane osobowe"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "room openning hour"
msgstr "otwarcie zapisów na pokoje"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:100
msgid "name"
msgstr "imiÄ"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:111
msgid "surname"
msgstr "nazwisko"
#: registration/templates/register_form.html:119
msgid "adding organizations only at registration"
msgstr "Dodanie nowej organizacji jest możliwe tylko podczas rejestracji."
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "organization"
msgstr "organizacja"
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "bus hour"
msgstr "godzina autobusu"
#: registration/templates/change_preferences.html:100
#: registration/templates/register_form.html:141
msgid "nights"
msgstr "noclegi "
#: registration/templates/change_preferences.html:110
#: registration/templates/register_form.html:151
msgid "night12"
msgstr "3/4 marca"
#: registration/templates/change_preferences.html:113
#: registration/templates/register_form.html:154
msgid "night23"
msgstr "4/5 marca"
#: registration/templates/change_preferences.html:116
#: registration/templates/register_form.html:157
msgid "night34"
msgstr "5/6 marca"
#: registration/templates/change_preferences.html:121
#: registration/templates/register_form.html:162
msgid "dinners"
msgstr "obiadokolacje"
#: registration/templates/change_preferences.html:129
#: registration/templates/register_form.html:170
msgid "dinner1"
msgstr "3 marca"
#: registration/templates/change_preferences.html:132
#: registration/templates/register_form.html:173
msgid "dinner2"
msgstr "4 marca"
#: registration/templates/change_preferences.html:135
#: registration/templates/register_form.html:176
msgid "dinner3"
msgstr "5 marca"
#: registration/templates/change_preferences.html:140
#: registration/templates/register_form.html:181
msgid "breakfasts"
msgstr "Åniadania"
#: registration/templates/change_preferences.html:148
#: registration/templates/register_form.html:189
msgid "breakfast2"
msgstr "4 marca"
#: registration/templates/change_preferences.html:151
#: registration/templates/register_form.html:192
msgid "breakfast3"
msgstr "5 marca"
#: registration/templates/change_preferences.html:154
#: registration/templates/register_form.html:195
msgid "breakfast4"
msgstr "6 marca"
#: registration/templates/change_preferences.html:159
#: registration/templates/register_form.html:200
msgid "others"
msgstr "pozostaÅe"
#: registration/templates/change_preferences.html:162
#: registration/templates/register_form.html:203
msgid "veggies"
msgstr "PreferujÄ kuchniÄ wegetariaÅskÄ
."
#: registration/templates/change_preferences.html:165
#: registration/templates/register_form.html:206
msgid "bussies"
msgstr ""
"Jestem zainteresowany zorganizowanym transportem autokarowym na trasie "
"WrocÅaw - MichaÅowice - WrocÅaw"
#: registration/templates/change_preferences.html:168
#: registration/templates/register_form.html:209
msgid "shirties"
msgstr "rozmiar koszulki"
#: registration/templates/change_preferences.html:171
#: registration/templates/register_form.html:212
msgid "shirt_type"
msgstr "rodzaj koszulki"
#: registration/templates/change_preferences.html:185
msgid "Save"
msgstr ""
#: registration/templates/register_form.html:48
#: registration/templatetags/time_block_helpers.py:14
msgid "Registration"
msgstr "Rejestracja"
#: registration/templates/register_form.html:62
#: registration/templates/register_form.html:73
#: registration/templates/register_form.html:84
#: registration/templates/register_form.html:100
#: registration/templates/register_form.html:111
#: registration/templates/register_form.html:124
msgid "(required)"
msgstr " (wymagane)"
#: registration/templates/register_form.html:84
msgid "repeatepas"
msgstr "powtórz hasÅo"
#: registration/templates/register_form.html:216
msgid "register"
msgstr "Zarejestruj"
#: registration/templates/thanks.html:5
msgid "tyouregister"
msgstr "Rejestracja prawie ukoÅczona."
#: registration/templates/thanks.html:7
msgid "checkmail"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: templates/change_password.html:14
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] ""
msgstr[1] ""
#: templates/change_password.html:33
msgid "Password (again)"
msgstr "HasÅo (ponownie)"
#: templates/change_password.html:38
msgid "Change password"
msgstr "ZmieÅ hasÅo"
#: templates/change_password_done.html:4
msgid "passwordchanged"
msgstr ""
"UdaÅo Ci siÄ zmieniÄ hasÅo.<br />Zanotuj je na żóÅtej karteczce "
"samoprzylepnej i umieÅÄ na monitorze.<br /><img src='/static_media/images/"
"kartka.jpg' width='200'/>"
#: templates/index.html:32
msgid "oh hai"
msgstr "Witaj"
#: templates/index.html:35
msgid "Administration panel"
msgstr "Panel administracyjny"
#: templates/index.html:37
msgid "Logout"
msgstr "Wyloguj"
#: templates/index.html:69
msgid "Blog"
msgstr "Blog"
#: templates/index.html:71
msgid "Change preferences"
-msgstr "ZmieÅ preferencje"
+msgstr "Moje preferencje"
#: templates/index.html:77
msgid "Lectures"
msgstr "WykÅady"
#: templates/index.html:111
msgid "Except where otherwise noted, content on this site is licensed under a"
msgstr ""
"O ile nie stwierdzono inaczej, wszystkie materiaÅy na stronie sÄ
dostÄpne na "
"licencji"
#: templates/index.html:112
msgid "based on"
msgstr "oparty na"
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:4
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
msgid "Home"
msgstr ""
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:6
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
#: templates/password_reset_form.html:6 templates/password_reset_form.html:10
msgid "Password reset"
msgstr "Odzyskiwanie hasÅa"
#: templates/password_reset_complete.html:6
#: templates/password_reset_complete.html:10
msgid "Password reset complete"
msgstr "Odzyskiwanie hasÅa zakoÅczone"
#: templates/password_reset_complete.html:12
msgid "Your password has been set. You may go ahead and log in now."
msgstr "Możesz siÄ teraz zalogowaÄ."
#: templates/password_reset_complete.html:14
msgid "Log in"
msgstr ""
#: templates/password_reset_confirm.html:4
msgid "Password reset confirmation"
msgstr "la la la"
#: templates/password_reset_confirm.html:12
msgid "Enter new password"
msgstr "Ustaw nowe hasÅo"
#: templates/password_reset_confirm.html:14
msgid ""
"Please enter your new password twice so we can verify you typed it in "
"correctly."
msgstr " "
#: templates/password_reset_confirm.html:18
msgid "New password:"
msgstr "hasÅo"
#: templates/password_reset_confirm.html:20
msgid "Confirm password:"
msgstr "powtórz hasÅo"
#: templates/password_reset_confirm.html:21
msgid "Change my password"
msgstr "Ustaw hasÅo"
#: templates/password_reset_confirm.html:26
msgid "Password reset unsuccessful"
msgstr "Nie udaÅo siÄ odzyskaÄ hasÅa"
#: templates/password_reset_confirm.html:28
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
"Link do odzyskiwania hasÅa byÅ niepoprawny, byÄ może dlatego, że zostaÅ już "
"raz użyty. W razie potrzeby powtórz caÅÄ
procedurÄ. "
#: templates/password_reset_done.html:6 templates/password_reset_done.html:10
msgid "Password reset successful"
msgstr "Odzyskiwanie hasÅa w toku"
#: templates/password_reset_done.html:12
msgid ""
"We've e-mailed you instructions for setting your password to the e-mail "
"address you submitted. You should be receiving it shortly."
msgstr ""
#: templates/password_reset_email.html:2
#: templates/registration/password_reset_email.html:3
msgid "You're receiving this e-mail because you requested a password reset"
msgstr ""
#: templates/password_reset_email.html:3
#: templates/registration/password_reset_email.html:4
#, python-format
msgid "for your user account at %(site_name)s"
msgstr ""
#: templates/password_reset_email.html:5
#: templates/registration/password_reset_email.html:6
msgid "Please go to the following page and choose a new password:"
msgstr "Kliknij w poniższy link i wybierz nowe hasÅo."
#: templates/password_reset_email.html:9
#: templates/registration/password_reset_email.html:10
msgid "Thanks for using our site!"
msgstr "DziÄkujemy za korzystanie z naszego systemu!"
#: templates/password_reset_email.html:11
#: templates/registration/password_reset_email.html:12
#, python-format
msgid "The %(site_name)s team"
msgstr ""
#: templates/password_reset_form.html:12
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
msgstr ""
"ZapomniaÅeÅ hasÅa? Podaj swój adres e-mail, a pomożemy Ci ustawiÄ nowe."
#: templates/password_reset_form.html:16
msgid "E-mail address:"
msgstr "Adres e-mail:"
#: templates/password_reset_form.html:16
msgid "Reset my password"
msgstr "Odzyskaj hasÅo"
#: templates/admin/base_site.html:4
msgid "Django site admin"
msgstr ""
#~ msgid "add"
#~ msgstr "Dodaj"
|
dreamer/zapisy_zosia
|
19cc4b6b65d2bb8a8e6f3d6eea73aa76c16d43b7
|
ustawienia -> preferencje
|
diff --git a/locale/pl/LC_MESSAGES/django.mo b/locale/pl/LC_MESSAGES/django.mo
index cd970a9..dee1d77 100644
Binary files a/locale/pl/LC_MESSAGES/django.mo and b/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/locale/pl/LC_MESSAGES/django.po b/locale/pl/LC_MESSAGES/django.po
index 22cdc20..645c9aa 100644
--- a/locale/pl/LC_MESSAGES/django.po
+++ b/locale/pl/LC_MESSAGES/django.po
@@ -1,531 +1,531 @@
# SOME DESCRIPTIVE TITLE.
# Copyleft 2008
# This file is distributed under the same license as the zapisy_zosia.
# dreamer_ <[email protected]>, 2008.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-02-01 11:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: dreamer_ <[email protected]>\n"
"Language-Team: noteam <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: common/forms.py:16
msgid "Password too short"
msgstr "HasÅo powinno mieÄ przynajmniej 6 znaków dÅugoÅci"
#: common/templates/bye.html:5
msgid "bye"
msgstr "WylogowaÅeÅ siÄ."
#: common/templates/bye.html:7 common/templates/reactivation.html:7
#: registration/templates/reactivation.html:7
msgid "thanks for visit"
msgstr "DziÄkujemy za wizytÄ i do zobaczenia na ZOSI!"
#: common/templates/login.html:11
msgid "loggedalready"
msgstr "Powtórne logowanie nie byÅo konieczne ;)"
#: common/templates/login.html:14
msgid "loginfail"
msgstr "Niestety, logowanie siÄ nie powiodÅo."
#: common/templates/login.html:16
msgid "loginfailrecover"
msgstr ""
"Jeżeli już posiadasz swoje konto, możesz <a href='/"
"password_reset/'>odzyskaÄ</a> hasÅo."
#: common/templates/login.html:18
msgid "stranger"
msgstr "Zapraszamy do zalogowania siÄ."
#: common/templates/login.html:33
#, fuzzy
msgid "email"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: common/templates/login.html:44
#: registration/templates/change_preferences.html:71
#: registration/templates/register_form.html:73 templates/index.html:53
msgid "password"
msgstr "hasÅo"
#: common/templates/login.html:49
msgid "loginbutton"
msgstr "Zaloguj"
#: common/templates/reactivation.html:5
#: registration/templates/reactivation.html:5
msgid "reactivate"
msgstr "Użyty link aktywacyjny jest nieprawidÅowy lub nieaktualny."
#: lectures/views.py:28
msgid "thankyou"
msgstr "DziÄkujemy! Twój wykÅad czeka na akceptacjÄ moderatora."
#: lectures/templates/lectures.html:10
#, python-format
msgid "<li>%(msg)s</li>"
msgstr ""
#: lectures/templates/lectures.html:16
#: registration/templates/change_preferences.html:55
msgid "Repair errors below, please."
msgstr "Prosimy o poprawienie wskazanych bÅÄdów."
#: lectures/templates/lectures.html:20
msgid "Invited talks"
msgstr "WykÅady zaproszone"
#: lectures/templates/lectures.html:20
msgid "Lectures suggested"
msgstr "Zaproponowane wykÅady"
#: lectures/templates/lectures.html:28
msgid "None yet. You can be first!"
msgstr "Jeszcze nikt nie zaproponowaÅ wykÅadu. Twój może byÄ pierwszy!"
#: lectures/templates/lectures.html:33
msgid "Suggest your lecture"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:36
msgid "Public info"
msgstr "Informacje wymagane"
#: lectures/templates/lectures.html:46
msgid "Title"
msgstr "TytuÅ"
#: lectures/templates/lectures.html:57
msgid "duraszatan"
msgstr "Czas trwania"
#: lectures/templates/lectures.html:57
msgid "inminutes"
msgstr " (w minutach)"
#: lectures/templates/lectures.html:67
msgid "Abstract"
msgstr "Abstrakt"
#: lectures/templates/lectures.html:67
msgid "(max chars)"
msgstr " (do 512 znaków)"
#: lectures/templates/lectures.html:73
msgid "Additional information"
msgstr "Informacje dodatkowe"
#: lectures/templates/lectures.html:83
msgid ""
"Your suggestions, requests and comments intended for organizers and a lot "
"more, what you always wanted to say these philistinic bastards with purulent "
"knees"
msgstr ""
"Uwagi, proÅby i wszelkie komentarze dotyczÄ
ce wykÅadu, którymi chciaÅbyÅ siÄ "
"podzieliÄ z organizatorami oraz ew. proponowany czas trwania wykÅadu z uzasadnieniem."
#: lectures/templates/lectures.html:88
msgid "Suggest"
msgstr "Zaproponuj wykÅad"
#: lectures/templates/lectures.html:98
msgid "Yes we can"
msgstr " "
#: lectures/templates/lectures.html:99
msgid "Hurray"
msgstr " "
#: lectures/templates/lectures.html:101
msgid "Ops, youre not logged in"
msgstr "Ojej, nie jesteÅ zalogowany."
#: lectures/templates/lectures.html:102
msgid "You have to be registered"
msgstr ""
"JeÅli tylko siÄ zarejestrujesz, bÄdziesz mógÅ dodaÄ swój wykÅad (and there "
"will be a cake)."
#: registration/forms.py:30
msgid "You can buy meal only for adequate hotel night."
msgstr "PosiÅki sÄ
dostÄpne tylko na wykupione doby hotelowe."
#: registration/forms.py:103 registration/forms.py:160
msgid "At least one day should be selected."
msgstr "Wybierz przynajmniej jeden nocleg."
#: registration/models.py:22
msgid "classic"
msgstr "mÄska"
#: registration/models.py:23
msgid "women"
msgstr "damska"
#: registration/views.py:68
msgid "activation_mail_title"
msgstr "Mail aktywacyjny systemu zapisów na ZOSIÄ"
#: registration/templates/change_preferences.html:27
msgid "Paid was registered, see you soon!"
msgstr "ZarejestrowaliÅmy TwojÄ
wpÅatÄ, do zobaczenia na ZOSI!"
#: registration/templates/change_preferences.html:60
msgid "Preferences"
msgstr "Ustawienia"
#: registration/templates/change_preferences.html:64
#: registration/templates/register_form.html:52
msgid "authentication"
msgstr "dane do uwierzytelniania"
#: registration/templates/change_preferences.html:72
msgid "change"
msgstr "zmieÅ"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "personal"
msgstr "dane osobowe"
#: registration/templates/change_preferences.html:77
#: registration/templates/register_form.html:90
msgid "room openning hour"
msgstr "otwarcie zapisów na pokoje"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:100
msgid "name"
msgstr "imiÄ"
#: registration/templates/change_preferences.html:80
#: registration/templates/register_form.html:111
msgid "surname"
msgstr "nazwisko"
#: registration/templates/register_form.html:119
msgid "adding organizations only at registration"
msgstr "Dodanie nowej organizacji jest możliwe tylko podczas rejestracji."
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "organization"
msgstr "organizacja"
#: registration/templates/change_preferences.html:93
#: registration/templates/register_form.html:131
msgid "bus hour"
msgstr "godzina autobusu"
#: registration/templates/change_preferences.html:100
#: registration/templates/register_form.html:141
msgid "nights"
msgstr "noclegi "
#: registration/templates/change_preferences.html:110
#: registration/templates/register_form.html:151
msgid "night12"
msgstr "3/4 marca"
#: registration/templates/change_preferences.html:113
#: registration/templates/register_form.html:154
msgid "night23"
msgstr "4/5 marca"
#: registration/templates/change_preferences.html:116
#: registration/templates/register_form.html:157
msgid "night34"
msgstr "5/6 marca"
#: registration/templates/change_preferences.html:121
#: registration/templates/register_form.html:162
msgid "dinners"
msgstr "obiadokolacje"
#: registration/templates/change_preferences.html:129
#: registration/templates/register_form.html:170
msgid "dinner1"
msgstr "3 marca"
#: registration/templates/change_preferences.html:132
#: registration/templates/register_form.html:173
msgid "dinner2"
msgstr "4 marca"
#: registration/templates/change_preferences.html:135
#: registration/templates/register_form.html:176
msgid "dinner3"
msgstr "5 marca"
#: registration/templates/change_preferences.html:140
#: registration/templates/register_form.html:181
msgid "breakfasts"
msgstr "Åniadania"
#: registration/templates/change_preferences.html:148
#: registration/templates/register_form.html:189
msgid "breakfast2"
msgstr "4 marca"
#: registration/templates/change_preferences.html:151
#: registration/templates/register_form.html:192
msgid "breakfast3"
msgstr "5 marca"
#: registration/templates/change_preferences.html:154
#: registration/templates/register_form.html:195
msgid "breakfast4"
msgstr "6 marca"
#: registration/templates/change_preferences.html:159
#: registration/templates/register_form.html:200
msgid "others"
msgstr "pozostaÅe"
#: registration/templates/change_preferences.html:162
#: registration/templates/register_form.html:203
msgid "veggies"
msgstr "PreferujÄ kuchniÄ wegetariaÅskÄ
."
#: registration/templates/change_preferences.html:165
#: registration/templates/register_form.html:206
msgid "bussies"
msgstr ""
"Jestem zainteresowany zorganizowanym transportem autokarowym na trasie "
"WrocÅaw - MichaÅowice - WrocÅaw"
#: registration/templates/change_preferences.html:168
#: registration/templates/register_form.html:209
msgid "shirties"
msgstr "rozmiar koszulki"
#: registration/templates/change_preferences.html:171
#: registration/templates/register_form.html:212
msgid "shirt_type"
msgstr "rodzaj koszulki"
#: registration/templates/change_preferences.html:185
msgid "Save"
msgstr ""
#: registration/templates/register_form.html:48
#: registration/templatetags/time_block_helpers.py:14
msgid "Registration"
msgstr "Rejestracja"
#: registration/templates/register_form.html:62
#: registration/templates/register_form.html:73
#: registration/templates/register_form.html:84
#: registration/templates/register_form.html:100
#: registration/templates/register_form.html:111
#: registration/templates/register_form.html:124
msgid "(required)"
msgstr " (wymagane)"
#: registration/templates/register_form.html:84
msgid "repeatepas"
msgstr "powtórz hasÅo"
#: registration/templates/register_form.html:216
msgid "register"
msgstr "Zarejestruj"
#: registration/templates/thanks.html:5
msgid "tyouregister"
msgstr "Rejestracja prawie ukoÅczona."
#: registration/templates/thanks.html:7
msgid "checkmail"
msgstr ""
"<p />WÅaÅnie zostaÅ wysÅany do Ciebie mail aktywacyjny. <br>KlikniÄcie "
"zamieszczonego w nim odnoÅnika koÅczy proces rejestracji."
#: templates/change_password.html:14
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] ""
msgstr[1] ""
#: templates/change_password.html:33
msgid "Password (again)"
msgstr "HasÅo (ponownie)"
#: templates/change_password.html:38
msgid "Change password"
msgstr "ZmieÅ hasÅo"
#: templates/change_password_done.html:4
msgid "passwordchanged"
msgstr ""
"UdaÅo Ci siÄ zmieniÄ hasÅo.<br />Zanotuj je na żóÅtej karteczce "
"samoprzylepnej i umieÅÄ na monitorze.<br /><img src='/static_media/images/"
"kartka.jpg' width='200'/>"
#: templates/index.html:32
msgid "oh hai"
msgstr "Witaj"
#: templates/index.html:35
msgid "Administration panel"
msgstr "Panel administracyjny"
#: templates/index.html:37
msgid "Logout"
msgstr "Wyloguj"
#: templates/index.html:69
msgid "Blog"
msgstr "Blog"
#: templates/index.html:71
msgid "Change preferences"
-msgstr "ZmieÅ ustawienia"
+msgstr "ZmieÅ preferencje"
#: templates/index.html:77
msgid "Lectures"
msgstr "WykÅady"
#: templates/index.html:111
msgid "Except where otherwise noted, content on this site is licensed under a"
msgstr ""
"O ile nie stwierdzono inaczej, wszystkie materiaÅy na stronie sÄ
dostÄpne na "
"licencji"
#: templates/index.html:112
msgid "based on"
msgstr "oparty na"
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:4
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
msgid "Home"
msgstr ""
#: templates/password_reset_complete.html:4
#: templates/password_reset_confirm.html:6
#: templates/password_reset_done.html:4 templates/password_reset_form.html:4
#: templates/password_reset_form.html:6 templates/password_reset_form.html:10
msgid "Password reset"
msgstr "Odzyskiwanie hasÅa"
#: templates/password_reset_complete.html:6
#: templates/password_reset_complete.html:10
msgid "Password reset complete"
msgstr "Odzyskiwanie hasÅa zakoÅczone"
#: templates/password_reset_complete.html:12
msgid "Your password has been set. You may go ahead and log in now."
msgstr "Możesz siÄ teraz zalogowaÄ."
#: templates/password_reset_complete.html:14
msgid "Log in"
msgstr ""
#: templates/password_reset_confirm.html:4
msgid "Password reset confirmation"
msgstr "la la la"
#: templates/password_reset_confirm.html:12
msgid "Enter new password"
msgstr "Ustaw nowe hasÅo"
#: templates/password_reset_confirm.html:14
msgid ""
"Please enter your new password twice so we can verify you typed it in "
"correctly."
msgstr " "
#: templates/password_reset_confirm.html:18
msgid "New password:"
msgstr "hasÅo"
#: templates/password_reset_confirm.html:20
msgid "Confirm password:"
msgstr "powtórz hasÅo"
#: templates/password_reset_confirm.html:21
msgid "Change my password"
msgstr "Ustaw hasÅo"
#: templates/password_reset_confirm.html:26
msgid "Password reset unsuccessful"
msgstr "Nie udaÅo siÄ odzyskaÄ hasÅa"
#: templates/password_reset_confirm.html:28
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
"Link do odzyskiwania hasÅa byÅ niepoprawny, byÄ może dlatego, że zostaÅ już "
"raz użyty. W razie potrzeby powtórz caÅÄ
procedurÄ. "
#: templates/password_reset_done.html:6 templates/password_reset_done.html:10
msgid "Password reset successful"
msgstr "Odzyskiwanie hasÅa w toku"
#: templates/password_reset_done.html:12
msgid ""
"We've e-mailed you instructions for setting your password to the e-mail "
"address you submitted. You should be receiving it shortly."
msgstr ""
#: templates/password_reset_email.html:2
#: templates/registration/password_reset_email.html:3
msgid "You're receiving this e-mail because you requested a password reset"
msgstr ""
#: templates/password_reset_email.html:3
#: templates/registration/password_reset_email.html:4
#, python-format
msgid "for your user account at %(site_name)s"
msgstr ""
#: templates/password_reset_email.html:5
#: templates/registration/password_reset_email.html:6
msgid "Please go to the following page and choose a new password:"
msgstr "Kliknij w poniższy link i wybierz nowe hasÅo."
#: templates/password_reset_email.html:9
#: templates/registration/password_reset_email.html:10
msgid "Thanks for using our site!"
msgstr "DziÄkujemy za korzystanie z naszego systemu!"
#: templates/password_reset_email.html:11
#: templates/registration/password_reset_email.html:12
#, python-format
msgid "The %(site_name)s team"
msgstr ""
#: templates/password_reset_form.html:12
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
msgstr ""
"ZapomniaÅeÅ hasÅa? Podaj swój adres e-mail, a pomożemy Ci ustawiÄ nowe."
#: templates/password_reset_form.html:16
msgid "E-mail address:"
msgstr "Adres e-mail:"
#: templates/password_reset_form.html:16
msgid "Reset my password"
msgstr "Odzyskaj hasÅo"
#: templates/admin/base_site.html:4
msgid "Django site admin"
msgstr ""
#~ msgid "add"
#~ msgstr "Dodaj"
|
sila/AtomProject
|
830e7260350232e0205b468d27cca7af9305089b
|
comment designer reference
|
diff --git a/Atom.Web/AutoComplete/JQAutoComplete.cs b/Atom.Web/AutoComplete/JQAutoComplete.cs
index 228228f..32301aa 100644
--- a/Atom.Web/AutoComplete/JQAutoComplete.cs
+++ b/Atom.Web/AutoComplete/JQAutoComplete.cs
@@ -1,60 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.AutoComplete
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
- Designer(typeof(AutoCompleteDesigner)),
+ //Designer(typeof(AutoCompleteDesigner)),
ToolboxData("<{0}:JQAutoComplete runat=\"server\"> </{0}:JQAutoComplete>")
]
public class JQAutoComplete : WebControl
{
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + "; ");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
// startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
startupScript.AppendFormat("}});");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
}
}
\ No newline at end of file
|
sila/AtomProject
|
26c2da46181332b5bd01e2da9de3f41e39300d17
|
add instance of autocomlete control
|
diff --git a/Atom.Web/Atom.Web.csproj b/Atom.Web/Atom.Web.csproj
index dbb1742..09aaeae 100644
--- a/Atom.Web/Atom.Web.csproj
+++ b/Atom.Web/Atom.Web.csproj
@@ -1,106 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E56668B1-FEE9-43C8-92B7-DAC1B568D29E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Atom.Web.UI.WebControls</RootNamespace>
<AssemblyName>Atom.Web</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Nonshipping>true</Nonshipping>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<Compile Include="Accordion\AccordionDuration.cs" />
<Compile Include="Accordion\Design\AccordionDesigner.cs" />
<Compile Include="Accordion\EventArgs\AccordionChangedEventArgs.cs" />
<Compile Include="Accordion\EventArgs\AccordionChangingEventArgs.cs" />
<Compile Include="Accordion\Item.cs" />
<Compile Include="Accordion\ItemChangeType.cs" />
<Compile Include="Accordion\ItemCollectionEditor.cs" />
<Compile Include="Accordion\JQAccordion.cs" />
+ <Compile Include="AutoComplete\Design\AutoCompleteDesigner.cs" />
<Compile Include="AutoComplete\JQAutoComplete.cs" />
<Compile Include="Button\ButtonType.cs" />
<Compile Include="Button\Design\ButtonDesigner.cs" />
<Compile Include="Button\JQButton.cs" />
<Compile Include="DatePicker\DatePickerAnimation.cs" />
<Compile Include="DatePicker\DatePickerDuration.cs" />
<Compile Include="DatePicker\DatePickerMode.cs" />
<Compile Include="DatePicker\DatePickerShowOn.cs" />
<Compile Include="DatePicker\Design\DatePickerDesigner.cs" />
<Compile Include="DatePicker\JQDatePicker.cs" />
<Compile Include="Dialog\Design\DialogDesigner.cs" />
<Compile Include="Dialog\DialogAnimation.cs" />
<Compile Include="Dialog\DialogPosition.cs" />
<Compile Include="Dialog\JQDialog.cs" />
<Compile Include="Progressbar\Design\ProgressbarDesigner.cs" />
<Compile Include="Progressbar\EventArgs\ProgressbarValueChangedEventArgs.cs" />
<Compile Include="Progressbar\JQProgressbar.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Slider\Design\SliderDesigner.cs" />
<Compile Include="Slider\JQSlider.cs" />
<Compile Include="Slider\SliderDuration.cs" />
<Compile Include="Slider\SliderOrientation.cs" />
<Compile Include="Slider\SliderRange.cs" />
<Compile Include="Tabs\TabAnimationType.cs" />
<Compile Include="Tabs\Design\TabsDesigner.cs" />
<Compile Include="Tabs\EventArgs\TabsChangedEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsChangingEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsRemovedEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsRemovingEventArgs.cs" />
<Compile Include="Tabs\JqTabs.cs" />
<Compile Include="Tabs\Tab.cs" />
<Compile Include="Tabs\TabDuration.cs" />
<Compile Include="Tabs\TabChangeType.cs" />
<Compile Include="Tabs\TabCollectionEditor.cs" />
<Compile Include="Tabs\TabOrientation.cs" />
</ItemGroup>
<ItemGroup>
- <Folder Include="AutoComplete\Design\" />
<Folder Include="AutoComplete\EventArgs\" />
<Folder Include="Button\EventArgs\" />
<Folder Include="DatePicker\EventArgs\" />
<Folder Include="Dialog\EventArgs\" />
<Folder Include="Slider\EventArgs\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
diff --git a/Atom.Web/AutoComplete/JQAutoComplete.cs b/Atom.Web/AutoComplete/JQAutoComplete.cs
index 5be7392..228228f 100644
--- a/Atom.Web/AutoComplete/JQAutoComplete.cs
+++ b/Atom.Web/AutoComplete/JQAutoComplete.cs
@@ -1,11 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Web.UI.WebControls;
+using System.Web;
+using System.Security.Permissions;
+using System.Web.UI;
+using System.ComponentModel;
namespace Atom.Web.UI.WebControls.AutoComplete
{
- public class JQAutoComplete
+ [
+ AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
+ AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
+ Designer(typeof(AutoCompleteDesigner)),
+ ToolboxData("<{0}:JQAutoComplete runat=\"server\"> </{0}:JQAutoComplete>")
+ ]
+ public class JQAutoComplete : WebControl
{
+ private string RenderStartupJavaScript()
+ {
+ StringBuilder startupScript = new StringBuilder();
+
+ startupScript.AppendFormat("<script type=\"text/javascript\">");
+ startupScript.AppendFormat("var " + this.UniqueID + "; ");
+ startupScript.AppendFormat("$(document).ready(function() {{ ");
+ startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
+ // startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
+
+ startupScript.AppendFormat("}});");
+
+ startupScript.AppendFormat("}})");
+ startupScript.AppendFormat("</script>");
+
+ return startupScript.ToString();
+ }
+
+ protected override void Render(HtmlTextWriter writer)
+ {
+ writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
+ writer.RenderBeginTag(HtmlTextWriterTag.Input);
+ writer.RenderEndTag();
+
+
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
+ string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
+
+ Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
+
+ base.OnPreRender(e);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 7344ffd..07a6813 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,192 +1,354 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
+
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
+
+ #region inherit properties
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override BorderStyle BorderStyle
+ {
+ get
+ {
+ return base.BorderStyle;
+ }
+ set
+ {
+ base.BorderStyle = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override Unit BorderWidth
+ {
+ get
+ {
+ return base.BorderWidth;
+ }
+ set
+ {
+ base.BorderWidth = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return base.BorderColor;
+ }
+ set
+ {
+ base.BorderColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override FontInfo Font
+ {
+ get
+ {
+ return base.Font;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override bool EnableTheming
+ {
+ get
+ {
+ return base.EnableTheming;
+ }
+ set
+ {
+ base.EnableTheming = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string ToolTip
+ {
+ get
+ {
+ return base.ToolTip;
+ }
+ set
+ {
+ base.ToolTip = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string SkinID
+ {
+ get
+ {
+ return base.SkinID;
+ }
+ set
+ {
+ base.SkinID = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color ForeColor
+ {
+ get
+ {
+ return base.ForeColor;
+ }
+ set
+ {
+ base.ForeColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string CssClass
+ {
+ get
+ {
+ return base.CssClass;
+ }
+ set
+ {
+ base.CssClass = value;
+ }
+ }
+
+ #endregion
}
}
diff --git a/Atom.Web/Properties/AssemblyInfo.cs b/Atom.Web/Properties/AssemblyInfo.cs
index 631c6d8..1110ccf 100644
--- a/Atom.Web/Properties/AssemblyInfo.cs
+++ b/Atom.Web/Properties/AssemblyInfo.cs
@@ -1,45 +1,46 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Web.UI;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Atom.Web")]
[assembly: TagPrefix("Atom.Web.UI.WebControls", "atom")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Accordion", "accordion")]
+[assembly: TagPrefix("Atom.Web.UI.WebControls.AutoComplete", "complete")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Progressbar", "progressbar")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Tabs", "tabs")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Dialog", "dialog")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Button", "button")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Slider", "slider")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.DatePicker", "calendar")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Atom.Web")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4312a669-223e-4bf6-8c8d-c31acb3c5a1f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Atom.Web/Slider/JQSlider.cs b/Atom.Web/Slider/JQSlider.cs
index 0a85fe5..d1a5c7d 100644
--- a/Atom.Web/Slider/JQSlider.cs
+++ b/Atom.Web/Slider/JQSlider.cs
@@ -1,388 +1,387 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using Atom.Web.UI.WebControls.Dialog;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.Slider
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
DefaultProperty(""),
Designer(typeof(SliderDesigner)),
ToolboxData("<{0}:JQSlider runat=\"server\"> </{0}:JQSlider>")
]
public class JQSlider : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".slider({{");
startupScript.AppendFormat(" max: {0},", this.MaxValue);
startupScript.AppendFormat(" min: {0},", this.MinValue);
startupScript.AppendFormat(" animate: '{0}',", this.Animation.ToString().ToLower());
startupScript.AppendFormat(" orientation: '{0}',", this.Orientation.ToString().ToLower());
startupScript.AppendFormat(" range: {0},", this.Range.ToString().ToLower());
startupScript.AppendFormat(" step: {0},", this.Step);
if (!string.IsNullOrEmpty(this.RangeValue.ToString()))
{
startupScript.AppendFormat(" value: {0},", this.Value);
}
else
{
startupScript.AppendFormat(" values: [{0},{1}],", this.Value, this.RangeValue);
}
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue(100)
]
public int MaxValue
{
get
{
object max = ViewState["MaxValueViewState"];
return (max == null) ? 100 : Convert.ToInt32(max);
}
set
{
ViewState["MaxValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int MinValue
{
get
{
object mix = ViewState["MixValueViewState"];
return (mix == null) ? 0 : Convert.ToInt32(mix);
}
set
{
ViewState["MixValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object val = (object)ViewState["ValueViewState"];
return (val == null) ? 0 : Convert.ToInt32(val);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Value")
]
public int RangeValue
{
get
{
object rangeValue = (object)ViewState["RangeValueViewState"];
return (rangeValue == null) ? this.Value : Convert.ToInt32(rangeValue);
}
set
{
ViewState["RangeValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int Step
{
get
{
object step = (object)ViewState["StepTypeViewState"];
return (step == null) ? 1 : Convert.ToInt32(step);
}
set
{
ViewState["StepTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderOrientation.Horizontal)
]
public SliderOrientation Orientation
{
get
{
object orientation = (object)ViewState["OrientationViewState"];
return (orientation == null) ? SliderOrientation.Horizontal : (SliderOrientation)orientation;
}
set
{
ViewState["OrientationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderDuration.Normal)
]
public SliderDuration Animation
{
get
{
object animation = (object)ViewState["AnimationViewState"];
return (animation == null) ? SliderDuration.Normal : (SliderDuration)animation;
}
set
{
ViewState["AnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderRange.False)
]
public SliderRange Range
{
get
{
object range = (object)ViewState["RangeViewState"];
return (range == null) ? SliderRange.False : (SliderRange)range;
}
set
{
ViewState["RangeViewState"] = value;
}
}
-
-
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
diff --git a/Atom.Web/Tabs/JqTabs.cs b/Atom.Web/Tabs/JqTabs.cs
index 2b78b7a..4b2ef6c 100644
--- a/Atom.Web/Tabs/JqTabs.cs
+++ b/Atom.Web/Tabs/JqTabs.cs
@@ -233,664 +233,665 @@ namespace Atom.Web.UI.WebControls.Tabs
startupScript.AppendFormat(".tabs-bottom .ui-tabs-panel {{ height: 140px; overflow: auto; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav {{ position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav li {{ margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-selected {{ margin-top: -3px !important; }}");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav {{ padding: .2em .1em .2em .2em; float: left; width: 12em; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li {{ clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li a {{ display:block; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected {{ padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-panel {{ padding: 1em; float: right; width: 40em;}}");
}
if (this.TabsRemove)
{
if (string.IsNullOrEmpty(this.CloseIconUrl))
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0;}}");
}
else
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0; background-image:url('"
+ this.CloseIconUrl + "')!important; background-position:center;}}");
}
}
startupScript.AppendFormat("</style>");
return startupScript.ToString();
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "'); ");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(this.UniqueID + ".attr('class','tabs-bottom');");
}
startupScript.AppendFormat(this.UniqueID + ".tabs({{");
//events
//remove
startupScript.AppendFormat(" remove: function(event, ui) {{ ");
if (Events[EventTabRemoving] != null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoving:'+$(ui.tab).attr('href').split('-')[1]); ");
}
if (Events[EventTabRemoved] != null)
{
if (Events[EventTabRemoving] == null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoved:'+$(ui.tab).attr('href').split('-')[1]); ");
}
}
startupScript.AppendFormat(" }},");
//select
startupScript.AppendFormat(" select: function(event, ui){{ $('#"
+ this.UniqueID + "hiddenValue').val('selectedtab:'+$(ui.panel).attr('id').split('-')[1]); ");
if (Events[EventSelectedIndexChanging] != null)
{
startupScript.AppendFormat(" __doPostBack('" + this.UniqueID + "','selectedindexchanging:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
if (Events[EventSelectedIndexChanged] != null)
{
if (Events[EventSelectedIndexChanging] == null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','selectedindexchanged:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
}
startupScript.AppendFormat(" }},");
//tabs remove
if (this.TabsRemove)
{
startupScript.AppendFormat(" tabTemplate:\"<li><a href='#{{href}}'>#{{label}}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>\",");
}
//collapsible
if (this.Collapsible)
{
startupScript.AppendFormat("collapsible: {0},", this.Collapsible.ToString().ToLower());
}
//animation and animation speed
if (this.Animate == TabAnimationType.Content)
{
startupScript.AppendFormat(" fx:{{opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.Height)
{
startupScript.AppendFormat(" fx:{{height: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.HeightAndContent)
{
startupScript.AppendFormat(" fx:{{height: 'toggle', opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
//tab change type
if (this.ChangeType == TabChangeType.MouseHover)
{
startupScript.AppendFormat(" event: 'mouseover',");
}
//selected tab
startupScript.AppendFormat(" selected: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
startupScript.AppendFormat("}})");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Top)
{
startupScript.AppendFormat(";");
}
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(";");
startupScript.AppendFormat(" $('.tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *')");
startupScript.AppendFormat(".removeClass('ui-corner-all ui-corner-top')");
startupScript.AppendFormat(".addClass('ui-corner-bottom'); ");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".addClass('ui-tabs-vertical ui-helper-clearfix'); $('#"
+ this.UniqueID + " li').removeClass('ui-corner-top').addClass('ui-corner-left'); ");
}
//tab remove js code
if (this.TabsRemove)
{
startupScript.AppendFormat("$('#" + this.UniqueID + " span.ui-icon-close').live('click', function() {{");
startupScript.AppendFormat("var index = $('li'," + this.UniqueID + ").index($(this).parent());");
startupScript.AppendFormat(this.UniqueID + ".tabs('remove', index);}});");
}
//tabs moving
if (this.TabsMoving)
{
startupScript.AppendFormat("$('#" + this.UniqueID + "').find('.ui-tabs-nav').sortable({{ ");
if (Events[EventTabMoved] != null)
{
startupScript.AppendFormat("stop: function(event, ui) {{ var oldPostion=$(ui.item).children('a').attr('href').split('-')[1];");
startupScript.AppendFormat("var newPostion=$(" + this.UniqueID + ").tabs().find('.ui-tabs-nav li').sortable('toArray').index(ui.item);");
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','tabmoved:'+oldPostion+':'+newPostion);}},");
}
//moving orientation
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(" axis:'y'}})");
}
else
{
startupScript.AppendFormat(" axis:'x'}})");
}
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:" + this.SelectedIndex.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderBeginTag(HtmlTextWriterTag.Ul);
foreach (Tab tab in this._tabsList)
{
writer.RenderBeginTag(HtmlTextWriterTag.Li);
writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.A);
writer.Write(tab.Header);
writer.RenderEndTag();
if (this.TabsRemove)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, "ui-icon ui-icon-close");
writer.RenderBeginTag(HtmlTextWriterTag.Span);
writer.Write("Remove Tab");
writer.RenderEndTag();
}
writer.RenderEndTag();
}
writer.RenderEndTag();
foreach (Tab tab in this._tabsList)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.Div);
foreach (Control control in tab.Controls)
{
control.RenderControl(writer);
}
writer.RenderEndTag();
}
writer.RenderEndTag();
base.RenderContents(writer);
}
public virtual void ClearSelection()
{
foreach (Tab item in this._tabsList)
{
item.Selected = false;
}
}
#region IPostBackEventHandler Members
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
//selecting event
if (eventArgument.StartsWith("selectedindexchanging"))
{
string[] values = eventArgument.Split(':');
int newIndex = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangingEventArgs args = new TabsChangingEventArgs(newIndex, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanging(args);
}
//selected event
if (eventArgument.StartsWith("selectedindexchanged"))
{
string[] values = eventArgument.Split(':');
int index = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangedEventArgs args = new TabsChangedEventArgs(index, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanged(args);
}
//removing event
if (eventArgument.StartsWith("tabremoving"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovingEventArgs args = new TabsRemovingEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoving(args);
}
//removed event
if (eventArgument.StartsWith("tabremoved"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovedEventArgs args = new TabsRemovedEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoved(args);
}
//moved event
if (eventArgument.StartsWith("tabmoved"))
{
string[] values = eventArgument.Split(':');
int oldPosition = Convert.ToInt32(values[1]);
int newPosition = Convert.ToInt32(values[2]);
ReorderTabItems(oldPosition, newPosition);
this.OnTabMoved(new EventArgs());
}
}
}
private void ReorderTabItems(int oldPosition, int newPosition)
{
Tab temp = this._tabsList[oldPosition];
this._tabsList[oldPosition] = this._tabsList[newPosition];
this._tabsList[newPosition] = temp;
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
#endregion
//Properties
[
Category("Behavior"),
Description(""),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
Editor(typeof(TabCollectionEditor), typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public List<Tab> Tabs
{
get
{
if (this._tabsList == null)
{
this._tabsList = new List<Tab>();
}
return _tabsList;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public int SelectedIndex
{
get
{
return this._selectedIndex;
}
set
{
this.ClearSelection();
this._tabsList[value].Selected = true;
this._selectedIndex = value;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public Tab SelectedTab
{
get
{
int selectedIndex = this.SelectedIndex;
if (selectedIndex >= 0)
{
return this._tabsList[selectedIndex];
}
return null;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public string CloseIconUrl
{
get
{
object icon = ViewState["CloseIconUrlViewState"];
return (icon == null) ? string.Empty : icon.ToString();
}
set
{
ViewState["CloseIconUrlViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabAnimationType.None)
]
public TabAnimationType Animate
{
get
{
object animation = (object)ViewState["AnimateViewState"];
return (animation == null) ? TabAnimationType.None : (TabAnimationType)animation;
}
set
{
ViewState["AnimateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabOrientation.Top)
]
public TabOrientation TabAppearanceType
{
get
{
object appearance = (object)ViewState["TabAppearanceTypeViewState"];
return (appearance == null) ? TabOrientation.Top : (TabOrientation)appearance;
}
set
{
ViewState["TabAppearanceTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabChangeType.MouseClick)
]
public TabChangeType ChangeType
{
get
{
object changeType = (object)ViewState["TabChangeTypeViewState"];
return (changeType == null) ? TabChangeType.MouseClick : (TabChangeType)changeType;
}
set
{
ViewState["TabChangeTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabDuration.Normal)
]
public TabDuration AnimationSpeed
{
get
{
object animationSpeed = (object)ViewState["AnimationSpeedViewState"];
return (animationSpeed == null) ? TabDuration.Normal : (TabDuration)animationSpeed;
}
set
{
ViewState["AnimationSpeedViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Collapsible
{
get
{
object collapsible = (object)ViewState["CollapsibleViewState"];
return (collapsible == null) ? false : (bool)collapsible;
}
set
{
ViewState["CollapsibleViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsRemove
{
get
{
object tabsRemove = (object)ViewState["TabsRemoveViewState"];
return (tabsRemove == null) ? false : (bool)tabsRemove;
}
set
{
ViewState["TabsRemoveViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsMoving
{
get
{
object tabsMoving = (object)ViewState["TabsMovingViewState"];
return (tabsMoving == null) ? false : (bool)tabsMoving;
}
set
{
ViewState["TabsMovingViewState"] = value;
}
}
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
diff --git a/TestApp/AutoComplete.aspx b/TestApp/AutoComplete.aspx
index 7cf3cc3..8f3ae12 100644
--- a/TestApp/AutoComplete.aspx
+++ b/TestApp/AutoComplete.aspx
@@ -1,22 +1,29 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AutoComplete.aspx.cs" Inherits="TestApp.AutoComplete" %>
+<%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls.AutoComplete"
+ TagPrefix="complete" %>
+
+
+
+
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title> <link href="themes/base/ui.all.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
-
+ <complete:JQAutoComplete ID="JQAutoComplete1" runat="server" />
</div>
</form>
</body>
</html>
diff --git a/TestApp/AutoComplete.aspx.designer.cs b/TestApp/AutoComplete.aspx.designer.cs
index 308350c..816bf4c 100644
--- a/TestApp/AutoComplete.aspx.designer.cs
+++ b/TestApp/AutoComplete.aspx.designer.cs
@@ -1,26 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace TestApp
-{
-
-
- public partial class AutoComplete
- {
-
+namespace TestApp {
+
+
+ public partial class AutoComplete {
+
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ /// <summary>
+ /// JQAutoComplete1 control.
+ /// </summary>
+ /// <remarks>
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ /// </remarks>
+ protected global::Atom.Web.UI.WebControls.AutoComplete.JQAutoComplete JQAutoComplete1;
}
}
|
sila/AtomProject
|
632c0d4b682c4caeafff7b8259e3b7a1f80501ac
|
add prefix for autocomplete namespace
|
diff --git a/Atom.Web/Atom.Web.csproj b/Atom.Web/Atom.Web.csproj
index dbb1742..09aaeae 100644
--- a/Atom.Web/Atom.Web.csproj
+++ b/Atom.Web/Atom.Web.csproj
@@ -1,106 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E56668B1-FEE9-43C8-92B7-DAC1B568D29E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Atom.Web.UI.WebControls</RootNamespace>
<AssemblyName>Atom.Web</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Nonshipping>true</Nonshipping>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<Compile Include="Accordion\AccordionDuration.cs" />
<Compile Include="Accordion\Design\AccordionDesigner.cs" />
<Compile Include="Accordion\EventArgs\AccordionChangedEventArgs.cs" />
<Compile Include="Accordion\EventArgs\AccordionChangingEventArgs.cs" />
<Compile Include="Accordion\Item.cs" />
<Compile Include="Accordion\ItemChangeType.cs" />
<Compile Include="Accordion\ItemCollectionEditor.cs" />
<Compile Include="Accordion\JQAccordion.cs" />
+ <Compile Include="AutoComplete\Design\AutoCompleteDesigner.cs" />
<Compile Include="AutoComplete\JQAutoComplete.cs" />
<Compile Include="Button\ButtonType.cs" />
<Compile Include="Button\Design\ButtonDesigner.cs" />
<Compile Include="Button\JQButton.cs" />
<Compile Include="DatePicker\DatePickerAnimation.cs" />
<Compile Include="DatePicker\DatePickerDuration.cs" />
<Compile Include="DatePicker\DatePickerMode.cs" />
<Compile Include="DatePicker\DatePickerShowOn.cs" />
<Compile Include="DatePicker\Design\DatePickerDesigner.cs" />
<Compile Include="DatePicker\JQDatePicker.cs" />
<Compile Include="Dialog\Design\DialogDesigner.cs" />
<Compile Include="Dialog\DialogAnimation.cs" />
<Compile Include="Dialog\DialogPosition.cs" />
<Compile Include="Dialog\JQDialog.cs" />
<Compile Include="Progressbar\Design\ProgressbarDesigner.cs" />
<Compile Include="Progressbar\EventArgs\ProgressbarValueChangedEventArgs.cs" />
<Compile Include="Progressbar\JQProgressbar.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Slider\Design\SliderDesigner.cs" />
<Compile Include="Slider\JQSlider.cs" />
<Compile Include="Slider\SliderDuration.cs" />
<Compile Include="Slider\SliderOrientation.cs" />
<Compile Include="Slider\SliderRange.cs" />
<Compile Include="Tabs\TabAnimationType.cs" />
<Compile Include="Tabs\Design\TabsDesigner.cs" />
<Compile Include="Tabs\EventArgs\TabsChangedEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsChangingEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsRemovedEventArgs.cs" />
<Compile Include="Tabs\EventArgs\TabsRemovingEventArgs.cs" />
<Compile Include="Tabs\JqTabs.cs" />
<Compile Include="Tabs\Tab.cs" />
<Compile Include="Tabs\TabDuration.cs" />
<Compile Include="Tabs\TabChangeType.cs" />
<Compile Include="Tabs\TabCollectionEditor.cs" />
<Compile Include="Tabs\TabOrientation.cs" />
</ItemGroup>
<ItemGroup>
- <Folder Include="AutoComplete\Design\" />
<Folder Include="AutoComplete\EventArgs\" />
<Folder Include="Button\EventArgs\" />
<Folder Include="DatePicker\EventArgs\" />
<Folder Include="Dialog\EventArgs\" />
<Folder Include="Slider\EventArgs\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
diff --git a/Atom.Web/AutoComplete/JQAutoComplete.cs b/Atom.Web/AutoComplete/JQAutoComplete.cs
index 5be7392..228228f 100644
--- a/Atom.Web/AutoComplete/JQAutoComplete.cs
+++ b/Atom.Web/AutoComplete/JQAutoComplete.cs
@@ -1,11 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Web.UI.WebControls;
+using System.Web;
+using System.Security.Permissions;
+using System.Web.UI;
+using System.ComponentModel;
namespace Atom.Web.UI.WebControls.AutoComplete
{
- public class JQAutoComplete
+ [
+ AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
+ AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
+ Designer(typeof(AutoCompleteDesigner)),
+ ToolboxData("<{0}:JQAutoComplete runat=\"server\"> </{0}:JQAutoComplete>")
+ ]
+ public class JQAutoComplete : WebControl
{
+ private string RenderStartupJavaScript()
+ {
+ StringBuilder startupScript = new StringBuilder();
+
+ startupScript.AppendFormat("<script type=\"text/javascript\">");
+ startupScript.AppendFormat("var " + this.UniqueID + "; ");
+ startupScript.AppendFormat("$(document).ready(function() {{ ");
+ startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
+ // startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
+
+ startupScript.AppendFormat("}});");
+
+ startupScript.AppendFormat("}})");
+ startupScript.AppendFormat("</script>");
+
+ return startupScript.ToString();
+ }
+
+ protected override void Render(HtmlTextWriter writer)
+ {
+ writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
+ writer.RenderBeginTag(HtmlTextWriterTag.Input);
+ writer.RenderEndTag();
+
+
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
+ string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
+
+ Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
+
+ base.OnPreRender(e);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 7344ffd..07a6813 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,192 +1,354 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
+
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
+
+ #region inherit properties
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override BorderStyle BorderStyle
+ {
+ get
+ {
+ return base.BorderStyle;
+ }
+ set
+ {
+ base.BorderStyle = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override Unit BorderWidth
+ {
+ get
+ {
+ return base.BorderWidth;
+ }
+ set
+ {
+ base.BorderWidth = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return base.BorderColor;
+ }
+ set
+ {
+ base.BorderColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override FontInfo Font
+ {
+ get
+ {
+ return base.Font;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override bool EnableTheming
+ {
+ get
+ {
+ return base.EnableTheming;
+ }
+ set
+ {
+ base.EnableTheming = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string ToolTip
+ {
+ get
+ {
+ return base.ToolTip;
+ }
+ set
+ {
+ base.ToolTip = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string SkinID
+ {
+ get
+ {
+ return base.SkinID;
+ }
+ set
+ {
+ base.SkinID = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color ForeColor
+ {
+ get
+ {
+ return base.ForeColor;
+ }
+ set
+ {
+ base.ForeColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string CssClass
+ {
+ get
+ {
+ return base.CssClass;
+ }
+ set
+ {
+ base.CssClass = value;
+ }
+ }
+
+ #endregion
}
}
diff --git a/Atom.Web/Properties/AssemblyInfo.cs b/Atom.Web/Properties/AssemblyInfo.cs
index 631c6d8..1110ccf 100644
--- a/Atom.Web/Properties/AssemblyInfo.cs
+++ b/Atom.Web/Properties/AssemblyInfo.cs
@@ -1,45 +1,46 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Web.UI;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Atom.Web")]
[assembly: TagPrefix("Atom.Web.UI.WebControls", "atom")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Accordion", "accordion")]
+[assembly: TagPrefix("Atom.Web.UI.WebControls.AutoComplete", "complete")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Progressbar", "progressbar")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Tabs", "tabs")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Dialog", "dialog")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Button", "button")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.Slider", "slider")]
[assembly: TagPrefix("Atom.Web.UI.WebControls.DatePicker", "calendar")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Atom.Web")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4312a669-223e-4bf6-8c8d-c31acb3c5a1f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Atom.Web/Slider/JQSlider.cs b/Atom.Web/Slider/JQSlider.cs
index 0a85fe5..d1a5c7d 100644
--- a/Atom.Web/Slider/JQSlider.cs
+++ b/Atom.Web/Slider/JQSlider.cs
@@ -1,388 +1,387 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using Atom.Web.UI.WebControls.Dialog;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.Slider
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
DefaultProperty(""),
Designer(typeof(SliderDesigner)),
ToolboxData("<{0}:JQSlider runat=\"server\"> </{0}:JQSlider>")
]
public class JQSlider : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".slider({{");
startupScript.AppendFormat(" max: {0},", this.MaxValue);
startupScript.AppendFormat(" min: {0},", this.MinValue);
startupScript.AppendFormat(" animate: '{0}',", this.Animation.ToString().ToLower());
startupScript.AppendFormat(" orientation: '{0}',", this.Orientation.ToString().ToLower());
startupScript.AppendFormat(" range: {0},", this.Range.ToString().ToLower());
startupScript.AppendFormat(" step: {0},", this.Step);
if (!string.IsNullOrEmpty(this.RangeValue.ToString()))
{
startupScript.AppendFormat(" value: {0},", this.Value);
}
else
{
startupScript.AppendFormat(" values: [{0},{1}],", this.Value, this.RangeValue);
}
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue(100)
]
public int MaxValue
{
get
{
object max = ViewState["MaxValueViewState"];
return (max == null) ? 100 : Convert.ToInt32(max);
}
set
{
ViewState["MaxValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int MinValue
{
get
{
object mix = ViewState["MixValueViewState"];
return (mix == null) ? 0 : Convert.ToInt32(mix);
}
set
{
ViewState["MixValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object val = (object)ViewState["ValueViewState"];
return (val == null) ? 0 : Convert.ToInt32(val);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Value")
]
public int RangeValue
{
get
{
object rangeValue = (object)ViewState["RangeValueViewState"];
return (rangeValue == null) ? this.Value : Convert.ToInt32(rangeValue);
}
set
{
ViewState["RangeValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int Step
{
get
{
object step = (object)ViewState["StepTypeViewState"];
return (step == null) ? 1 : Convert.ToInt32(step);
}
set
{
ViewState["StepTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderOrientation.Horizontal)
]
public SliderOrientation Orientation
{
get
{
object orientation = (object)ViewState["OrientationViewState"];
return (orientation == null) ? SliderOrientation.Horizontal : (SliderOrientation)orientation;
}
set
{
ViewState["OrientationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderDuration.Normal)
]
public SliderDuration Animation
{
get
{
object animation = (object)ViewState["AnimationViewState"];
return (animation == null) ? SliderDuration.Normal : (SliderDuration)animation;
}
set
{
ViewState["AnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderRange.False)
]
public SliderRange Range
{
get
{
object range = (object)ViewState["RangeViewState"];
return (range == null) ? SliderRange.False : (SliderRange)range;
}
set
{
ViewState["RangeViewState"] = value;
}
}
-
-
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
diff --git a/Atom.Web/Tabs/JqTabs.cs b/Atom.Web/Tabs/JqTabs.cs
index 2b78b7a..4b2ef6c 100644
--- a/Atom.Web/Tabs/JqTabs.cs
+++ b/Atom.Web/Tabs/JqTabs.cs
@@ -233,664 +233,665 @@ namespace Atom.Web.UI.WebControls.Tabs
startupScript.AppendFormat(".tabs-bottom .ui-tabs-panel {{ height: 140px; overflow: auto; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav {{ position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav li {{ margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-selected {{ margin-top: -3px !important; }}");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav {{ padding: .2em .1em .2em .2em; float: left; width: 12em; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li {{ clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li a {{ display:block; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected {{ padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-panel {{ padding: 1em; float: right; width: 40em;}}");
}
if (this.TabsRemove)
{
if (string.IsNullOrEmpty(this.CloseIconUrl))
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0;}}");
}
else
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0; background-image:url('"
+ this.CloseIconUrl + "')!important; background-position:center;}}");
}
}
startupScript.AppendFormat("</style>");
return startupScript.ToString();
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "'); ");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(this.UniqueID + ".attr('class','tabs-bottom');");
}
startupScript.AppendFormat(this.UniqueID + ".tabs({{");
//events
//remove
startupScript.AppendFormat(" remove: function(event, ui) {{ ");
if (Events[EventTabRemoving] != null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoving:'+$(ui.tab).attr('href').split('-')[1]); ");
}
if (Events[EventTabRemoved] != null)
{
if (Events[EventTabRemoving] == null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoved:'+$(ui.tab).attr('href').split('-')[1]); ");
}
}
startupScript.AppendFormat(" }},");
//select
startupScript.AppendFormat(" select: function(event, ui){{ $('#"
+ this.UniqueID + "hiddenValue').val('selectedtab:'+$(ui.panel).attr('id').split('-')[1]); ");
if (Events[EventSelectedIndexChanging] != null)
{
startupScript.AppendFormat(" __doPostBack('" + this.UniqueID + "','selectedindexchanging:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
if (Events[EventSelectedIndexChanged] != null)
{
if (Events[EventSelectedIndexChanging] == null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','selectedindexchanged:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
}
startupScript.AppendFormat(" }},");
//tabs remove
if (this.TabsRemove)
{
startupScript.AppendFormat(" tabTemplate:\"<li><a href='#{{href}}'>#{{label}}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>\",");
}
//collapsible
if (this.Collapsible)
{
startupScript.AppendFormat("collapsible: {0},", this.Collapsible.ToString().ToLower());
}
//animation and animation speed
if (this.Animate == TabAnimationType.Content)
{
startupScript.AppendFormat(" fx:{{opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.Height)
{
startupScript.AppendFormat(" fx:{{height: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.HeightAndContent)
{
startupScript.AppendFormat(" fx:{{height: 'toggle', opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
//tab change type
if (this.ChangeType == TabChangeType.MouseHover)
{
startupScript.AppendFormat(" event: 'mouseover',");
}
//selected tab
startupScript.AppendFormat(" selected: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
startupScript.AppendFormat("}})");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Top)
{
startupScript.AppendFormat(";");
}
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(";");
startupScript.AppendFormat(" $('.tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *')");
startupScript.AppendFormat(".removeClass('ui-corner-all ui-corner-top')");
startupScript.AppendFormat(".addClass('ui-corner-bottom'); ");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".addClass('ui-tabs-vertical ui-helper-clearfix'); $('#"
+ this.UniqueID + " li').removeClass('ui-corner-top').addClass('ui-corner-left'); ");
}
//tab remove js code
if (this.TabsRemove)
{
startupScript.AppendFormat("$('#" + this.UniqueID + " span.ui-icon-close').live('click', function() {{");
startupScript.AppendFormat("var index = $('li'," + this.UniqueID + ").index($(this).parent());");
startupScript.AppendFormat(this.UniqueID + ".tabs('remove', index);}});");
}
//tabs moving
if (this.TabsMoving)
{
startupScript.AppendFormat("$('#" + this.UniqueID + "').find('.ui-tabs-nav').sortable({{ ");
if (Events[EventTabMoved] != null)
{
startupScript.AppendFormat("stop: function(event, ui) {{ var oldPostion=$(ui.item).children('a').attr('href').split('-')[1];");
startupScript.AppendFormat("var newPostion=$(" + this.UniqueID + ").tabs().find('.ui-tabs-nav li').sortable('toArray').index(ui.item);");
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','tabmoved:'+oldPostion+':'+newPostion);}},");
}
//moving orientation
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(" axis:'y'}})");
}
else
{
startupScript.AppendFormat(" axis:'x'}})");
}
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:" + this.SelectedIndex.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderBeginTag(HtmlTextWriterTag.Ul);
foreach (Tab tab in this._tabsList)
{
writer.RenderBeginTag(HtmlTextWriterTag.Li);
writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.A);
writer.Write(tab.Header);
writer.RenderEndTag();
if (this.TabsRemove)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, "ui-icon ui-icon-close");
writer.RenderBeginTag(HtmlTextWriterTag.Span);
writer.Write("Remove Tab");
writer.RenderEndTag();
}
writer.RenderEndTag();
}
writer.RenderEndTag();
foreach (Tab tab in this._tabsList)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.Div);
foreach (Control control in tab.Controls)
{
control.RenderControl(writer);
}
writer.RenderEndTag();
}
writer.RenderEndTag();
base.RenderContents(writer);
}
public virtual void ClearSelection()
{
foreach (Tab item in this._tabsList)
{
item.Selected = false;
}
}
#region IPostBackEventHandler Members
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
//selecting event
if (eventArgument.StartsWith("selectedindexchanging"))
{
string[] values = eventArgument.Split(':');
int newIndex = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangingEventArgs args = new TabsChangingEventArgs(newIndex, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanging(args);
}
//selected event
if (eventArgument.StartsWith("selectedindexchanged"))
{
string[] values = eventArgument.Split(':');
int index = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangedEventArgs args = new TabsChangedEventArgs(index, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanged(args);
}
//removing event
if (eventArgument.StartsWith("tabremoving"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovingEventArgs args = new TabsRemovingEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoving(args);
}
//removed event
if (eventArgument.StartsWith("tabremoved"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovedEventArgs args = new TabsRemovedEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoved(args);
}
//moved event
if (eventArgument.StartsWith("tabmoved"))
{
string[] values = eventArgument.Split(':');
int oldPosition = Convert.ToInt32(values[1]);
int newPosition = Convert.ToInt32(values[2]);
ReorderTabItems(oldPosition, newPosition);
this.OnTabMoved(new EventArgs());
}
}
}
private void ReorderTabItems(int oldPosition, int newPosition)
{
Tab temp = this._tabsList[oldPosition];
this._tabsList[oldPosition] = this._tabsList[newPosition];
this._tabsList[newPosition] = temp;
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
#endregion
//Properties
[
Category("Behavior"),
Description(""),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
Editor(typeof(TabCollectionEditor), typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public List<Tab> Tabs
{
get
{
if (this._tabsList == null)
{
this._tabsList = new List<Tab>();
}
return _tabsList;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public int SelectedIndex
{
get
{
return this._selectedIndex;
}
set
{
this.ClearSelection();
this._tabsList[value].Selected = true;
this._selectedIndex = value;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public Tab SelectedTab
{
get
{
int selectedIndex = this.SelectedIndex;
if (selectedIndex >= 0)
{
return this._tabsList[selectedIndex];
}
return null;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public string CloseIconUrl
{
get
{
object icon = ViewState["CloseIconUrlViewState"];
return (icon == null) ? string.Empty : icon.ToString();
}
set
{
ViewState["CloseIconUrlViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabAnimationType.None)
]
public TabAnimationType Animate
{
get
{
object animation = (object)ViewState["AnimateViewState"];
return (animation == null) ? TabAnimationType.None : (TabAnimationType)animation;
}
set
{
ViewState["AnimateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabOrientation.Top)
]
public TabOrientation TabAppearanceType
{
get
{
object appearance = (object)ViewState["TabAppearanceTypeViewState"];
return (appearance == null) ? TabOrientation.Top : (TabOrientation)appearance;
}
set
{
ViewState["TabAppearanceTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabChangeType.MouseClick)
]
public TabChangeType ChangeType
{
get
{
object changeType = (object)ViewState["TabChangeTypeViewState"];
return (changeType == null) ? TabChangeType.MouseClick : (TabChangeType)changeType;
}
set
{
ViewState["TabChangeTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabDuration.Normal)
]
public TabDuration AnimationSpeed
{
get
{
object animationSpeed = (object)ViewState["AnimationSpeedViewState"];
return (animationSpeed == null) ? TabDuration.Normal : (TabDuration)animationSpeed;
}
set
{
ViewState["AnimationSpeedViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Collapsible
{
get
{
object collapsible = (object)ViewState["CollapsibleViewState"];
return (collapsible == null) ? false : (bool)collapsible;
}
set
{
ViewState["CollapsibleViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsRemove
{
get
{
object tabsRemove = (object)ViewState["TabsRemoveViewState"];
return (tabsRemove == null) ? false : (bool)tabsRemove;
}
set
{
ViewState["TabsRemoveViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsMoving
{
get
{
object tabsMoving = (object)ViewState["TabsMovingViewState"];
return (tabsMoving == null) ? false : (bool)tabsMoving;
}
set
{
ViewState["TabsMovingViewState"] = value;
}
}
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
|
sila/AtomProject
|
715bde0790be9f75051080cbe3ceacd8eb5b05ac
|
add base structure for JQAutocomplete
|
diff --git a/Atom.Web/AutoComplete/JQAutoComplete.cs b/Atom.Web/AutoComplete/JQAutoComplete.cs
index 5be7392..228228f 100644
--- a/Atom.Web/AutoComplete/JQAutoComplete.cs
+++ b/Atom.Web/AutoComplete/JQAutoComplete.cs
@@ -1,11 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Web.UI.WebControls;
+using System.Web;
+using System.Security.Permissions;
+using System.Web.UI;
+using System.ComponentModel;
namespace Atom.Web.UI.WebControls.AutoComplete
{
- public class JQAutoComplete
+ [
+ AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
+ AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
+ Designer(typeof(AutoCompleteDesigner)),
+ ToolboxData("<{0}:JQAutoComplete runat=\"server\"> </{0}:JQAutoComplete>")
+ ]
+ public class JQAutoComplete : WebControl
{
+ private string RenderStartupJavaScript()
+ {
+ StringBuilder startupScript = new StringBuilder();
+
+ startupScript.AppendFormat("<script type=\"text/javascript\">");
+ startupScript.AppendFormat("var " + this.UniqueID + "; ");
+ startupScript.AppendFormat("$(document).ready(function() {{ ");
+ startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
+ // startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
+
+ startupScript.AppendFormat("}});");
+
+ startupScript.AppendFormat("}})");
+ startupScript.AppendFormat("</script>");
+
+ return startupScript.ToString();
+ }
+
+ protected override void Render(HtmlTextWriter writer)
+ {
+ writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
+ writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
+ writer.RenderBeginTag(HtmlTextWriterTag.Input);
+ writer.RenderEndTag();
+
+
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
+ string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
+
+ Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
+
+ base.OnPreRender(e);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 7344ffd..28fe1f2 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,192 +1,353 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
+
+ #region inherit properties
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override BorderStyle BorderStyle
+ {
+ get
+ {
+ return base.BorderStyle;
+ }
+ set
+ {
+ base.BorderStyle = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override Unit BorderWidth
+ {
+ get
+ {
+ return base.BorderWidth;
+ }
+ set
+ {
+ base.BorderWidth = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return base.BorderColor;
+ }
+ set
+ {
+ base.BorderColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override FontInfo Font
+ {
+ get
+ {
+ return base.Font;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override bool EnableTheming
+ {
+ get
+ {
+ return base.EnableTheming;
+ }
+ set
+ {
+ base.EnableTheming = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string ToolTip
+ {
+ get
+ {
+ return base.ToolTip;
+ }
+ set
+ {
+ base.ToolTip = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string SkinID
+ {
+ get
+ {
+ return base.SkinID;
+ }
+ set
+ {
+ base.SkinID = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color ForeColor
+ {
+ get
+ {
+ return base.ForeColor;
+ }
+ set
+ {
+ base.ForeColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string CssClass
+ {
+ get
+ {
+ return base.CssClass;
+ }
+ set
+ {
+ base.CssClass = value;
+ }
+ }
+
+ #endregion
}
}
diff --git a/Atom.Web/Slider/JQSlider.cs b/Atom.Web/Slider/JQSlider.cs
index 0a85fe5..d1a5c7d 100644
--- a/Atom.Web/Slider/JQSlider.cs
+++ b/Atom.Web/Slider/JQSlider.cs
@@ -1,388 +1,387 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using Atom.Web.UI.WebControls.Dialog;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.Slider
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
DefaultProperty(""),
Designer(typeof(SliderDesigner)),
ToolboxData("<{0}:JQSlider runat=\"server\"> </{0}:JQSlider>")
]
public class JQSlider : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".slider({{");
startupScript.AppendFormat(" max: {0},", this.MaxValue);
startupScript.AppendFormat(" min: {0},", this.MinValue);
startupScript.AppendFormat(" animate: '{0}',", this.Animation.ToString().ToLower());
startupScript.AppendFormat(" orientation: '{0}',", this.Orientation.ToString().ToLower());
startupScript.AppendFormat(" range: {0},", this.Range.ToString().ToLower());
startupScript.AppendFormat(" step: {0},", this.Step);
if (!string.IsNullOrEmpty(this.RangeValue.ToString()))
{
startupScript.AppendFormat(" value: {0},", this.Value);
}
else
{
startupScript.AppendFormat(" values: [{0},{1}],", this.Value, this.RangeValue);
}
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue(100)
]
public int MaxValue
{
get
{
object max = ViewState["MaxValueViewState"];
return (max == null) ? 100 : Convert.ToInt32(max);
}
set
{
ViewState["MaxValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int MinValue
{
get
{
object mix = ViewState["MixValueViewState"];
return (mix == null) ? 0 : Convert.ToInt32(mix);
}
set
{
ViewState["MixValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object val = (object)ViewState["ValueViewState"];
return (val == null) ? 0 : Convert.ToInt32(val);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Value")
]
public int RangeValue
{
get
{
object rangeValue = (object)ViewState["RangeValueViewState"];
return (rangeValue == null) ? this.Value : Convert.ToInt32(rangeValue);
}
set
{
ViewState["RangeValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int Step
{
get
{
object step = (object)ViewState["StepTypeViewState"];
return (step == null) ? 1 : Convert.ToInt32(step);
}
set
{
ViewState["StepTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderOrientation.Horizontal)
]
public SliderOrientation Orientation
{
get
{
object orientation = (object)ViewState["OrientationViewState"];
return (orientation == null) ? SliderOrientation.Horizontal : (SliderOrientation)orientation;
}
set
{
ViewState["OrientationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderDuration.Normal)
]
public SliderDuration Animation
{
get
{
object animation = (object)ViewState["AnimationViewState"];
return (animation == null) ? SliderDuration.Normal : (SliderDuration)animation;
}
set
{
ViewState["AnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderRange.False)
]
public SliderRange Range
{
get
{
object range = (object)ViewState["RangeViewState"];
return (range == null) ? SliderRange.False : (SliderRange)range;
}
set
{
ViewState["RangeViewState"] = value;
}
}
-
-
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
diff --git a/Atom.Web/Tabs/JqTabs.cs b/Atom.Web/Tabs/JqTabs.cs
index 2b78b7a..4b2ef6c 100644
--- a/Atom.Web/Tabs/JqTabs.cs
+++ b/Atom.Web/Tabs/JqTabs.cs
@@ -233,664 +233,665 @@ namespace Atom.Web.UI.WebControls.Tabs
startupScript.AppendFormat(".tabs-bottom .ui-tabs-panel {{ height: 140px; overflow: auto; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav {{ position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav li {{ margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-selected {{ margin-top: -3px !important; }}");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav {{ padding: .2em .1em .2em .2em; float: left; width: 12em; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li {{ clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li a {{ display:block; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected {{ padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-panel {{ padding: 1em; float: right; width: 40em;}}");
}
if (this.TabsRemove)
{
if (string.IsNullOrEmpty(this.CloseIconUrl))
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0;}}");
}
else
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0; background-image:url('"
+ this.CloseIconUrl + "')!important; background-position:center;}}");
}
}
startupScript.AppendFormat("</style>");
return startupScript.ToString();
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "'); ");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(this.UniqueID + ".attr('class','tabs-bottom');");
}
startupScript.AppendFormat(this.UniqueID + ".tabs({{");
//events
//remove
startupScript.AppendFormat(" remove: function(event, ui) {{ ");
if (Events[EventTabRemoving] != null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoving:'+$(ui.tab).attr('href').split('-')[1]); ");
}
if (Events[EventTabRemoved] != null)
{
if (Events[EventTabRemoving] == null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoved:'+$(ui.tab).attr('href').split('-')[1]); ");
}
}
startupScript.AppendFormat(" }},");
//select
startupScript.AppendFormat(" select: function(event, ui){{ $('#"
+ this.UniqueID + "hiddenValue').val('selectedtab:'+$(ui.panel).attr('id').split('-')[1]); ");
if (Events[EventSelectedIndexChanging] != null)
{
startupScript.AppendFormat(" __doPostBack('" + this.UniqueID + "','selectedindexchanging:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
if (Events[EventSelectedIndexChanged] != null)
{
if (Events[EventSelectedIndexChanging] == null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','selectedindexchanged:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
}
startupScript.AppendFormat(" }},");
//tabs remove
if (this.TabsRemove)
{
startupScript.AppendFormat(" tabTemplate:\"<li><a href='#{{href}}'>#{{label}}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>\",");
}
//collapsible
if (this.Collapsible)
{
startupScript.AppendFormat("collapsible: {0},", this.Collapsible.ToString().ToLower());
}
//animation and animation speed
if (this.Animate == TabAnimationType.Content)
{
startupScript.AppendFormat(" fx:{{opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.Height)
{
startupScript.AppendFormat(" fx:{{height: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.HeightAndContent)
{
startupScript.AppendFormat(" fx:{{height: 'toggle', opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
//tab change type
if (this.ChangeType == TabChangeType.MouseHover)
{
startupScript.AppendFormat(" event: 'mouseover',");
}
//selected tab
startupScript.AppendFormat(" selected: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
startupScript.AppendFormat("}})");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Top)
{
startupScript.AppendFormat(";");
}
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(";");
startupScript.AppendFormat(" $('.tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *')");
startupScript.AppendFormat(".removeClass('ui-corner-all ui-corner-top')");
startupScript.AppendFormat(".addClass('ui-corner-bottom'); ");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".addClass('ui-tabs-vertical ui-helper-clearfix'); $('#"
+ this.UniqueID + " li').removeClass('ui-corner-top').addClass('ui-corner-left'); ");
}
//tab remove js code
if (this.TabsRemove)
{
startupScript.AppendFormat("$('#" + this.UniqueID + " span.ui-icon-close').live('click', function() {{");
startupScript.AppendFormat("var index = $('li'," + this.UniqueID + ").index($(this).parent());");
startupScript.AppendFormat(this.UniqueID + ".tabs('remove', index);}});");
}
//tabs moving
if (this.TabsMoving)
{
startupScript.AppendFormat("$('#" + this.UniqueID + "').find('.ui-tabs-nav').sortable({{ ");
if (Events[EventTabMoved] != null)
{
startupScript.AppendFormat("stop: function(event, ui) {{ var oldPostion=$(ui.item).children('a').attr('href').split('-')[1];");
startupScript.AppendFormat("var newPostion=$(" + this.UniqueID + ").tabs().find('.ui-tabs-nav li').sortable('toArray').index(ui.item);");
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','tabmoved:'+oldPostion+':'+newPostion);}},");
}
//moving orientation
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(" axis:'y'}})");
}
else
{
startupScript.AppendFormat(" axis:'x'}})");
}
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:" + this.SelectedIndex.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderBeginTag(HtmlTextWriterTag.Ul);
foreach (Tab tab in this._tabsList)
{
writer.RenderBeginTag(HtmlTextWriterTag.Li);
writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.A);
writer.Write(tab.Header);
writer.RenderEndTag();
if (this.TabsRemove)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, "ui-icon ui-icon-close");
writer.RenderBeginTag(HtmlTextWriterTag.Span);
writer.Write("Remove Tab");
writer.RenderEndTag();
}
writer.RenderEndTag();
}
writer.RenderEndTag();
foreach (Tab tab in this._tabsList)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.Div);
foreach (Control control in tab.Controls)
{
control.RenderControl(writer);
}
writer.RenderEndTag();
}
writer.RenderEndTag();
base.RenderContents(writer);
}
public virtual void ClearSelection()
{
foreach (Tab item in this._tabsList)
{
item.Selected = false;
}
}
#region IPostBackEventHandler Members
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
//selecting event
if (eventArgument.StartsWith("selectedindexchanging"))
{
string[] values = eventArgument.Split(':');
int newIndex = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangingEventArgs args = new TabsChangingEventArgs(newIndex, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanging(args);
}
//selected event
if (eventArgument.StartsWith("selectedindexchanged"))
{
string[] values = eventArgument.Split(':');
int index = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangedEventArgs args = new TabsChangedEventArgs(index, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanged(args);
}
//removing event
if (eventArgument.StartsWith("tabremoving"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovingEventArgs args = new TabsRemovingEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoving(args);
}
//removed event
if (eventArgument.StartsWith("tabremoved"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovedEventArgs args = new TabsRemovedEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoved(args);
}
//moved event
if (eventArgument.StartsWith("tabmoved"))
{
string[] values = eventArgument.Split(':');
int oldPosition = Convert.ToInt32(values[1]);
int newPosition = Convert.ToInt32(values[2]);
ReorderTabItems(oldPosition, newPosition);
this.OnTabMoved(new EventArgs());
}
}
}
private void ReorderTabItems(int oldPosition, int newPosition)
{
Tab temp = this._tabsList[oldPosition];
this._tabsList[oldPosition] = this._tabsList[newPosition];
this._tabsList[newPosition] = temp;
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
#endregion
//Properties
[
Category("Behavior"),
Description(""),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
Editor(typeof(TabCollectionEditor), typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public List<Tab> Tabs
{
get
{
if (this._tabsList == null)
{
this._tabsList = new List<Tab>();
}
return _tabsList;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public int SelectedIndex
{
get
{
return this._selectedIndex;
}
set
{
this.ClearSelection();
this._tabsList[value].Selected = true;
this._selectedIndex = value;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public Tab SelectedTab
{
get
{
int selectedIndex = this.SelectedIndex;
if (selectedIndex >= 0)
{
return this._tabsList[selectedIndex];
}
return null;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public string CloseIconUrl
{
get
{
object icon = ViewState["CloseIconUrlViewState"];
return (icon == null) ? string.Empty : icon.ToString();
}
set
{
ViewState["CloseIconUrlViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabAnimationType.None)
]
public TabAnimationType Animate
{
get
{
object animation = (object)ViewState["AnimateViewState"];
return (animation == null) ? TabAnimationType.None : (TabAnimationType)animation;
}
set
{
ViewState["AnimateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabOrientation.Top)
]
public TabOrientation TabAppearanceType
{
get
{
object appearance = (object)ViewState["TabAppearanceTypeViewState"];
return (appearance == null) ? TabOrientation.Top : (TabOrientation)appearance;
}
set
{
ViewState["TabAppearanceTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabChangeType.MouseClick)
]
public TabChangeType ChangeType
{
get
{
object changeType = (object)ViewState["TabChangeTypeViewState"];
return (changeType == null) ? TabChangeType.MouseClick : (TabChangeType)changeType;
}
set
{
ViewState["TabChangeTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabDuration.Normal)
]
public TabDuration AnimationSpeed
{
get
{
object animationSpeed = (object)ViewState["AnimationSpeedViewState"];
return (animationSpeed == null) ? TabDuration.Normal : (TabDuration)animationSpeed;
}
set
{
ViewState["AnimationSpeedViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Collapsible
{
get
{
object collapsible = (object)ViewState["CollapsibleViewState"];
return (collapsible == null) ? false : (bool)collapsible;
}
set
{
ViewState["CollapsibleViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsRemove
{
get
{
object tabsRemove = (object)ViewState["TabsRemoveViewState"];
return (tabsRemove == null) ? false : (bool)tabsRemove;
}
set
{
ViewState["TabsRemoveViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsMoving
{
get
{
object tabsMoving = (object)ViewState["TabsMovingViewState"];
return (tabsMoving == null) ? false : (bool)tabsMoving;
}
set
{
ViewState["TabsMovingViewState"] = value;
}
}
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
|
sila/AtomProject
|
9ed326b18fa91bca8c5f0c02746caa2f7ee02abe
|
add regions
|
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 7344ffd..28fe1f2 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,192 +1,353 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
+
+ #region inherit properties
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override BorderStyle BorderStyle
+ {
+ get
+ {
+ return base.BorderStyle;
+ }
+ set
+ {
+ base.BorderStyle = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override Unit BorderWidth
+ {
+ get
+ {
+ return base.BorderWidth;
+ }
+ set
+ {
+ base.BorderWidth = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return base.BorderColor;
+ }
+ set
+ {
+ base.BorderColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override FontInfo Font
+ {
+ get
+ {
+ return base.Font;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override bool EnableTheming
+ {
+ get
+ {
+ return base.EnableTheming;
+ }
+ set
+ {
+ base.EnableTheming = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string ToolTip
+ {
+ get
+ {
+ return base.ToolTip;
+ }
+ set
+ {
+ base.ToolTip = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string SkinID
+ {
+ get
+ {
+ return base.SkinID;
+ }
+ set
+ {
+ base.SkinID = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color ForeColor
+ {
+ get
+ {
+ return base.ForeColor;
+ }
+ set
+ {
+ base.ForeColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string CssClass
+ {
+ get
+ {
+ return base.CssClass;
+ }
+ set
+ {
+ base.CssClass = value;
+ }
+ }
+
+ #endregion
}
}
diff --git a/Atom.Web/Slider/JQSlider.cs b/Atom.Web/Slider/JQSlider.cs
index 0a85fe5..d1a5c7d 100644
--- a/Atom.Web/Slider/JQSlider.cs
+++ b/Atom.Web/Slider/JQSlider.cs
@@ -1,388 +1,387 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using Atom.Web.UI.WebControls.Dialog;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.Slider
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
DefaultProperty(""),
Designer(typeof(SliderDesigner)),
ToolboxData("<{0}:JQSlider runat=\"server\"> </{0}:JQSlider>")
]
public class JQSlider : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".slider({{");
startupScript.AppendFormat(" max: {0},", this.MaxValue);
startupScript.AppendFormat(" min: {0},", this.MinValue);
startupScript.AppendFormat(" animate: '{0}',", this.Animation.ToString().ToLower());
startupScript.AppendFormat(" orientation: '{0}',", this.Orientation.ToString().ToLower());
startupScript.AppendFormat(" range: {0},", this.Range.ToString().ToLower());
startupScript.AppendFormat(" step: {0},", this.Step);
if (!string.IsNullOrEmpty(this.RangeValue.ToString()))
{
startupScript.AppendFormat(" value: {0},", this.Value);
}
else
{
startupScript.AppendFormat(" values: [{0},{1}],", this.Value, this.RangeValue);
}
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue(100)
]
public int MaxValue
{
get
{
object max = ViewState["MaxValueViewState"];
return (max == null) ? 100 : Convert.ToInt32(max);
}
set
{
ViewState["MaxValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int MinValue
{
get
{
object mix = ViewState["MixValueViewState"];
return (mix == null) ? 0 : Convert.ToInt32(mix);
}
set
{
ViewState["MixValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object val = (object)ViewState["ValueViewState"];
return (val == null) ? 0 : Convert.ToInt32(val);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Value")
]
public int RangeValue
{
get
{
object rangeValue = (object)ViewState["RangeValueViewState"];
return (rangeValue == null) ? this.Value : Convert.ToInt32(rangeValue);
}
set
{
ViewState["RangeValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int Step
{
get
{
object step = (object)ViewState["StepTypeViewState"];
return (step == null) ? 1 : Convert.ToInt32(step);
}
set
{
ViewState["StepTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderOrientation.Horizontal)
]
public SliderOrientation Orientation
{
get
{
object orientation = (object)ViewState["OrientationViewState"];
return (orientation == null) ? SliderOrientation.Horizontal : (SliderOrientation)orientation;
}
set
{
ViewState["OrientationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderDuration.Normal)
]
public SliderDuration Animation
{
get
{
object animation = (object)ViewState["AnimationViewState"];
return (animation == null) ? SliderDuration.Normal : (SliderDuration)animation;
}
set
{
ViewState["AnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(SliderRange.False)
]
public SliderRange Range
{
get
{
object range = (object)ViewState["RangeViewState"];
return (range == null) ? SliderRange.False : (SliderRange)range;
}
set
{
ViewState["RangeViewState"] = value;
}
}
-
-
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
diff --git a/Atom.Web/Tabs/JqTabs.cs b/Atom.Web/Tabs/JqTabs.cs
index 2b78b7a..4b2ef6c 100644
--- a/Atom.Web/Tabs/JqTabs.cs
+++ b/Atom.Web/Tabs/JqTabs.cs
@@ -233,664 +233,665 @@ namespace Atom.Web.UI.WebControls.Tabs
startupScript.AppendFormat(".tabs-bottom .ui-tabs-panel {{ height: 140px; overflow: auto; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav {{ position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }} ");
startupScript.AppendFormat(".tabs-bottom .ui-tabs-nav li {{ margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-selected {{ margin-top: -3px !important; }}");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav {{ padding: .2em .1em .2em .2em; float: left; width: 12em; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li {{ clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li a {{ display:block; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected {{ padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }}");
startupScript.AppendFormat(".ui-tabs-vertical .ui-tabs-panel {{ padding: 1em; float: right; width: 40em;}}");
}
if (this.TabsRemove)
{
if (string.IsNullOrEmpty(this.CloseIconUrl))
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0;}}");
}
else
{
startupScript.AppendFormat("#" + this.UniqueID + " li .ui-icon-close {{float: left; margin: 0.4em 0.2em 0 0; background-image:url('"
+ this.CloseIconUrl + "')!important; background-position:center;}}");
}
}
startupScript.AppendFormat("</style>");
return startupScript.ToString();
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var " + this.UniqueID + " = $('#" + this.UniqueID + "'); ");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(this.UniqueID + ".attr('class','tabs-bottom');");
}
startupScript.AppendFormat(this.UniqueID + ".tabs({{");
//events
//remove
startupScript.AppendFormat(" remove: function(event, ui) {{ ");
if (Events[EventTabRemoving] != null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoving:'+$(ui.tab).attr('href').split('-')[1]); ");
}
if (Events[EventTabRemoved] != null)
{
if (Events[EventTabRemoving] == null)
{
startupScript.AppendFormat(" __doPostBack('"
+ this.UniqueID + "','tabremoved:'+$(ui.tab).attr('href').split('-')[1]); ");
}
}
startupScript.AppendFormat(" }},");
//select
startupScript.AppendFormat(" select: function(event, ui){{ $('#"
+ this.UniqueID + "hiddenValue').val('selectedtab:'+$(ui.panel).attr('id').split('-')[1]); ");
if (Events[EventSelectedIndexChanging] != null)
{
startupScript.AppendFormat(" __doPostBack('" + this.UniqueID + "','selectedindexchanging:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
if (Events[EventSelectedIndexChanged] != null)
{
if (Events[EventSelectedIndexChanging] == null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','selectedindexchanged:'+parseInt($('#"
+ this.UniqueID + "hiddenValue').val().split(':')[1])+':'+$('#"
+ this.UniqueID + "').tabs('option', 'selected'));");
}
}
startupScript.AppendFormat(" }},");
//tabs remove
if (this.TabsRemove)
{
startupScript.AppendFormat(" tabTemplate:\"<li><a href='#{{href}}'>#{{label}}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>\",");
}
//collapsible
if (this.Collapsible)
{
startupScript.AppendFormat("collapsible: {0},", this.Collapsible.ToString().ToLower());
}
//animation and animation speed
if (this.Animate == TabAnimationType.Content)
{
startupScript.AppendFormat(" fx:{{opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.Height)
{
startupScript.AppendFormat(" fx:{{height: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
if (this.Animate == TabAnimationType.HeightAndContent)
{
startupScript.AppendFormat(" fx:{{height: 'toggle', opacity: 'toggle' ,duration: {0} }},", this.AnimationSpeed.ToString().ToLower());
}
//tab change type
if (this.ChangeType == TabChangeType.MouseHover)
{
startupScript.AppendFormat(" event: 'mouseover',");
}
//selected tab
startupScript.AppendFormat(" selected: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
startupScript.AppendFormat("}})");
//tab appearance
if (this.TabAppearanceType == TabOrientation.Top)
{
startupScript.AppendFormat(";");
}
if (this.TabAppearanceType == TabOrientation.Bottom)
{
startupScript.AppendFormat(";");
startupScript.AppendFormat(" $('.tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *')");
startupScript.AppendFormat(".removeClass('ui-corner-all ui-corner-top')");
startupScript.AppendFormat(".addClass('ui-corner-bottom'); ");
}
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(".addClass('ui-tabs-vertical ui-helper-clearfix'); $('#"
+ this.UniqueID + " li').removeClass('ui-corner-top').addClass('ui-corner-left'); ");
}
//tab remove js code
if (this.TabsRemove)
{
startupScript.AppendFormat("$('#" + this.UniqueID + " span.ui-icon-close').live('click', function() {{");
startupScript.AppendFormat("var index = $('li'," + this.UniqueID + ").index($(this).parent());");
startupScript.AppendFormat(this.UniqueID + ".tabs('remove', index);}});");
}
//tabs moving
if (this.TabsMoving)
{
startupScript.AppendFormat("$('#" + this.UniqueID + "').find('.ui-tabs-nav').sortable({{ ");
if (Events[EventTabMoved] != null)
{
startupScript.AppendFormat("stop: function(event, ui) {{ var oldPostion=$(ui.item).children('a').attr('href').split('-')[1];");
startupScript.AppendFormat("var newPostion=$(" + this.UniqueID + ").tabs().find('.ui-tabs-nav li').sortable('toArray').index(ui.item);");
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "','tabmoved:'+oldPostion+':'+newPostion);}},");
}
//moving orientation
if (this.TabAppearanceType == TabOrientation.Vertical)
{
startupScript.AppendFormat(" axis:'y'}})");
}
else
{
startupScript.AppendFormat(" axis:'x'}})");
}
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "selectedtab:" + this.SelectedIndex.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderBeginTag(HtmlTextWriterTag.Ul);
foreach (Tab tab in this._tabsList)
{
writer.RenderBeginTag(HtmlTextWriterTag.Li);
writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.A);
writer.Write(tab.Header);
writer.RenderEndTag();
if (this.TabsRemove)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, "ui-icon ui-icon-close");
writer.RenderBeginTag(HtmlTextWriterTag.Span);
writer.Write("Remove Tab");
writer.RenderEndTag();
}
writer.RenderEndTag();
}
writer.RenderEndTag();
foreach (Tab tab in this._tabsList)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "-" + this.Tabs.IndexOf(tab).ToString());
writer.RenderBeginTag(HtmlTextWriterTag.Div);
foreach (Control control in tab.Controls)
{
control.RenderControl(writer);
}
writer.RenderEndTag();
}
writer.RenderEndTag();
base.RenderContents(writer);
}
public virtual void ClearSelection()
{
foreach (Tab item in this._tabsList)
{
item.Selected = false;
}
}
#region IPostBackEventHandler Members
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
//selecting event
if (eventArgument.StartsWith("selectedindexchanging"))
{
string[] values = eventArgument.Split(':');
int newIndex = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangingEventArgs args = new TabsChangingEventArgs(newIndex, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanging(args);
}
//selected event
if (eventArgument.StartsWith("selectedindexchanged"))
{
string[] values = eventArgument.Split(':');
int index = Convert.ToInt32(values[1]);
int oldIndex = Convert.ToInt32(values[2]);
TabsChangedEventArgs args = new TabsChangedEventArgs(index, oldIndex, this.SelectedTab, this);
this.OnSelectedIndexChanged(args);
}
//removing event
if (eventArgument.StartsWith("tabremoving"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovingEventArgs args = new TabsRemovingEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoving(args);
}
//removed event
if (eventArgument.StartsWith("tabremoved"))
{
string[] values = eventArgument.Split(':');
int tabIndex = Convert.ToInt32(values[1]);
TabsRemovedEventArgs args = new TabsRemovedEventArgs(tabIndex, this.Tabs[tabIndex], this);
this.OnTabRemoved(args);
}
//moved event
if (eventArgument.StartsWith("tabmoved"))
{
string[] values = eventArgument.Split(':');
int oldPosition = Convert.ToInt32(values[1]);
int newPosition = Convert.ToInt32(values[2]);
ReorderTabItems(oldPosition, newPosition);
this.OnTabMoved(new EventArgs());
}
}
}
private void ReorderTabItems(int oldPosition, int newPosition)
{
Tab temp = this._tabsList[oldPosition];
this._tabsList[oldPosition] = this._tabsList[newPosition];
this._tabsList[newPosition] = temp;
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
#endregion
//Properties
[
Category("Behavior"),
Description(""),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
Editor(typeof(TabCollectionEditor), typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public List<Tab> Tabs
{
get
{
if (this._tabsList == null)
{
this._tabsList = new List<Tab>();
}
return _tabsList;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public int SelectedIndex
{
get
{
return this._selectedIndex;
}
set
{
this.ClearSelection();
this._tabsList[value].Selected = true;
this._selectedIndex = value;
}
}
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
Category(""),
Description("")
]
public Tab SelectedTab
{
get
{
int selectedIndex = this.SelectedIndex;
if (selectedIndex >= 0)
{
return this._tabsList[selectedIndex];
}
return null;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public string CloseIconUrl
{
get
{
object icon = ViewState["CloseIconUrlViewState"];
return (icon == null) ? string.Empty : icon.ToString();
}
set
{
ViewState["CloseIconUrlViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabAnimationType.None)
]
public TabAnimationType Animate
{
get
{
object animation = (object)ViewState["AnimateViewState"];
return (animation == null) ? TabAnimationType.None : (TabAnimationType)animation;
}
set
{
ViewState["AnimateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabOrientation.Top)
]
public TabOrientation TabAppearanceType
{
get
{
object appearance = (object)ViewState["TabAppearanceTypeViewState"];
return (appearance == null) ? TabOrientation.Top : (TabOrientation)appearance;
}
set
{
ViewState["TabAppearanceTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabChangeType.MouseClick)
]
public TabChangeType ChangeType
{
get
{
object changeType = (object)ViewState["TabChangeTypeViewState"];
return (changeType == null) ? TabChangeType.MouseClick : (TabChangeType)changeType;
}
set
{
ViewState["TabChangeTypeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(TabDuration.Normal)
]
public TabDuration AnimationSpeed
{
get
{
object animationSpeed = (object)ViewState["AnimationSpeedViewState"];
return (animationSpeed == null) ? TabDuration.Normal : (TabDuration)animationSpeed;
}
set
{
ViewState["AnimationSpeedViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Collapsible
{
get
{
object collapsible = (object)ViewState["CollapsibleViewState"];
return (collapsible == null) ? false : (bool)collapsible;
}
set
{
ViewState["CollapsibleViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsRemove
{
get
{
object tabsRemove = (object)ViewState["TabsRemoveViewState"];
return (tabsRemove == null) ? false : (bool)tabsRemove;
}
set
{
ViewState["TabsRemoveViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool TabsMoving
{
get
{
object tabsMoving = (object)ViewState["TabsMovingViewState"];
return (tabsMoving == null) ? false : (bool)tabsMoving;
}
set
{
ViewState["TabsMovingViewState"] = value;
}
}
-
+ #region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
+ #endregion
}
}
|
sila/AtomProject
|
1d588805e140ef090a20159cbcd68b508b96acf7
|
add inherit properties
|
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 7344ffd..28fe1f2 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,192 +1,353 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
+
+ #region inherit properties
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override BorderStyle BorderStyle
+ {
+ get
+ {
+ return base.BorderStyle;
+ }
+ set
+ {
+ base.BorderStyle = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override Unit BorderWidth
+ {
+ get
+ {
+ return base.BorderWidth;
+ }
+ set
+ {
+ base.BorderWidth = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return base.BorderColor;
+ }
+ set
+ {
+ base.BorderColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override FontInfo Font
+ {
+ get
+ {
+ return base.Font;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override bool EnableTheming
+ {
+ get
+ {
+ return base.EnableTheming;
+ }
+ set
+ {
+ base.EnableTheming = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string ToolTip
+ {
+ get
+ {
+ return base.ToolTip;
+ }
+ set
+ {
+ base.ToolTip = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string SkinID
+ {
+ get
+ {
+ return base.SkinID;
+ }
+ set
+ {
+ base.SkinID = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override System.Drawing.Color ForeColor
+ {
+ get
+ {
+ return base.ForeColor;
+ }
+ set
+ {
+ base.ForeColor = value;
+ }
+ }
+
+ [
+ EditorBrowsable(EditorBrowsableState.Never),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
+ ]
+ public override string CssClass
+ {
+ get
+ {
+ return base.CssClass;
+ }
+ set
+ {
+ base.CssClass = value;
+ }
+ }
+
+ #endregion
}
}
|
sila/AtomProject
|
d508ab437d4483e2c0329d87990c412b8998c35b
|
implement all properties and startup script
|
diff --git a/Atom.Web/DatePicker/JQDatePicker.cs b/Atom.Web/DatePicker/JQDatePicker.cs
index 33a9182..e1ed928 100644
--- a/Atom.Web/DatePicker/JQDatePicker.cs
+++ b/Atom.Web/DatePicker/JQDatePicker.cs
@@ -1,1283 +1,1303 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.DatePicker
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(DatePickerDesigner)),
ToolboxData("<{0}:JQDatePicker runat=\"server\"> </{0}:JQDatePicker>")
]
public class JQDatePicker : WebControl
{
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + "; ");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
#region bool type properties
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
if (this.AutoSize)
{
startupScript.AppendFormat(" autoSize: true,");
}
if (this.ButtonImageOnly)
{
startupScript.AppendFormat(" buttonImageOnly: true,");
}
if (this.ChangeMonth)
{
startupScript.AppendFormat(" changeMonth: true,");
}
if (this.ChangeYear)
{
startupScript.AppendFormat(" changeYear: true,");
}
if (!this.ConstrainInput)
{
startupScript.AppendFormat(" constrainInput: false,");
}
if (this.GotoCurrent)
{
startupScript.AppendFormat(" gotoCurrent: true,");
}
if (this.HideIfNoPrevNext)
{
startupScript.AppendFormat(" hideIfNoPrevNext: true,");
}
if (this.IsRTL)
{
startupScript.AppendFormat(" isRTL: true,");
}
if (this.NavigationAsDateFormat)
{
startupScript.AppendFormat(" navigationAsDateFormat: true,");
}
if (this.SelectOtherMonths)
{
startupScript.AppendFormat(" selectOtherMonths: true,");
}
if (this.ShowButtonPanel)
{
startupScript.AppendFormat(" showButtonPanel: true,");
}
if (this.ShowMonthAfterYear)
{
startupScript.AppendFormat(" showMonthAfterYear: true,");
}
if (this.ShowWeek)
{
startupScript.AppendFormat(" showWeek: true,");
}
if (this.ShowOtherMonths)
{
startupScript.AppendFormat(" showOtherMonths: true,");
}
#endregion
#region int type properties
if (this.FirstDay != 0)
{
startupScript.AppendFormat(" firstDay: {0},", this.FirstDay);
}
if (this.StepMonths != 1)
{
startupScript.AppendFormat(" stepMonths: {0},", this.StepMonths);
}
if (this.ShowCurrentAtPos != 0)
{
startupScript.AppendFormat(" showCurrentAtPos: {0},", this.ShowCurrentAtPos);
}
#endregion
//calendar matrix
- startupScript.AppendFormat(" numberOfMonths: [{0}, {1}],", this.NumberOfMonthsVertical, this.NumberOfMonthsHorizontal);
+ if ((this.NumberOfMonthsHorizontal != 1) || (this.NumberOfMonthsVertical != 1))
+ {
+ startupScript.AppendFormat(" numberOfMonths: [{0}, {1}],", this.NumberOfMonthsVertical, this.NumberOfMonthsHorizontal);
+ }
#region string type properties
if (!string.IsNullOrEmpty(this.AltField))
{
- startupScript.AppendFormat(" altField: \"{0}\",");
+ startupScript.AppendFormat(" altField: \"{0}\",", this.AltField);
}
if (!string.IsNullOrEmpty(this.AltFormat))
{
- startupScript.AppendFormat(" altFormat: \"{0}\",");
+ startupScript.AppendFormat(" altFormat: \"{0}\",", this.AltFormat);
}
if (!string.IsNullOrEmpty(this.AppendText))
{
- startupScript.AppendFormat(" appendText: \"{0}\",");
+ startupScript.AppendFormat(" appendText: \"{0}\",", this.AppendText);
}
if (!string.IsNullOrEmpty(this.ButtonImage))
{
- startupScript.AppendFormat(" buttonImage: \"{0}\",");
+ startupScript.AppendFormat(" buttonImage: \"{0}\",", this.ButtonImage);
}
if (!string.IsNullOrEmpty(this.ButtonText))
{
- startupScript.AppendFormat(" buttonText: \"{0}\",");
+ startupScript.AppendFormat(" buttonText: \"{0}\",", this.ButtonText);
}
if (!string.IsNullOrEmpty(this.CloseText))
{
- startupScript.AppendFormat(" closeText: \"{0}\",");
+ startupScript.AppendFormat(" closeText: \"{0}\",", this.CloseText);
}
if (!string.IsNullOrEmpty(this.CurrentText))
{
- startupScript.AppendFormat(" currentText: \"{0}\",");
+ startupScript.AppendFormat(" currentText: \"{0}\",", this.CurrentText);
}
if (!string.IsNullOrEmpty(this.DateFormat))
{
- startupScript.AppendFormat(" dateFormat: \"{0}\",");
+ startupScript.AppendFormat(" dateFormat: \"{0}\",", this.DateFormat);
}
if (!string.IsNullOrEmpty(this.WeekHeader))
{
- startupScript.AppendFormat(" weekHeader: \"{0}\",");
+ startupScript.AppendFormat(" weekHeader: \"{0}\",", this.WeekHeader);
}
if (!string.IsNullOrEmpty(this.YearRange))
{
- startupScript.AppendFormat(" yearRange: \"{0}\",");
+ startupScript.AppendFormat(" yearRange: \"{0}\",", this.YearRange);
}
if (!string.IsNullOrEmpty(this.YearSuffix))
{
- startupScript.AppendFormat(" yearSuffix: \"{0}\",");
+ startupScript.AppendFormat(" yearSuffix: \"{0}\",", this.YearSuffix);
}
if (!string.IsNullOrEmpty(this.NextText))
{
- startupScript.AppendFormat(" nextText: \"{0}\",");
+ startupScript.AppendFormat(" nextText: \"{0}\",", this.NextText);
}
if (!string.IsNullOrEmpty(this.PrevText))
{
- startupScript.AppendFormat(" prevText: \"{0}\",");
+ startupScript.AppendFormat(" prevText: \"{0}\",", this.PrevText);
}
- //parrerns
+ //dates and parrerns
if (!string.IsNullOrEmpty(this.DefaultDatePattern))
{
- startupScript.AppendFormat(": \"{0}\",");
+ startupScript.AppendFormat(" defaultDate: \"{0}\",", this.DefaultDatePattern);
+ }
+ if (this.DefaultDate != null)
+ {
+ startupScript.AppendFormat(" defaultDate: new Date({0},{1},{2}),", this.DefaultDate.Value.Year, this.DefaultDate.Value.Month, this.DefaultDate.Value.Day);
}
if (!string.IsNullOrEmpty(this.MaxDatePattern))
{
- startupScript.AppendFormat(": \"{0}\",");
+ startupScript.AppendFormat(" maxDate: \"{0}\",", this.MaxDatePattern);
+ }
+ if (this.MaxDate != null)
+ {
+ startupScript.AppendFormat(" maxDate: new Date({0},{1},{2}),", this.MaxDate.Value.Year, this.MaxDate.Value.Month, this.MaxDate.Value.Day);
}
if (!string.IsNullOrEmpty(this.MinDatePattern))
{
- startupScript.AppendFormat(": \"{0}\",");
+ startupScript.AppendFormat(" minDate: \"{0}\",", this.MinDatePattern);
+ }
+ if (this.MinDate != null)
+ {
+ startupScript.AppendFormat(" minDate: new Date({0},{1},{2}),", this.MinDate.Value.Year, this.MinDate.Value.Month, this.MinDate.Value.Day);
}
//enums
if (this.ShowOn != DatePickerShowOn.Focus)
{
startupScript.AppendFormat(" showOn: '{0}',", this.ShowOn.ToString().ToLower());
}
if (this.Duration != DatePickerDuration.Normal)
{
startupScript.AppendFormat(" duration: '{0}',", this.Duration.ToString().ToLower());
}
if (this.ShowAnimation != DatePickerAnimation.Show)
{
startupScript.AppendFormat(" showAnim: '{0}',", this.ShowAnimation.ToString().ToLower());
}
#endregion
#region array type properties
if (!string.IsNullOrEmpty(this.DayNames))
{
startupScript.AppendFormat(" dayNames: [{0}],", this.DayNames);
}
if (!string.IsNullOrEmpty(this.DayNamesMin))
{
startupScript.AppendFormat(" dayNamesMin: [{0}],", this.DayNamesMin);
}
if (!string.IsNullOrEmpty(this.DayNamesShort))
{
startupScript.AppendFormat(" dayNamesShort: [{0}],", this.DayNamesShort);
}
if (!string.IsNullOrEmpty(this.MonthNames))
{
startupScript.AppendFormat(" monthNames: [{0}],", this.MonthNames);
}
if (!string.IsNullOrEmpty(this.MonthNamesShort))
{
startupScript.AppendFormat(" monthNamesShort: [{0}],", this.MonthNamesShort);
}
#endregion
-
-
startupScript.AppendFormat("}})");
if ((this.Mode == DatePickerMode.Calendar) && (this.Draggable))
{
startupScript.AppendFormat(" .draggable()");
}
startupScript.AppendFormat(";");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
if (this.Mode == DatePickerMode.DatePicker)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
}
else
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
}
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
+ protected override void OnInit(EventArgs e)
+ {
+
+ //check duplicate properties
+ base.OnInit(e);
+ }
+
//properties
#region bool
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool AutoSize
{
get
{
object autoSize = ViewState["AutoSizeViewState"];
return (autoSize == null) ? false : Convert.ToBoolean(autoSize);
}
set
{
ViewState["AutoSizeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ButtonImageOnly
{
get
{
object buttonImageOnly = ViewState["ButtonImageOnlyViewState"];
return (buttonImageOnly == null) ? false : Convert.ToBoolean(buttonImageOnly);
}
set
{
ViewState["ButtonImageOnlyViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeMonth
{
get
{
object changeMonth = ViewState["ChangeMonthViewState"];
return (changeMonth == null) ? false : Convert.ToBoolean(changeMonth);
}
set
{
ViewState["ChangeMonthViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeYear
{
get
{
object changeYear = ViewState["ChangeYearViewState"];
return (changeYear == null) ? false : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ChangeYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool ConstrainInput
{
get
{
object changeYear = ViewState["ConstrainInputViewState"];
return (changeYear == null) ? true : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ConstrainInputViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool GotoCurrent
{
get
{
object gotoCurrent = ViewState["GotoCurrentViewState"];
return (gotoCurrent == null) ? false : Convert.ToBoolean(gotoCurrent);
}
set
{
ViewState["GotoCurrentViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool HideIfNoPrevNext
{
get
{
object hideIfNoPrevNext = ViewState["HideIfNoPrevNextViewState"];
return (hideIfNoPrevNext == null) ? false : Convert.ToBoolean(hideIfNoPrevNext);
}
set
{
ViewState["HideIfNoPrevNextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool IsRTL
{
get
{
object rtl = ViewState["IsRTLViewState"];
return (rtl == null) ? false : Convert.ToBoolean(rtl);
}
set
{
ViewState["IsRTLViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool NavigationAsDateFormat
{
get
{
object navigationAsDateFormat = ViewState["NavigationAsDateFormatViewState"];
return (navigationAsDateFormat == null) ? false : Convert.ToBoolean(navigationAsDateFormat);
}
set
{
ViewState["NavigationAsDateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool SelectOtherMonths
{
get
{
object selectOtherMonths = ViewState["SelectOtherMonthsViewState"];
return (selectOtherMonths == null) ? false : Convert.ToBoolean(selectOtherMonths);
}
set
{
ViewState["SelectOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowButtonPanel
{
get
{
object showButtonPanel = ViewState["ShowButtonPanelViewState"];
return (showButtonPanel == null) ? false : Convert.ToBoolean(showButtonPanel);
}
set
{
ViewState["ShowButtonPanelViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowMonthAfterYear
{
get
{
object showMonthAfterYear = ViewState["ShowMonthAfterYearViewState"];
return (showMonthAfterYear == null) ? false : Convert.ToBoolean(showMonthAfterYear);
}
set
{
ViewState["ShowMonthAfterYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowWeek
{
get
{
object showWeek = ViewState["ShowWeekViewState"];
return (showWeek == null) ? false : Convert.ToBoolean(showWeek);
}
set
{
ViewState["ShowWeekViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowOtherMonths
{
get
{
object showOtherMonths = ViewState["ShowOtherMonthsViewState"];
return (showOtherMonths == null) ? false : Convert.ToBoolean(showOtherMonths);
}
set
{
ViewState["ShowOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Draggable
{
get
{
object draggable = ViewState["DraggableViewState"];
return (draggable == null) ? false : Convert.ToBoolean(draggable);
}
set
{
ViewState["DraggableViewState"] = value;
}
}
#endregion
#region str
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltField
{
get
{
object autoSize = ViewState["AltFieldViewState"];
return (autoSize == null) ? string.Empty : autoSize.ToString();
}
set
{
ViewState["AltFieldViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltFormat
{
get
{
object altFormat = ViewState["AltFormatViewState"];
return (altFormat == null) ? string.Empty : altFormat.ToString();
}
set
{
ViewState["AltFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AppendText
{
get
{
object appendText = ViewState["AppendTextViewState"];
return (appendText == null) ? string.Empty : appendText.ToString();
}
set
{
ViewState["AppendTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ButtonImage
{
get
{
object buttonImage = ViewState["ButtonImageViewState"];
return (buttonImage == null) ? string.Empty : buttonImage.ToString();
}
set
{
ViewState["ButtonImageViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("...")
]
public string ButtonText
{
get
{
object buttonText = ViewState["ButtonTextViewState"];
return (buttonText == null) ? "..." : buttonText.ToString();
}
set
{
ViewState["ButtonTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Done")
]
public string CloseText
{
get
{
object closeText = ViewState["CloseTextViewState"];
return (closeText == null) ? "Done" : closeText.ToString();
}
set
{
ViewState["CloseTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Today")
]
public string CurrentText
{
get
{
object currentText = ViewState["CurrentTextViewState"];
return (currentText == null) ? "Today" : currentText.ToString();
}
set
{
ViewState["CurrentTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("mm/dd/yy")
]
public string DateFormat
{
get
{
object dateFormat = ViewState["DateFormatViewState"];
return (dateFormat == null) ? "mm/dd/yy" : dateFormat.ToString();
}
set
{
ViewState["DateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Wk")
]
public string WeekHeader
{
get
{
object weekHeader = ViewState["WeekHeaderViewState"];
return (weekHeader == null) ? "Wk" : weekHeader.ToString();
}
set
{
ViewState["WeekHeaderViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("c-10:c+10")
]
public string YearRange
{
get
{
object yearRange = ViewState["YearRangeViewState"];
return (yearRange == null) ? "c-10:c+10" : yearRange.ToString();
}
set
{
ViewState["YearRangeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string YearSuffix
{
get
{
object yearSuffix = ViewState["YearSuffixViewState"];
return (yearSuffix == null) ? string.Empty : yearSuffix.ToString();
}
set
{
ViewState["YearSuffixViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Next")
]
public string NextText
{
get
{
object nextText = ViewState["NextTextViewState"];
return (nextText == null) ? "Next" : nextText.ToString();
}
set
{
ViewState["NextTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Prev")
]
public string PrevText
{
get
{
object prevText = ViewState["PrevTextViewState"];
return (prevText == null) ? "Prev" : prevText.ToString();
}
set
{
ViewState["PrevTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
public string DefaultDatePattern
{
get
{
object defaultDatePattern = ViewState["DefaultDatePatternViewState"];
- return (defaultDatePattern == null) ? string.Empty : defaultDatePattern.ToString();
+ return (defaultDatePattern == null) ? null : defaultDatePattern.ToString();
}
set
{
ViewState["DefaultDatePatternViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
public string MaxDatePattern
{
get
{
object maxDatePattern = ViewState["MaxDatePatternViewState"];
- return (maxDatePattern == null) ? string.Empty : maxDatePattern.ToString();
+ return (maxDatePattern == null) ? null : maxDatePattern.ToString();
}
set
{
ViewState["MaxDatePatternViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
public string MinDatePattern
{
get
{
object minDatePattern = ViewState["MinDatePatternViewState"];
- return (minDatePattern == null) ? string.Empty : minDatePattern.ToString();
+ return (minDatePattern == null) ? null : minDatePattern.ToString();
}
set
{
ViewState["MinDatePatternViewState"] = value;
}
}
//enum
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerShowOn.Focus)
]
public DatePickerShowOn ShowOn
{
get
{
object showOn = ViewState["ShowOnViewState"];
return (showOn == null) ? DatePickerShowOn.Focus : (DatePickerShowOn)showOn;
}
set
{
ViewState["ShowOnViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerDuration.Normal)
]
public DatePickerDuration Duration
{
get
{
object duration = ViewState["DurationViewState"];
return (duration == null) ? DatePickerDuration.Normal : (DatePickerDuration)duration;
}
set
{
ViewState["DurationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerAnimation.Show)
]
public DatePickerAnimation ShowAnimation
{
get
{
object showAnimation = ViewState["ShowAnimationViewState"];
return (showAnimation == null) ? DatePickerAnimation.Show : (DatePickerAnimation)showAnimation;
}
set
{
ViewState["ShowAnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerMode.DatePicker)
]
public DatePickerMode Mode
{
get
{
object mode = ViewState["ModeViewState"];
return (mode == null) ? DatePickerMode.DatePicker : (DatePickerMode)mode;
}
set
{
ViewState["ModeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
- public DateTime DefaultDate
+ public DateTime? DefaultDate
{
get
{
object defaultDate = ViewState["DefaultDateViewState"];
- return (defaultDate == null) ? DateTime.Today : Convert.ToDateTime(defaultDate);
+ return (defaultDate == null) ? null : (DateTime?)defaultDate;
}
set
{
ViewState["DefaultDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
- public DateTime MaxDate
+ public DateTime? MaxDate
{
get
{
object maxDate = ViewState["MaxDateViewState"];
- return (maxDate == null) ? DateTime.MaxValue : Convert.ToDateTime(maxDate);
+ return (maxDate == null) ? null : (DateTime?)maxDate;
}
set
{
ViewState["MaxDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue("")
+ DefaultValue(null)
]
- public DateTime MinDate
+ public DateTime? MinDate
{
get
{
object minDate = ViewState["MinDateViewState"];
- return (minDate == null) ? DateTime.MinValue : Convert.ToDateTime(minDate);
+ return (minDate == null) ? null : (DateTime?)minDate;
}
set
{
ViewState["MinDateViewState"] = value;
}
}
#endregion
#region int
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int NumberOfMonthsHorizontal
{
get
{
object numberOfMonthsHorizontal = ViewState["NumberOfMonthsHorizontalViewState"];
return (numberOfMonthsHorizontal == null) ? 1 : Convert.ToInt32(numberOfMonthsHorizontal);
}
set
{
ViewState["NumberOfMonthsHorizontalViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue(0)
+ DefaultValue(1)
]
public int NumberOfMonthsVertical
{
get
{
object numberOfMonthsVertical = ViewState["NumberOfMonthsVerticalViewState"];
- return (numberOfMonthsVertical == null) ? 0 : Convert.ToInt32(numberOfMonthsVertical);
+ return (numberOfMonthsVertical == null) ? 1 : Convert.ToInt32(numberOfMonthsVertical);
}
set
{
ViewState["NumberOfMonthsVerticalViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int FirstDay
{
get
{
object firstDay = ViewState["FirstDayViewState"];
return (firstDay == null) ? 0 : Convert.ToInt32(firstDay);
}
set
{
ViewState["FirstDayViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int StepMonths
{
get
{
object stepMonths = ViewState["StepMonthsViewState"];
return (stepMonths == null) ? 1 : Convert.ToInt32(stepMonths);
}
set
{
ViewState["StepMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int ShowCurrentAtPos
{
get
{
object showCurrentAtPos = ViewState["ShowCurrentAtPosViewState"];
return (showCurrentAtPos == null) ? 0 : Convert.ToInt32(showCurrentAtPos);
}
set
{
ViewState["ShowCurrentAtPosViewState"] = value;
}
}
#endregion
#region arr
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public string MonthNamesShort
{
get
{
object monthNamesShort = ViewState["MonthNamesShortViewState"];
return (monthNamesShort == null) ? string.Empty : monthNamesShort.ToString();
}
set
{
ViewState["MonthNamesShortViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNames
{
get
{
object dayNames = ViewState["DayNamesViewState"];
return (dayNames == null) ? string.Empty : dayNames.ToString();
}
set
{
ViewState["DayNamesViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNamesMin
{
get
{
object dayNamesMin = ViewState["DayNamesMinViewState"];
return (dayNamesMin == null) ? string.Empty : dayNamesMin.ToString();
}
set
{
ViewState["DayNamesMinViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNamesShort
{
get
{
object dayNamesShort = ViewState["DayNamesShortViewState"];
return (dayNamesShort == null) ? string.Empty : dayNamesShort.ToString();
}
set
{
ViewState["DayNamesShortViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string MonthNames
{
get
{
object monthNames = ViewState["MonthNamesViewState"];
return (monthNames == null) ? string.Empty : monthNames.ToString();
}
set
{
ViewState["MonthNamesViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ShortYearCutoff
{
get
{
object shortYearCutoff = ViewState["ShortYearCutoffViewState"];
return (shortYearCutoff == null) ? string.Empty : shortYearCutoff.ToString();
}
set
{
ViewState["ShortYearCutoffViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ShowOptions
{
get
{
object showOptions = ViewState["ShowOptionsViewState"];
return (showOptions == null) ? string.Empty : showOptions.ToString();
}
set
{
ViewState["ShowOptionsViewState"] = value;
}
}
#endregion
#region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
#endregion
}
}
diff --git a/TestApp/DatePicker.aspx b/TestApp/DatePicker.aspx
index 3be1f4c..18bf7fd 100644
--- a/TestApp/DatePicker.aspx
+++ b/TestApp/DatePicker.aspx
@@ -1,30 +1,37 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DatePicker.aspx.cs" Inherits="TestApp.DatePicker" %>
<%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls.DatePicker" TagPrefix="calendar" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>JQDatePicker</title>
<link href="themes/base/ui.all.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
function Button1_onclick()
{
- $('#temp').val( new Date());
+ $('#temp').val(new Date());
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
- <input type="text" name="temp" id="temp" value="" />
- <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
- <calendar:JQDatePicker ID="JQDatePicker2" runat="server" Mode="Calendar" />
- <calendar:JQDatePicker ID="JQDatePicker1" runat="server" Mode="DatePicker" />
+ <div style="float: left">
+ <input type="text" name="temp" id="temp" value="" />
+ <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
+ <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
+ </div>
+ <div style="float: left">
+ <calendar:JQDatePicker ID="JQDatePicker2" runat="server" Mode="Calendar" />
+ </div>
+ <div style="float: left">
+ <calendar:JQDatePicker ID="JQDatePicker1" runat="server" Mode="DatePicker" />
+ </div>
</div>
</form>
</body>
</html>
diff --git a/TestApp/DatePicker.aspx.cs b/TestApp/DatePicker.aspx.cs
index 51fa37c..34f08a8 100644
--- a/TestApp/DatePicker.aspx.cs
+++ b/TestApp/DatePicker.aspx.cs
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TestApp
{
public partial class DatePicker : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
-
+ JQDatePicker1.DefaultDate = DateTime.Today;
}
}
}
\ No newline at end of file
diff --git a/TestApp/DatePicker.aspx.designer.cs b/TestApp/DatePicker.aspx.designer.cs
index 30d96af..6c8b029 100644
--- a/TestApp/DatePicker.aspx.designer.cs
+++ b/TestApp/DatePicker.aspx.designer.cs
@@ -1,42 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TestApp {
public partial class DatePicker {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ /// <summary>
+ /// Calendar1 control.
+ /// </summary>
+ /// <remarks>
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ /// </remarks>
+ protected global::System.Web.UI.WebControls.Calendar Calendar1;
+
/// <summary>
/// JQDatePicker2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Atom.Web.UI.WebControls.DatePicker.JQDatePicker JQDatePicker2;
/// <summary>
/// JQDatePicker1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Atom.Web.UI.WebControls.DatePicker.JQDatePicker JQDatePicker1;
}
}
|
sila/AtomProject
|
14d54f9c830a2d736a9f9b9f03abaa7d28457eb8
|
add asp calendar in page
|
diff --git a/Atom.Web/DatePicker/JQDatePicker.cs b/Atom.Web/DatePicker/JQDatePicker.cs
index b6a3a57..33a9182 100644
--- a/Atom.Web/DatePicker/JQDatePicker.cs
+++ b/Atom.Web/DatePicker/JQDatePicker.cs
@@ -1,1052 +1,1283 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.DatePicker
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(DatePickerDesigner)),
ToolboxData("<{0}:JQDatePicker runat=\"server\"> </{0}:JQDatePicker>")
]
public class JQDatePicker : WebControl
{
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + "; ");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
+ #region bool type properties
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
if (this.AutoSize)
{
startupScript.AppendFormat(" autoSize: true,");
}
if (this.ButtonImageOnly)
{
startupScript.AppendFormat(" buttonImageOnly: true,");
}
if (this.ChangeMonth)
{
startupScript.AppendFormat(" changeMonth: true,");
}
if (this.ChangeYear)
{
startupScript.AppendFormat(" changeYear: true,");
}
if (!this.ConstrainInput)
{
startupScript.AppendFormat(" constrainInput: false,");
}
if (this.GotoCurrent)
{
startupScript.AppendFormat(" gotoCurrent: true,");
}
if (this.HideIfNoPrevNext)
{
startupScript.AppendFormat(" hideIfNoPrevNext: true,");
}
if (this.IsRTL)
{
startupScript.AppendFormat(" isRTL: true,");
}
if (this.NavigationAsDateFormat)
{
startupScript.AppendFormat(" navigationAsDateFormat: true,");
}
if (this.SelectOtherMonths)
{
startupScript.AppendFormat(" selectOtherMonths: true,");
}
if (this.ShowButtonPanel)
{
startupScript.AppendFormat(" showButtonPanel: true,");
}
if (this.ShowMonthAfterYear)
{
startupScript.AppendFormat(" showMonthAfterYear: true,");
}
if (this.ShowWeek)
{
startupScript.AppendFormat(" showWeek: true,");
}
if (this.ShowOtherMonths)
{
startupScript.AppendFormat(" showOtherMonths: true,");
}
+ #endregion
+ #region int type properties
if (this.FirstDay != 0)
{
startupScript.AppendFormat(" firstDay: {0},", this.FirstDay);
}
if (this.StepMonths != 1)
{
startupScript.AppendFormat(" stepMonths: {0},", this.StepMonths);
}
if (this.ShowCurrentAtPos != 0)
{
startupScript.AppendFormat(" showCurrentAtPos: {0},", this.ShowCurrentAtPos);
}
+ #endregion
+ //calendar matrix
+ startupScript.AppendFormat(" numberOfMonths: [{0}, {1}],", this.NumberOfMonthsVertical, this.NumberOfMonthsHorizontal);
+ #region string type properties
+ if (!string.IsNullOrEmpty(this.AltField))
+ {
+ startupScript.AppendFormat(" altField: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.AltFormat))
+ {
+ startupScript.AppendFormat(" altFormat: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.AppendText))
+ {
+ startupScript.AppendFormat(" appendText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.ButtonImage))
+ {
+ startupScript.AppendFormat(" buttonImage: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.ButtonText))
+ {
+ startupScript.AppendFormat(" buttonText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.CloseText))
+ {
+ startupScript.AppendFormat(" closeText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.CurrentText))
+ {
+ startupScript.AppendFormat(" currentText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.DateFormat))
+ {
+ startupScript.AppendFormat(" dateFormat: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.WeekHeader))
+ {
+ startupScript.AppendFormat(" weekHeader: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.YearRange))
+ {
+ startupScript.AppendFormat(" yearRange: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.YearSuffix))
+ {
+ startupScript.AppendFormat(" yearSuffix: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.NextText))
+ {
+ startupScript.AppendFormat(" nextText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.PrevText))
+ {
+ startupScript.AppendFormat(" prevText: \"{0}\",");
+ }
+ //parrerns
+ if (!string.IsNullOrEmpty(this.DefaultDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.MaxDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.MinDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ //enums
+ if (this.ShowOn != DatePickerShowOn.Focus)
+ {
+ startupScript.AppendFormat(" showOn: '{0}',", this.ShowOn.ToString().ToLower());
+ }
+ if (this.Duration != DatePickerDuration.Normal)
+ {
+ startupScript.AppendFormat(" duration: '{0}',", this.Duration.ToString().ToLower());
+ }
+ if (this.ShowAnimation != DatePickerAnimation.Show)
+ {
+ startupScript.AppendFormat(" showAnim: '{0}',", this.ShowAnimation.ToString().ToLower());
+ }
+ #endregion
+ #region array type properties
+ if (!string.IsNullOrEmpty(this.DayNames))
+ {
+ startupScript.AppendFormat(" dayNames: [{0}],", this.DayNames);
+ }
+ if (!string.IsNullOrEmpty(this.DayNamesMin))
+ {
+ startupScript.AppendFormat(" dayNamesMin: [{0}],", this.DayNamesMin);
+ }
+ if (!string.IsNullOrEmpty(this.DayNamesShort))
+ {
+ startupScript.AppendFormat(" dayNamesShort: [{0}],", this.DayNamesShort);
+ }
+ if (!string.IsNullOrEmpty(this.MonthNames))
+ {
+ startupScript.AppendFormat(" monthNames: [{0}],", this.MonthNames);
+ }
+ if (!string.IsNullOrEmpty(this.MonthNamesShort))
+ {
+ startupScript.AppendFormat(" monthNamesShort: [{0}],", this.MonthNamesShort);
+ }
+ #endregion
startupScript.AppendFormat("}})");
if ((this.Mode == DatePickerMode.Calendar) && (this.Draggable))
{
startupScript.AppendFormat(" .draggable()");
}
startupScript.AppendFormat(";");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
if (this.Mode == DatePickerMode.DatePicker)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
}
else
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
}
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
//properties
#region bool
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool AutoSize
{
get
{
object autoSize = ViewState["AutoSizeViewState"];
return (autoSize == null) ? false : Convert.ToBoolean(autoSize);
}
set
{
ViewState["AutoSizeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ButtonImageOnly
{
get
{
object buttonImageOnly = ViewState["ButtonImageOnlyViewState"];
return (buttonImageOnly == null) ? false : Convert.ToBoolean(buttonImageOnly);
}
set
{
ViewState["ButtonImageOnlyViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeMonth
{
get
{
object changeMonth = ViewState["ChangeMonthViewState"];
return (changeMonth == null) ? false : Convert.ToBoolean(changeMonth);
}
set
{
ViewState["ChangeMonthViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeYear
{
get
{
object changeYear = ViewState["ChangeYearViewState"];
return (changeYear == null) ? false : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ChangeYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool ConstrainInput
{
get
{
object changeYear = ViewState["ConstrainInputViewState"];
return (changeYear == null) ? true : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ConstrainInputViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool GotoCurrent
{
get
{
object gotoCurrent = ViewState["GotoCurrentViewState"];
return (gotoCurrent == null) ? false : Convert.ToBoolean(gotoCurrent);
}
set
{
ViewState["GotoCurrentViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool HideIfNoPrevNext
{
get
{
object hideIfNoPrevNext = ViewState["HideIfNoPrevNextViewState"];
return (hideIfNoPrevNext == null) ? false : Convert.ToBoolean(hideIfNoPrevNext);
}
set
{
ViewState["HideIfNoPrevNextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool IsRTL
{
get
{
object rtl = ViewState["IsRTLViewState"];
return (rtl == null) ? false : Convert.ToBoolean(rtl);
}
set
{
ViewState["IsRTLViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool NavigationAsDateFormat
{
get
{
object navigationAsDateFormat = ViewState["NavigationAsDateFormatViewState"];
return (navigationAsDateFormat == null) ? false : Convert.ToBoolean(navigationAsDateFormat);
}
set
{
ViewState["NavigationAsDateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool SelectOtherMonths
{
get
{
object selectOtherMonths = ViewState["SelectOtherMonthsViewState"];
return (selectOtherMonths == null) ? false : Convert.ToBoolean(selectOtherMonths);
}
set
{
ViewState["SelectOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowButtonPanel
{
get
{
object showButtonPanel = ViewState["ShowButtonPanelViewState"];
return (showButtonPanel == null) ? false : Convert.ToBoolean(showButtonPanel);
}
set
{
ViewState["ShowButtonPanelViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowMonthAfterYear
{
get
{
object showMonthAfterYear = ViewState["ShowMonthAfterYearViewState"];
return (showMonthAfterYear == null) ? false : Convert.ToBoolean(showMonthAfterYear);
}
set
{
ViewState["ShowMonthAfterYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowWeek
{
get
{
object showWeek = ViewState["ShowWeekViewState"];
return (showWeek == null) ? false : Convert.ToBoolean(showWeek);
}
set
{
ViewState["ShowWeekViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowOtherMonths
{
get
{
object showOtherMonths = ViewState["ShowOtherMonthsViewState"];
return (showOtherMonths == null) ? false : Convert.ToBoolean(showOtherMonths);
}
set
{
ViewState["ShowOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Draggable
{
get
{
object draggable = ViewState["DraggableViewState"];
return (draggable == null) ? false : Convert.ToBoolean(draggable);
}
set
{
ViewState["DraggableViewState"] = value;
}
}
#endregion
#region str
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltField
{
get
{
object autoSize = ViewState["AltFieldViewState"];
return (autoSize == null) ? string.Empty : autoSize.ToString();
}
set
{
ViewState["AltFieldViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltFormat
{
get
{
object altFormat = ViewState["AltFormatViewState"];
return (altFormat == null) ? string.Empty : altFormat.ToString();
}
set
{
ViewState["AltFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AppendText
{
get
{
object appendText = ViewState["AppendTextViewState"];
return (appendText == null) ? string.Empty : appendText.ToString();
}
set
{
ViewState["AppendTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ButtonImage
{
get
{
object buttonImage = ViewState["ButtonImageViewState"];
return (buttonImage == null) ? string.Empty : buttonImage.ToString();
}
set
{
ViewState["ButtonImageViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("...")
]
public string ButtonText
{
get
{
object buttonText = ViewState["ButtonTextViewState"];
return (buttonText == null) ? "..." : buttonText.ToString();
}
set
{
ViewState["ButtonTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Done")
]
public string CloseText
{
get
{
object closeText = ViewState["CloseTextViewState"];
return (closeText == null) ? "Done" : closeText.ToString();
}
set
{
ViewState["CloseTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Today")
]
public string CurrentText
{
get
{
object currentText = ViewState["CurrentTextViewState"];
return (currentText == null) ? "Today" : currentText.ToString();
}
set
{
ViewState["CurrentTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("mm/dd/yy")
]
public string DateFormat
{
get
{
object dateFormat = ViewState["DateFormatViewState"];
return (dateFormat == null) ? "mm/dd/yy" : dateFormat.ToString();
}
set
{
ViewState["DateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Wk")
]
public string WeekHeader
{
get
{
object weekHeader = ViewState["WeekHeaderViewState"];
return (weekHeader == null) ? "Wk" : weekHeader.ToString();
}
set
{
ViewState["WeekHeaderViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("c-10:c+10")
]
public string YearRange
{
get
{
object yearRange = ViewState["YearRangeViewState"];
return (yearRange == null) ? "c-10:c+10" : yearRange.ToString();
}
set
{
ViewState["YearRangeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string YearSuffix
{
get
{
object yearSuffix = ViewState["YearSuffixViewState"];
return (yearSuffix == null) ? string.Empty : yearSuffix.ToString();
}
set
{
ViewState["YearSuffixViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Next")
]
public string NextText
{
get
{
object nextText = ViewState["NextTextViewState"];
return (nextText == null) ? "Next" : nextText.ToString();
}
set
{
ViewState["NextTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Prev")
]
public string PrevText
{
get
{
object prevText = ViewState["PrevTextViewState"];
return (prevText == null) ? "Prev" : prevText.ToString();
}
set
{
ViewState["PrevTextViewState"] = value;
}
}
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string DefaultDatePattern
+ {
+ get
+ {
+ object defaultDatePattern = ViewState["DefaultDatePatternViewState"];
+ return (defaultDatePattern == null) ? string.Empty : defaultDatePattern.ToString();
+ }
+ set
+ {
+ ViewState["DefaultDatePatternViewState"] = value;
+ }
+ }
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string MaxDatePattern
+ {
+ get
+ {
+ object maxDatePattern = ViewState["MaxDatePatternViewState"];
+ return (maxDatePattern == null) ? string.Empty : maxDatePattern.ToString();
+ }
+ set
+ {
+ ViewState["MaxDatePatternViewState"] = value;
+ }
+ }
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string MinDatePattern
+ {
+ get
+ {
+ object minDatePattern = ViewState["MinDatePatternViewState"];
+ return (minDatePattern == null) ? string.Empty : minDatePattern.ToString();
+ }
+ set
+ {
+ ViewState["MinDatePatternViewState"] = value;
+ }
+ }
+
//enum
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerShowOn.Focus)
]
public DatePickerShowOn ShowOn
{
get
{
object showOn = ViewState["ShowOnViewState"];
return (showOn == null) ? DatePickerShowOn.Focus : (DatePickerShowOn)showOn;
}
set
{
ViewState["ShowOnViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerDuration.Normal)
]
public DatePickerDuration Duration
{
get
{
object duration = ViewState["DurationViewState"];
return (duration == null) ? DatePickerDuration.Normal : (DatePickerDuration)duration;
}
set
{
ViewState["DurationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerAnimation.Show)
]
public DatePickerAnimation ShowAnimation
{
get
{
object showAnimation = ViewState["ShowAnimationViewState"];
return (showAnimation == null) ? DatePickerAnimation.Show : (DatePickerAnimation)showAnimation;
}
set
{
ViewState["ShowAnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerMode.DatePicker)
]
public DatePickerMode Mode
{
get
{
object mode = ViewState["ModeViewState"];
return (mode == null) ? DatePickerMode.DatePicker : (DatePickerMode)mode;
}
set
{
ViewState["ModeViewState"] = value;
}
}
- #endregion
- #region int
[
Category("Behavior"),
Description(""),
- DefaultValue(0)
+ DefaultValue("")
]
- public int FirstDay
+ public DateTime DefaultDate
{
get
{
- object firstDay = ViewState["FirstDayViewState"];
- return (firstDay == null) ? 0 : Convert.ToInt32(firstDay);
+ object defaultDate = ViewState["DefaultDateViewState"];
+ return (defaultDate == null) ? DateTime.Today : Convert.ToDateTime(defaultDate);
}
set
{
- ViewState["FirstDayViewState"] = value;
+ ViewState["DefaultDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue(1)
+ DefaultValue("")
]
- public int StepMonths
+ public DateTime MaxDate
{
get
{
- object stepMonths = ViewState["StepMonthsViewState"];
- return (stepMonths == null) ? 1 : Convert.ToInt32(stepMonths);
+ object maxDate = ViewState["MaxDateViewState"];
+ return (maxDate == null) ? DateTime.MaxValue : Convert.ToDateTime(maxDate);
}
set
{
- ViewState["StepMonthsViewState"] = value;
+ ViewState["MaxDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
- DefaultValue(0)
+ DefaultValue("")
]
- public int ShowCurrentAtPos
+ public DateTime MinDate
{
get
{
- object showCurrentAtPos = ViewState["ShowCurrentAtPosViewState"];
- return (showCurrentAtPos == null) ? 0 : Convert.ToInt32(showCurrentAtPos);
+ object minDate = ViewState["MinDateViewState"];
+ return (minDate == null) ? DateTime.MinValue : Convert.ToDateTime(minDate);
}
set
{
- ViewState["ShowCurrentAtPosViewState"] = value;
+ ViewState["MinDateViewState"] = value;
}
}
#endregion
- #region arr
-
- public string DayNames
+ #region int
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(1)
+ ]
+ public int NumberOfMonthsHorizontal
{
get
{
- object dayNames = ViewState["DayNamesViewState"];
- return (dayNames == null) ? string.Empty : dayNames.ToString();
+ object numberOfMonthsHorizontal = ViewState["NumberOfMonthsHorizontalViewState"];
+ return (numberOfMonthsHorizontal == null) ? 1 : Convert.ToInt32(numberOfMonthsHorizontal);
}
set
{
- ViewState["DayNamesViewState"] = value;
+ ViewState["NumberOfMonthsHorizontalViewState"] = value;
}
}
- public string DayNamesMin
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(0)
+ ]
+ public int NumberOfMonthsVertical
{
get
{
- object dayNamesMin = ViewState["DayNamesMinViewState"];
- return (dayNamesMin == null) ? string.Empty : dayNamesMin.ToString();
+ object numberOfMonthsVertical = ViewState["NumberOfMonthsVerticalViewState"];
+ return (numberOfMonthsVertical == null) ? 0 : Convert.ToInt32(numberOfMonthsVertical);
}
set
{
- ViewState["DayNamesMinViewState"] = value;
+ ViewState["NumberOfMonthsVerticalViewState"] = value;
}
}
- public string DayNamesShort
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(0)
+ ]
+ public int FirstDay
{
get
{
- object dayNamesShort = ViewState["DayNamesShortViewState"];
- return (dayNamesShort == null) ? string.Empty : dayNamesShort.ToString();
+ object firstDay = ViewState["FirstDayViewState"];
+ return (firstDay == null) ? 0 : Convert.ToInt32(firstDay);
}
set
{
- ViewState["DayNamesShortViewState"] = value;
+ ViewState["FirstDayViewState"] = value;
}
}
- public string DefaultDate
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(1)
+ ]
+ public int StepMonths
{
get
{
- object defaultDate = ViewState["DefaultDateViewState"];
- return (defaultDate == null) ? string.Empty : defaultDate.ToString();
+ object stepMonths = ViewState["StepMonthsViewState"];
+ return (stepMonths == null) ? 1 : Convert.ToInt32(stepMonths);
}
set
{
- ViewState["DefaultDateViewState"] = value;
+ ViewState["StepMonthsViewState"] = value;
}
}
- public string MaxDate
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(0)
+ ]
+ public int ShowCurrentAtPos
{
get
{
- object maxDate = ViewState["MaxDateViewState"];
- return (maxDate == null) ? string.Empty : maxDate.ToString();
+ object showCurrentAtPos = ViewState["ShowCurrentAtPosViewState"];
+ return (showCurrentAtPos == null) ? 0 : Convert.ToInt32(showCurrentAtPos);
}
set
{
- ViewState["MaxDateViewState"] = value;
+ ViewState["ShowCurrentAtPosViewState"] = value;
}
}
- public string MinDate
+
+ #endregion
+ #region arr
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue(0)
+ ]
+ public string MonthNamesShort
{
get
{
- object minDate = ViewState["MinDateViewState"];
- return (minDate == null) ? string.Empty : minDate.ToString();
+ object monthNamesShort = ViewState["MonthNamesShortViewState"];
+ return (monthNamesShort == null) ? string.Empty : monthNamesShort.ToString();
}
set
{
- ViewState["MinDateViewState"] = value;
+ ViewState["MonthNamesShortViewState"] = value;
}
}
- public string MonthNames
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string DayNames
{
get
{
- object monthNames = ViewState["MonthNamesViewState"];
- return (monthNames == null) ? string.Empty : monthNames.ToString();
+ object dayNames = ViewState["DayNamesViewState"];
+ return (dayNames == null) ? string.Empty : dayNames.ToString();
}
set
{
- ViewState["MonthNamesViewState"] = value;
+ ViewState["DayNamesViewState"] = value;
}
}
- public string MonthNamesShort
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string DayNamesMin
{
get
{
- object monthNamesShort = ViewState["MonthNamesShortViewState"];
- return (monthNamesShort == null) ? string.Empty : monthNamesShort.ToString();
+ object dayNamesMin = ViewState["DayNamesMinViewState"];
+ return (dayNamesMin == null) ? string.Empty : dayNamesMin.ToString();
}
set
{
- ViewState["MonthNamesShortViewState"] = value;
+ ViewState["DayNamesMinViewState"] = value;
}
}
- public string NumberOfMonths
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string DayNamesShort
{
get
{
- object numberOfMonths = ViewState["NumberOfMonthsViewState"];
- return (NumberOfMonths == null) ? string.Empty : NumberOfMonths.ToString();
+ object dayNamesShort = ViewState["DayNamesShortViewState"];
+ return (dayNamesShort == null) ? string.Empty : dayNamesShort.ToString();
+ }
+ set
+ {
+ ViewState["DayNamesShortViewState"] = value;
+ }
+ }
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
+ public string MonthNames
+ {
+ get
+ {
+ object monthNames = ViewState["MonthNamesViewState"];
+ return (monthNames == null) ? string.Empty : monthNames.ToString();
}
set
{
- ViewState["NumberOfMonthsViewState"] = value;
+ ViewState["MonthNamesViewState"] = value;
}
}
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
public string ShortYearCutoff
{
get
{
object shortYearCutoff = ViewState["ShortYearCutoffViewState"];
return (shortYearCutoff == null) ? string.Empty : shortYearCutoff.ToString();
}
set
{
ViewState["ShortYearCutoffViewState"] = value;
}
}
+ [
+ Category("Behavior"),
+ Description(""),
+ DefaultValue("")
+ ]
public string ShowOptions
{
get
{
object showOptions = ViewState["ShowOptionsViewState"];
return (showOptions == null) ? string.Empty : showOptions.ToString();
}
set
{
ViewState["ShowOptionsViewState"] = value;
}
}
-
#endregion
#region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
#endregion
}
}
diff --git a/Atom.Web/Dialog/JQDialog.cs b/Atom.Web/Dialog/JQDialog.cs
index 77c0e37..bacf229 100644
--- a/Atom.Web/Dialog/JQDialog.cs
+++ b/Atom.Web/Dialog/JQDialog.cs
@@ -1,633 +1,632 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Web.UI;
using System.Web;
using System.Security.Permissions;
namespace Atom.Web.UI.WebControls.Dialog
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
DefaultProperty(""),
ParseChildren(true),
PersistChildren(false),
Designer(typeof(DialogDesigner)),
ToolboxData("<{0}:JQDialog runat=\"server\"> </{0}:JQDialog>")
]
public class JQDialog : WebControl, INamingContainer
{
private ITemplate _template;
//Methods
protected override void CreateChildControls()
{
Controls.Clear();
if (Template != null)
{
Template.InstantiateIn(this);
}
}
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.AddAttribute(HtmlTextWriterAttribute.Title, this.Title);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
foreach (Control control in this.Controls)
{
control.RenderControl(writer);
}
writer.RenderEndTag();
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + "; ");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".dialog({{");
if (!this.AutoOpen)
{
startupScript.AppendFormat(" autoOpen: false,");
}
if (!this.CloseOnEsc)
{
startupScript.AppendFormat(" closeOnEscape: false,");
}
if (!this.Draggable)
{
startupScript.AppendFormat(" draggable: false,");
}
if (this.HideAnimation != DialogAnimation.None)
{
startupScript.AppendFormat(" hide: '{0}',", this.HideAnimation.ToString().ToLower());
}
if (!string.IsNullOrEmpty(this.Height.ToString()))
{
startupScript.AppendFormat(" height: {0},", this.Height);
}
if (!string.IsNullOrEmpty(this.Width.ToString()))
{
startupScript.AppendFormat(" width: {0},", this.Width);
}
if (!string.IsNullOrEmpty(this.MaxHeight.ToString()))
{
startupScript.AppendFormat(" maxHeight: {0},", this.MaxHeight);
}
if (!string.IsNullOrEmpty(this.MaxWidth.ToString()))
{
startupScript.AppendFormat(" maxWidth: {0},", this.MaxWidth);
}
if (!string.IsNullOrEmpty(this.MinHeight.ToString()))
{
startupScript.AppendFormat(" minHeight: {0},", this.MinHeight);
}
if (!string.IsNullOrEmpty(this.MinWidth.ToString()))
{
startupScript.AppendFormat(" minWidth: {0},", this.MinWidth);
}
if (this.Modal)
{
startupScript.AppendFormat(" modal: true,");
}
//postion
if ((this.Position == DialogPosition.Center)
|| (this.Position == DialogPosition.Bottom)
|| (this.Position == DialogPosition.Top)
|| (this.Position == DialogPosition.Left)
|| (this.Position == DialogPosition.Right))
{
startupScript.AppendFormat(" position: '{0}',", this.Position.ToString().ToLower());
}
else
{
if (this.Position == DialogPosition.CenterLeft)
{ startupScript.AppendFormat(" position: ['center','left'],"); }
if (this.Position == DialogPosition.CenterRight)
{ startupScript.AppendFormat(" position: ['center','right'],"); }
if (this.Position == DialogPosition.BottomLeft)
{ startupScript.AppendFormat(" position: ['bottom','left'],"); }
if (this.Position == DialogPosition.BottomRight)
{ startupScript.AppendFormat(" position: ['bottom','right'],"); }
if (this.Position == DialogPosition.TopLeft)
{ startupScript.AppendFormat(" position: ['top','left'],"); }
if (this.Position == DialogPosition.TopRight)
{ startupScript.AppendFormat(" position: ['top','right'],"); }
-
}
if (!this.Resizable)
{
startupScript.AppendFormat(" resizable: false");
}
if (this.ShowAnimation != DialogAnimation.None)
{
startupScript.AppendFormat(" show: '{0}',", this.ShowAnimation.ToString().ToLower());
}
if (!this.Stack)
{
startupScript.AppendFormat(" stack: false");
}
startupScript.AppendFormat(" title: '{0}',", this.Title);
startupScript.AppendFormat(" zIndex: {0},", this.ZIndex);
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
startupScript.AppendFormat("}})");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
[
Browsable(false),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty)
]
public ITemplate Template
{
get
{
return this._template;
}
set
{
this._template = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DialogAnimation.None)
]
public DialogAnimation ShowAnimation
{
get
{
object show = ViewState["ShowAnimationViewState"];
return (show == null) ? DialogAnimation.None : (DialogAnimation)show;
}
set
{
ViewState["ShowAnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DialogAnimation.None)
]
public DialogAnimation HideAnimation
{
get
{
object hide = ViewState["HideAnimationViewState"];
return (hide == null) ? DialogAnimation.None : (DialogAnimation)hide;
}
set
{
ViewState["HideAnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1000)
]
public int ZIndex
{
get
{
object zIndex = ViewState["ZIndexViewState"];
return (zIndex == null) ? 1000 : Convert.ToInt32(zIndex);
}
set
{
ViewState["ZIndexViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool AutoOpen
{
get
{
object autoOpen = ViewState["AutoOpenViewState"];
return (autoOpen == null) ? true : Convert.ToBoolean(autoOpen);
}
set
{
ViewState["AutoOpenViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool CloseOnEsc
{
get
{
object closeOnEsc = ViewState["CloseOnEscViewState"];
return (closeOnEsc == null) ? true : Convert.ToBoolean(closeOnEsc);
}
set
{
ViewState["CloseOnEscViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool Draggable
{
get
{
object draggable = ViewState["DraggableViewState"];
return (draggable == null) ? true : Convert.ToBoolean(draggable);
}
set
{
ViewState["DraggableViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Modal
{
get
{
object modal = ViewState["ModalViewState"];
return (modal == null) ? false : Convert.ToBoolean(modal);
}
set
{
ViewState["ModalViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool Resizable
{
get
{
object resizable = ViewState["ResizableViewState"];
return (resizable == null) ? true : Convert.ToBoolean(resizable);
}
set
{
ViewState["ResizableViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool Stack
{
get
{
object stack = ViewState["StackViewState"];
return (stack == null) ? true : Convert.ToBoolean(stack);
}
set
{
ViewState["StackViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DialogPosition.Center)
]
public DialogPosition Position
{
get
{
object position = ViewState["PostionViewState"];
return (position == null) ? DialogPosition.Center : (DialogPosition)position;
}
set
{
ViewState["PostionViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string Title
{
get
{
object title = ViewState["TitleViewState"];
return (title == null) ? "" : title.ToString();
}
set
{
ViewState["TitleViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public Unit MaxHeight
{
get
{
object maxHeight = ViewState["MaxHeightViewState"];
return (maxHeight == null) ? Unit.Empty : (Unit)maxHeight;
}
set
{
ViewState["MaxHeightViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public Unit MaxWidth
{
get
{
object maxWidth = ViewState["MaxWidthViewState"];
return (maxWidth == null) ? Unit.Empty : (Unit)maxWidth;
}
set
{
ViewState["MaxWidthViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public Unit MinHeight
{
get
{
object minHeight = ViewState["MinHeightViewState"];
return (minHeight == null) ? Unit.Empty : (Unit)minHeight;
}
set
{
ViewState["MinHeightViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
UrlProperty(""),
DefaultValue("")
]
public Unit MinWidth
{
get
{
object minWidth = ViewState["MinWidthViewState"];
return (minWidth == null) ? Unit.Empty : (Unit)minWidth;
}
set
{
ViewState["MinWidthViewState"] = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
}
}
diff --git a/Atom.Web/Progressbar/JQProgressbar.cs b/Atom.Web/Progressbar/JQProgressbar.cs
index 1c2e836..7344ffd 100644
--- a/Atom.Web/Progressbar/JQProgressbar.cs
+++ b/Atom.Web/Progressbar/JQProgressbar.cs
@@ -1,191 +1,192 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Security.Permissions;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Atom.Web.UI.WebControls.Progressbar
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(ProgressbarDesigner)),
DesignerAttribute(typeof(ProgressbarDesigner)),
ToolboxData("<{0}:JQProgressbar runat=\"server\"> </{0}:JQProgressbar>")
]
public class JQProgressbar : WebControl, IPostBackEventHandler
{
private static readonly object EventValueChanged = new object();
public delegate void ProgressbarValueChangedEventHandler(object sender, ProgressbarValueChangedEventArgs e);
[
Category("Action"),
Description("OnSelectedItemIndexChanging")
]
public event ProgressbarValueChangedEventHandler ValueChanged
{
add
{
Events.AddHandler(EventValueChanged, value);
}
remove
{
Events.RemoveHandler(EventValueChanged, value);
}
}
[
Category("Action"),
Description("")
]
protected virtual void OnValueChanged(ProgressbarValueChangedEventArgs e)
{
ProgressbarValueChangedEventHandler eventHandler = (ProgressbarValueChangedEventHandler)Events[EventValueChanged];
if (eventHandler != null)
{
eventHandler(this, e);
}
}
protected override void OnInit(EventArgs e)
{
string hiddenValue = Page.Request.Params[this.UniqueID + "hiddenValue"];
if ((!string.IsNullOrEmpty(hiddenValue)) && (hiddenValue.StartsWith("progressbarValue:")))
{
this.Value = Convert.ToInt32(hiddenValue.Split(':')[1]);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
string _clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string _clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + ";");
startupScript.AppendFormat("$(document).ready(function() {{ ");
+
startupScript.AppendFormat("var progressbar" + this.UniqueID + " = $('#" + this.UniqueID + "progressbar'); " + this.UniqueID + "= progressbar" + this.UniqueID + ";");
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar({{");
startupScript.AppendFormat("value: parseInt($('#" + this.UniqueID + "hiddenValue').val().split(':')[1]), ");
//Event
startupScript.AppendFormat(" change: function(event, ui) {{ $('#" + this.UniqueID + "hiddenValue').val('progressbarValue:'+ progressbar"+this.UniqueID+".progressbar('option', 'value')); ");
if (Events[EventValueChanged] != null)
{
startupScript.AppendFormat("__doPostBack('" + this.UniqueID + "', 'selectedvaluechanged:'+ progressbar" + this.UniqueID + ".progressbar('option', 'value')); ");
}
startupScript.AppendFormat("}}, ");
startupScript.AppendFormat("}}); ");
//Resizeble
if (this.Resizable)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".resizable();");
}
startupScript.AppendFormat("}}); ");
//Default:true
if (!this.Enabled)
{
startupScript.AppendFormat("progressbar" + this.UniqueID + ".progressbar('disable');");
}
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
//clear span tag
protected override void Render(HtmlTextWriter writer)
{
this.RenderContents(writer);
}
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Value, "progressbarValue:" + this.Value.ToString());
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "progressbar");
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
base.RenderContents(writer);
}
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument != null)
{
if (eventArgument.StartsWith("selectedvaluechanged"))
{
string[] values = eventArgument.Split(':');
this.Value = Convert.ToInt32(values[1]);
ProgressbarValueChangedEventArgs args = new ProgressbarValueChangedEventArgs(this.Value, this);
this.OnValueChanged(args);
}
}
}
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
this.RaisePostBackEvent(eventArgument);
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int Value
{
get
{
object progressValue = (object)ViewState["ValueViewState"];
return (progressValue == null) ? 0 : Convert.ToInt32(progressValue);
}
set
{
ViewState["ValueViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Resizable
{
get
{
object resizable = (object)ViewState["ResizableViewState"];
return (resizable == null) ? false : (bool)resizable;
}
set
{
ViewState["ResizableViewState"] = value;
}
}
}
}
diff --git a/TestApp/DatePicker.aspx b/TestApp/DatePicker.aspx
index 3be1f4c..18bf7fd 100644
--- a/TestApp/DatePicker.aspx
+++ b/TestApp/DatePicker.aspx
@@ -1,30 +1,37 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DatePicker.aspx.cs" Inherits="TestApp.DatePicker" %>
<%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls.DatePicker" TagPrefix="calendar" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>JQDatePicker</title>
<link href="themes/base/ui.all.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
function Button1_onclick()
{
- $('#temp').val( new Date());
+ $('#temp').val(new Date());
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
- <input type="text" name="temp" id="temp" value="" />
- <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
- <calendar:JQDatePicker ID="JQDatePicker2" runat="server" Mode="Calendar" />
- <calendar:JQDatePicker ID="JQDatePicker1" runat="server" Mode="DatePicker" />
+ <div style="float: left">
+ <input type="text" name="temp" id="temp" value="" />
+ <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
+ <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
+ </div>
+ <div style="float: left">
+ <calendar:JQDatePicker ID="JQDatePicker2" runat="server" Mode="Calendar" />
+ </div>
+ <div style="float: left">
+ <calendar:JQDatePicker ID="JQDatePicker1" runat="server" Mode="DatePicker" />
+ </div>
</div>
</form>
</body>
</html>
diff --git a/TestApp/DatePicker.aspx.cs b/TestApp/DatePicker.aspx.cs
index 51fa37c..34f08a8 100644
--- a/TestApp/DatePicker.aspx.cs
+++ b/TestApp/DatePicker.aspx.cs
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TestApp
{
public partial class DatePicker : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
-
+ JQDatePicker1.DefaultDate = DateTime.Today;
}
}
}
\ No newline at end of file
diff --git a/TestApp/DatePicker.aspx.designer.cs b/TestApp/DatePicker.aspx.designer.cs
index 30d96af..6c8b029 100644
--- a/TestApp/DatePicker.aspx.designer.cs
+++ b/TestApp/DatePicker.aspx.designer.cs
@@ -1,42 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TestApp {
public partial class DatePicker {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ /// <summary>
+ /// Calendar1 control.
+ /// </summary>
+ /// <remarks>
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ /// </remarks>
+ protected global::System.Web.UI.WebControls.Calendar Calendar1;
+
/// <summary>
/// JQDatePicker2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Atom.Web.UI.WebControls.DatePicker.JQDatePicker JQDatePicker2;
/// <summary>
/// JQDatePicker1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Atom.Web.UI.WebControls.DatePicker.JQDatePicker JQDatePicker1;
}
}
|
sila/AtomProject
|
810eac3b0be3a5efd63457a3f1206cde39a71317
|
add string and enum properties in startup script
|
diff --git a/Atom.Web/DatePicker/JQDatePicker.cs b/Atom.Web/DatePicker/JQDatePicker.cs
index f9be263..42906a8 100644
--- a/Atom.Web/DatePicker/JQDatePicker.cs
+++ b/Atom.Web/DatePicker/JQDatePicker.cs
@@ -1,1200 +1,1283 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;
using System.Web;
using System.Security.Permissions;
using System.Web.UI.WebControls;
namespace Atom.Web.UI.WebControls.DatePicker
{
[
AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
Designer(typeof(DatePickerDesigner)),
ToolboxData("<{0}:JQDatePicker runat=\"server\"> </{0}:JQDatePicker>")
]
public class JQDatePicker : WebControl
{
private string RenderStartupJavaScript()
{
StringBuilder startupScript = new StringBuilder();
startupScript.AppendFormat("<script type=\"text/javascript\">");
startupScript.AppendFormat("var " + this.UniqueID + "; ");
startupScript.AppendFormat("$(document).ready(function() {{ ");
startupScript.AppendFormat(this.UniqueID + " = $('#" + this.UniqueID + "');");
startupScript.AppendFormat(this.UniqueID + ".datepicker({{");
+ #region bool type properties
if (!this.Enabled)
{
startupScript.AppendFormat(" disabled: true,");
}
if (this.AutoSize)
{
startupScript.AppendFormat(" autoSize: true,");
}
if (this.ButtonImageOnly)
{
startupScript.AppendFormat(" buttonImageOnly: true,");
}
if (this.ChangeMonth)
{
startupScript.AppendFormat(" changeMonth: true,");
}
if (this.ChangeYear)
{
startupScript.AppendFormat(" changeYear: true,");
}
if (!this.ConstrainInput)
{
startupScript.AppendFormat(" constrainInput: false,");
}
if (this.GotoCurrent)
{
startupScript.AppendFormat(" gotoCurrent: true,");
}
if (this.HideIfNoPrevNext)
{
startupScript.AppendFormat(" hideIfNoPrevNext: true,");
}
if (this.IsRTL)
{
startupScript.AppendFormat(" isRTL: true,");
}
if (this.NavigationAsDateFormat)
{
startupScript.AppendFormat(" navigationAsDateFormat: true,");
}
if (this.SelectOtherMonths)
{
startupScript.AppendFormat(" selectOtherMonths: true,");
}
if (this.ShowButtonPanel)
{
startupScript.AppendFormat(" showButtonPanel: true,");
}
if (this.ShowMonthAfterYear)
{
startupScript.AppendFormat(" showMonthAfterYear: true,");
}
if (this.ShowWeek)
{
startupScript.AppendFormat(" showWeek: true,");
}
if (this.ShowOtherMonths)
{
startupScript.AppendFormat(" showOtherMonths: true,");
}
+ #endregion
+ #region int type properties
if (this.FirstDay != 0)
{
startupScript.AppendFormat(" firstDay: {0},", this.FirstDay);
}
if (this.StepMonths != 1)
{
startupScript.AppendFormat(" stepMonths: {0},", this.StepMonths);
}
if (this.ShowCurrentAtPos != 0)
{
startupScript.AppendFormat(" showCurrentAtPos: {0},", this.ShowCurrentAtPos);
}
-
- //array type properties
+ #endregion
+ //calendar matrix
+ startupScript.AppendFormat(" numberOfMonths: [{0}, {1}],", this.NumberOfMonthsVertical, this.NumberOfMonthsHorizontal);
+ #region string type properties
+ if (!string.IsNullOrEmpty(this.AltField))
+ {
+ startupScript.AppendFormat(" altField: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.AltFormat))
+ {
+ startupScript.AppendFormat(" altFormat: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.AppendText))
+ {
+ startupScript.AppendFormat(" appendText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.ButtonImage))
+ {
+ startupScript.AppendFormat(" buttonImage: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.ButtonText))
+ {
+ startupScript.AppendFormat(" buttonText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.CloseText))
+ {
+ startupScript.AppendFormat(" closeText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.CurrentText))
+ {
+ startupScript.AppendFormat(" currentText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.DateFormat))
+ {
+ startupScript.AppendFormat(" dateFormat: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.WeekHeader))
+ {
+ startupScript.AppendFormat(" weekHeader: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.YearRange))
+ {
+ startupScript.AppendFormat(" yearRange: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.YearSuffix))
+ {
+ startupScript.AppendFormat(" yearSuffix: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.NextText))
+ {
+ startupScript.AppendFormat(" nextText: \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.PrevText))
+ {
+ startupScript.AppendFormat(" prevText: \"{0}\",");
+ }
+ //parrerns
+ if (!string.IsNullOrEmpty(this.DefaultDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.MaxDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ if (!string.IsNullOrEmpty(this.MinDatePattern))
+ {
+ startupScript.AppendFormat(": \"{0}\",");
+ }
+ //enums
+ if (this.ShowOn != DatePickerShowOn.Focus)
+ {
+ startupScript.AppendFormat(" showOn: {0},", this.ShowOn.ToString().ToLower());
+ }
+ if (this.Duration != DatePickerDuration.Normal)
+ {
+ startupScript.AppendFormat(" duration: {0},", this.Duration.ToString().ToLower());
+ }
+ if (this.ShowAnimation != DatePickerAnimation.Show)
+ {
+ startupScript.AppendFormat(" showAnim: {0},", this.ShowAnimation.ToString().ToLower());
+ }
+ #endregion
+ #region array type properties
if (!string.IsNullOrEmpty(this.DayNames))
{
startupScript.AppendFormat(" dayNames: [{0}],", this.DayNames);
}
if (!string.IsNullOrEmpty(this.DayNamesMin))
{
startupScript.AppendFormat(" dayNamesMin: [{0}],", this.DayNamesMin);
}
if (!string.IsNullOrEmpty(this.DayNamesShort))
{
startupScript.AppendFormat(" dayNamesShort: [{0}],", this.DayNamesShort);
}
if (!string.IsNullOrEmpty(this.MonthNames))
{
startupScript.AppendFormat(" monthNames: [{0}],", this.MonthNames);
}
if (!string.IsNullOrEmpty(this.MonthNamesShort))
{
startupScript.AppendFormat(" monthNamesShort: [{0}],", this.MonthNamesShort);
}
- //calendar matrix
+ #endregion
+
startupScript.AppendFormat("}})");
if ((this.Mode == DatePickerMode.Calendar) && (this.Draggable))
{
startupScript.AppendFormat(" .draggable()");
}
startupScript.AppendFormat(";");
startupScript.AppendFormat("}})");
startupScript.AppendFormat("</script>");
return startupScript.ToString();
}
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID + "hiddenValue");
writer.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
if (this.Mode == DatePickerMode.DatePicker)
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
writer.RenderBeginTag(HtmlTextWriterTag.Input);
writer.RenderEndTag();
}
else
{
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.UniqueID);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
writer.RenderEndTag();
}
}
protected override void OnPreRender(EventArgs e)
{
string clientPostBackHyperlink = Page.GetPostBackClientHyperlink(this, string.Empty);
string clientPostBackScript = Page.GetPostBackClientEvent(this, string.Empty);
Page.ClientScript.RegisterStartupScript(typeof(Page), this.UniqueID + "startupscript", RenderStartupJavaScript());
base.OnPreRender(e);
}
//properties
#region bool
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool AutoSize
{
get
{
object autoSize = ViewState["AutoSizeViewState"];
return (autoSize == null) ? false : Convert.ToBoolean(autoSize);
}
set
{
ViewState["AutoSizeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ButtonImageOnly
{
get
{
object buttonImageOnly = ViewState["ButtonImageOnlyViewState"];
return (buttonImageOnly == null) ? false : Convert.ToBoolean(buttonImageOnly);
}
set
{
ViewState["ButtonImageOnlyViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeMonth
{
get
{
object changeMonth = ViewState["ChangeMonthViewState"];
return (changeMonth == null) ? false : Convert.ToBoolean(changeMonth);
}
set
{
ViewState["ChangeMonthViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ChangeYear
{
get
{
object changeYear = ViewState["ChangeYearViewState"];
return (changeYear == null) ? false : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ChangeYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(true)
]
public bool ConstrainInput
{
get
{
object changeYear = ViewState["ConstrainInputViewState"];
return (changeYear == null) ? true : Convert.ToBoolean(changeYear);
}
set
{
ViewState["ConstrainInputViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool GotoCurrent
{
get
{
object gotoCurrent = ViewState["GotoCurrentViewState"];
return (gotoCurrent == null) ? false : Convert.ToBoolean(gotoCurrent);
}
set
{
ViewState["GotoCurrentViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool HideIfNoPrevNext
{
get
{
object hideIfNoPrevNext = ViewState["HideIfNoPrevNextViewState"];
return (hideIfNoPrevNext == null) ? false : Convert.ToBoolean(hideIfNoPrevNext);
}
set
{
ViewState["HideIfNoPrevNextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool IsRTL
{
get
{
object rtl = ViewState["IsRTLViewState"];
return (rtl == null) ? false : Convert.ToBoolean(rtl);
}
set
{
ViewState["IsRTLViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool NavigationAsDateFormat
{
get
{
object navigationAsDateFormat = ViewState["NavigationAsDateFormatViewState"];
return (navigationAsDateFormat == null) ? false : Convert.ToBoolean(navigationAsDateFormat);
}
set
{
ViewState["NavigationAsDateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool SelectOtherMonths
{
get
{
object selectOtherMonths = ViewState["SelectOtherMonthsViewState"];
return (selectOtherMonths == null) ? false : Convert.ToBoolean(selectOtherMonths);
}
set
{
ViewState["SelectOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowButtonPanel
{
get
{
object showButtonPanel = ViewState["ShowButtonPanelViewState"];
return (showButtonPanel == null) ? false : Convert.ToBoolean(showButtonPanel);
}
set
{
ViewState["ShowButtonPanelViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowMonthAfterYear
{
get
{
object showMonthAfterYear = ViewState["ShowMonthAfterYearViewState"];
return (showMonthAfterYear == null) ? false : Convert.ToBoolean(showMonthAfterYear);
}
set
{
ViewState["ShowMonthAfterYearViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowWeek
{
get
{
object showWeek = ViewState["ShowWeekViewState"];
return (showWeek == null) ? false : Convert.ToBoolean(showWeek);
}
set
{
ViewState["ShowWeekViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool ShowOtherMonths
{
get
{
object showOtherMonths = ViewState["ShowOtherMonthsViewState"];
return (showOtherMonths == null) ? false : Convert.ToBoolean(showOtherMonths);
}
set
{
ViewState["ShowOtherMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(false)
]
public bool Draggable
{
get
{
object draggable = ViewState["DraggableViewState"];
return (draggable == null) ? false : Convert.ToBoolean(draggable);
}
set
{
ViewState["DraggableViewState"] = value;
}
}
#endregion
#region str
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltField
{
get
{
object autoSize = ViewState["AltFieldViewState"];
return (autoSize == null) ? string.Empty : autoSize.ToString();
}
set
{
ViewState["AltFieldViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AltFormat
{
get
{
object altFormat = ViewState["AltFormatViewState"];
return (altFormat == null) ? string.Empty : altFormat.ToString();
}
set
{
ViewState["AltFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string AppendText
{
get
{
object appendText = ViewState["AppendTextViewState"];
return (appendText == null) ? string.Empty : appendText.ToString();
}
set
{
ViewState["AppendTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ButtonImage
{
get
{
object buttonImage = ViewState["ButtonImageViewState"];
return (buttonImage == null) ? string.Empty : buttonImage.ToString();
}
set
{
ViewState["ButtonImageViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("...")
]
public string ButtonText
{
get
{
object buttonText = ViewState["ButtonTextViewState"];
return (buttonText == null) ? "..." : buttonText.ToString();
}
set
{
ViewState["ButtonTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Done")
]
public string CloseText
{
get
{
object closeText = ViewState["CloseTextViewState"];
return (closeText == null) ? "Done" : closeText.ToString();
}
set
{
ViewState["CloseTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Today")
]
public string CurrentText
{
get
{
object currentText = ViewState["CurrentTextViewState"];
return (currentText == null) ? "Today" : currentText.ToString();
}
set
{
ViewState["CurrentTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("mm/dd/yy")
]
public string DateFormat
{
get
{
object dateFormat = ViewState["DateFormatViewState"];
return (dateFormat == null) ? "mm/dd/yy" : dateFormat.ToString();
}
set
{
ViewState["DateFormatViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Wk")
]
public string WeekHeader
{
get
{
object weekHeader = ViewState["WeekHeaderViewState"];
return (weekHeader == null) ? "Wk" : weekHeader.ToString();
}
set
{
ViewState["WeekHeaderViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("c-10:c+10")
]
public string YearRange
{
get
{
object yearRange = ViewState["YearRangeViewState"];
return (yearRange == null) ? "c-10:c+10" : yearRange.ToString();
}
set
{
ViewState["YearRangeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string YearSuffix
{
get
{
object yearSuffix = ViewState["YearSuffixViewState"];
return (yearSuffix == null) ? string.Empty : yearSuffix.ToString();
}
set
{
ViewState["YearSuffixViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Next")
]
public string NextText
{
get
{
object nextText = ViewState["NextTextViewState"];
return (nextText == null) ? "Next" : nextText.ToString();
}
set
{
ViewState["NextTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("Prev")
]
public string PrevText
{
get
{
object prevText = ViewState["PrevTextViewState"];
return (prevText == null) ? "Prev" : prevText.ToString();
}
set
{
ViewState["PrevTextViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DefaultDatePattern
{
get
{
object defaultDatePattern = ViewState["DefaultDatePatternViewState"];
return (defaultDatePattern == null) ? string.Empty : defaultDatePattern.ToString();
}
set
{
ViewState["DefaultDatePatternViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string MaxDatePattern
{
get
{
object maxDatePattern = ViewState["MaxDatePatternViewState"];
return (maxDatePattern == null) ? string.Empty : maxDatePattern.ToString();
}
set
{
ViewState["MaxDatePatternViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string MinDatePattern
{
get
{
object minDatePattern = ViewState["MinDatePatternViewState"];
return (minDatePattern == null) ? string.Empty : minDatePattern.ToString();
}
set
{
ViewState["MinDatePatternViewState"] = value;
}
}
//enum
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerShowOn.Focus)
]
public DatePickerShowOn ShowOn
{
get
{
object showOn = ViewState["ShowOnViewState"];
return (showOn == null) ? DatePickerShowOn.Focus : (DatePickerShowOn)showOn;
}
set
{
ViewState["ShowOnViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerDuration.Normal)
]
public DatePickerDuration Duration
{
get
{
object duration = ViewState["DurationViewState"];
return (duration == null) ? DatePickerDuration.Normal : (DatePickerDuration)duration;
}
set
{
ViewState["DurationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerAnimation.Show)
]
public DatePickerAnimation ShowAnimation
{
get
{
object showAnimation = ViewState["ShowAnimationViewState"];
return (showAnimation == null) ? DatePickerAnimation.Show : (DatePickerAnimation)showAnimation;
}
set
{
ViewState["ShowAnimationViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(DatePickerMode.DatePicker)
]
public DatePickerMode Mode
{
get
{
object mode = ViewState["ModeViewState"];
return (mode == null) ? DatePickerMode.DatePicker : (DatePickerMode)mode;
}
set
{
ViewState["ModeViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public DateTime DefaultDate
{
get
{
object defaultDate = ViewState["DefaultDateViewState"];
return (defaultDate == null) ? DateTime.Today : Convert.ToDateTime(defaultDate);
}
set
{
ViewState["DefaultDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public DateTime MaxDate
{
get
{
object maxDate = ViewState["MaxDateViewState"];
return (maxDate == null) ? DateTime.MaxValue : Convert.ToDateTime(maxDate);
}
set
{
ViewState["MaxDateViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public DateTime MinDate
{
get
{
object minDate = ViewState["MinDateViewState"];
return (minDate == null) ? DateTime.MinValue : Convert.ToDateTime(minDate);
}
set
{
ViewState["MinDateViewState"] = value;
}
}
#endregion
#region int
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int NumberOfMonthsHorizontal
{
get
{
object numberOfMonthsHorizontal = ViewState["NumberOfMonthsHorizontalViewState"];
return (numberOfMonthsHorizontal == null) ? 1 : Convert.ToInt32(numberOfMonthsHorizontal);
}
set
{
ViewState["NumberOfMonthsHorizontalViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int NumberOfMonthsVertical
{
get
{
object numberOfMonthsVertical = ViewState["NumberOfMonthsVerticalViewState"];
return (numberOfMonthsVertical == null) ? 0 : Convert.ToInt32(numberOfMonthsVertical);
}
set
{
ViewState["NumberOfMonthsVerticalViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int FirstDay
{
get
{
object firstDay = ViewState["FirstDayViewState"];
return (firstDay == null) ? 0 : Convert.ToInt32(firstDay);
}
set
{
ViewState["FirstDayViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(1)
]
public int StepMonths
{
get
{
object stepMonths = ViewState["StepMonthsViewState"];
return (stepMonths == null) ? 1 : Convert.ToInt32(stepMonths);
}
set
{
ViewState["StepMonthsViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
public int ShowCurrentAtPos
{
get
{
object showCurrentAtPos = ViewState["ShowCurrentAtPosViewState"];
return (showCurrentAtPos == null) ? 0 : Convert.ToInt32(showCurrentAtPos);
}
set
{
ViewState["ShowCurrentAtPosViewState"] = value;
}
}
+
+ #endregion
+ #region arr
[
Category("Behavior"),
Description(""),
DefaultValue(0)
]
- public int MonthNamesShort
+ public string MonthNamesShort
{
get
{
object monthNamesShort = ViewState["MonthNamesShortViewState"];
- return (monthNamesShort == null) ? 0 : Convert.ToInt32(monthNamesShort);
+ return (monthNamesShort == null) ? string.Empty : monthNamesShort.ToString();
}
set
{
ViewState["MonthNamesShortViewState"] = value;
}
}
- #endregion
- #region arr
-
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNames
{
get
{
object dayNames = ViewState["DayNamesViewState"];
return (dayNames == null) ? string.Empty : dayNames.ToString();
}
set
{
ViewState["DayNamesViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNamesMin
{
get
{
object dayNamesMin = ViewState["DayNamesMinViewState"];
return (dayNamesMin == null) ? string.Empty : dayNamesMin.ToString();
}
set
{
ViewState["DayNamesMinViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string DayNamesShort
{
get
{
object dayNamesShort = ViewState["DayNamesShortViewState"];
return (dayNamesShort == null) ? string.Empty : dayNamesShort.ToString();
}
set
{
ViewState["DayNamesShortViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string MonthNames
{
get
{
object monthNames = ViewState["MonthNamesViewState"];
return (monthNames == null) ? string.Empty : monthNames.ToString();
}
set
{
ViewState["MonthNamesViewState"] = value;
}
}
-
-
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ShortYearCutoff
{
get
{
object shortYearCutoff = ViewState["ShortYearCutoffViewState"];
return (shortYearCutoff == null) ? string.Empty : shortYearCutoff.ToString();
}
set
{
ViewState["ShortYearCutoffViewState"] = value;
}
}
[
Category("Behavior"),
Description(""),
DefaultValue("")
]
public string ShowOptions
{
get
{
object showOptions = ViewState["ShowOptionsViewState"];
return (showOptions == null) ? string.Empty : showOptions.ToString();
}
set
{
ViewState["ShowOptionsViewState"] = value;
}
}
-
#endregion
#region inherit properties
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override BorderStyle BorderStyle
{
get
{
return base.BorderStyle;
}
set
{
base.BorderStyle = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override Unit BorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override FontInfo Font
{
get
{
return base.Font;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override bool EnableTheming
{
get
{
return base.EnableTheming;
}
set
{
base.EnableTheming = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string ToolTip
{
get
{
return base.ToolTip;
}
set
{
base.ToolTip = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string SkinID
{
get
{
return base.SkinID;
}
set
{
base.SkinID = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
[
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
}
}
#endregion
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.