<%= user_link(@user) %>
-
<%= h(@user.dn) %>
+
<%= h(@user.dn) %>
<% form_tag(:action => 'update', :id => @user) do %>
<%= render :partial => 'form' %>
From codesite-noreply at google.com Sat Nov 3 01:53:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 22:53:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r465 - in
trunk/examples/al-admin: app/controllers app/helpers
app/views/_entry app/views/attribu...
Message-ID: <00163600d06e043dffe580d43f4ed726@google.com>
Author: koutou
Date: Fri Nov 2 22:52:26 2007
New Revision: 465
Added:
trunk/examples/al-admin/app/controllers/attributes_controller.rb
trunk/examples/al-admin/app/helpers/attributes_helper.rb
trunk/examples/al-admin/app/views/attributes/
trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
trunk/examples/al-admin/app/views/attributes/index.rhtml
trunk/examples/al-admin/test/functional/attributes_controller_test.rb
Modified:
trunk/examples/al-admin/app/controllers/application.rb
trunk/examples/al-admin/app/controllers/object_classes_controller.rb
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml
trunk/examples/al-admin/app/views/object_classes/index.rhtml
Log:
* supported attribute list.
Modified: trunk/examples/al-admin/app/controllers/application.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/application.rb (original)
+++ trunk/examples/al-admin/app/controllers/application.rb Fri Nov 2
22:52:26 2007
@@ -20,4 +20,8 @@
default_options["lang"] = lang if lang
default_options.merge(options)
end
+
+ def schema
+ @schema ||= current_ldap_user.schema
+ end
end
Added: trunk/examples/al-admin/app/controllers/attributes_controller.rb
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/controllers/attributes_controller.rb
Fri Nov 2 22:52:26 2007
@@ -0,0 +1,5 @@
+class AttributesController < ApplicationController
+ def index
+ @attributes = schema.attributes
+ end
+end
Modified: trunk/examples/al-admin/app/controllers/object_classes_controller.rb
==============================================================================
---
trunk/examples/al-admin/app/controllers/object_classes_controller.rb (original)
+++
trunk/examples/al-admin/app/controllers/object_classes_controller.rb
Fri Nov 2 22:52:26 2007
@@ -13,9 +13,4 @@
end
raise ActiveRecord::RecordNotFound if @object_class.nil?
end
-
- private
- def schema
- @schema ||= current_ldap_user.schema
- end
end
Added: trunk/examples/al-admin/app/helpers/attributes_helper.rb
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/helpers/attributes_helper.rb Fri Nov 2
22:52:26 2007
@@ -0,0 +1,2 @@
+module AttributesHelper
+end
Modified: trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
==============================================================================
---
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml (original)
+++
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
Fri Nov 2 22:52:26 2007
@@ -3,9 +3,9 @@
- | <%= _("attribute name") %> |
- <%= _("value") %> |
- <%= _("description") %> |
+ <%= _("Attribute name") %> |
+ <%= _("Value") %> |
+ <%= _("Description") %> |
Added: trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/attributes/_attributes.rhtml Fri
Nov 2 22:52:26 2007
@@ -0,0 +1,19 @@
+
+
+
+
+ | <%= _("Attribute name") %> |
+ <%= _("Description") %> |
+
+
+
+
+<% attributes.uniq.sort.each do |attribute| -%>
+
+ | <%= h(la_(attribute)) %> |
+ <%= h(lad_(attribute)) %> |
+
+<% end -%>
+
+
+<% reset_cycle %>
Added: trunk/examples/al-admin/app/views/attributes/index.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/attributes/index.rhtml Fri Nov 2
22:52:26 2007
@@ -0,0 +1,3 @@
+<%= _("Attribute list") %>
+
+<%= render(:partial => "attributes", :object => @attributes) %>
Modified: trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml (original)
+++ trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml Fri Nov
2 22:52:26 2007
@@ -6,6 +6,7 @@
[s_("Menu|Users list"), {:controller => "users"}],
[s_("Menu|Directory"), {:controller => "directory"}],
[s_("Menu|objectClass list"), {:controller => "object_classes"}],
+ [s_("Menu|Attribute list"), {:controller => "attributes"}],
].each do |label, options| -%>
>
<%= link_to(label, options) %>
Modified: trunk/examples/al-admin/app/views/object_classes/index.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/index.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/index.rhtml Fri
Nov 2 22:52:26 2007
@@ -1,4 +1,3 @@
-
<%= _("objectClass list") %>
<%= render(:partial => "object_classes", :object => @object_classes) %>
Added: trunk/examples/al-admin/test/functional/attributes_controller_test.rb
==============================================================================
--- (empty file)
+++
trunk/examples/al-admin/test/functional/attributes_controller_test.rb
Fri Nov 2 22:52:26 2007
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'attributes_controller'
+
+# Re-raise errors caught by the controller.
+class AttributesController; def rescue_action(e) raise e end; end
+
+class AttributesControllerTest < Test::Unit::TestCase
+ def setup
+ @controller = AttributesController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
From codesite-noreply at google.com Sat Nov 3 01:57:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 22:57:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r466 - in
trunk/examples/al-admin/po: en ja nl
Message-ID: <00c09ffb4bcf043dfff3cfa24658226c@google.com>
Author: koutou
Date: Fri Nov 2 22:52:55 2007
New Revision: 466
Modified:
trunk/examples/al-admin/po/en/al-admin.po
trunk/examples/al-admin/po/ja/al-admin.po
trunk/examples/al-admin/po/nl/al-admin.po
Log:
* updated messages.
Modified: trunk/examples/al-admin/po/en/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/en/al-admin.po (original)
+++ trunk/examples/al-admin/po/en/al-admin.po Fri Nov 2 22:52:55 2007
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:20+0900\n"
+"POT-Creation-Date: 2007-11-03 14:52+0900\n"
"PO-Revision-Date: 2007-08-19 09:44+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: English\n"
@@ -75,11 +75,11 @@
msgid "Login or Password is incorrect"
msgstr ""
-#: app/controllers/account_controller.rb:38
+#: app/controllers/account_controller.rb:40
msgid "Thanks for signing up!"
msgstr ""
-#: app/controllers/account_controller.rb:45
+#: app/controllers/account_controller.rb:47
msgid "You have been logged out."
msgstr ""
@@ -128,20 +128,24 @@
msgid "Menu|objectClass list"
msgstr ""
+#: app/views/layouts/_main_menu.rhtml:9
+msgid "Menu|Attribute list"
+msgstr ""
+
#: app/views/_entry/_attributes_information.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:8
-msgid "attribute name"
+#: app/views/attributes/_attributes.rhtml:5
+msgid "Attribute name"
msgstr ""
#: app/views/_entry/_attributes_information.rhtml:7
-#: app/views/users/_attributes_update_form.rhtml:9
-msgid "value"
+msgid "Value"
msgstr ""
#: app/views/_entry/_attributes_information.rhtml:8
-#: app/views/object_classes/_object_classes.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:10
-msgid "description"
+#: app/views/object_classes/show.rhtml:6
+#: app/views/object_classes/_attributes.rhtml:11
+#: app/views/attributes/_attributes.rhtml:6
+msgid "Description"
msgstr ""
#: app/views/_entry/_entry.rhtml:6
@@ -156,9 +160,9 @@
msgid "objectClass name"
msgstr ""
-#: app/views/object_classes/show.rhtml:6
-#: app/views/object_classes/_attributes.rhtml:11
-msgid "Description"
+#: app/views/object_classes/_object_classes.rhtml:6
+#: app/views/users/_attributes_update_form.rhtml:13
+msgid "description"
msgstr ""
#: app/views/object_classes/show.rhtml:15
@@ -182,7 +186,7 @@
msgid "Aliases"
msgstr ""
-#: app/views/object_classes/index.rhtml:2
+#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr ""
@@ -220,10 +224,18 @@
msgid "No user."
msgstr ""
-#: app/views/users/_attributes_update_form.rhtml:3
+#: app/views/users/_attributes_update_form.rhtml:6
msgid "Update attributes"
msgstr ""
+#: app/views/users/_attributes_update_form.rhtml:11
+msgid "attribute name"
+msgstr ""
+
+#: app/views/users/_attributes_update_form.rhtml:12
+msgid "value"
+msgstr ""
+
#: app/views/account/login.rhtml:5
msgid "Login:"
msgstr ""
@@ -244,7 +256,7 @@
msgid "Login"
msgstr ""
-#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:21
+#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:27
msgid "Sign up"
msgstr ""
@@ -262,4 +274,8 @@
#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79
msgid "Please login."
+msgstr ""
+
+#: app/views/attributes/index.rhtml:1
+msgid "Attribute list"
msgstr ""
Modified: trunk/examples/al-admin/po/ja/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/ja/al-admin.po (original)
+++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 2 22:52:55 2007
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:20+0900\n"
-"PO-Revision-Date: 2007-11-03 14:20+0900\n"
+"POT-Creation-Date: 2007-11-03 14:52+0900\n"
+"PO-Revision-Date: 2007-11-03 14:52+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -75,11 +75,11 @@
msgid "Login or Password is incorrect"
msgstr "$B%m%0%$%sL>$^$?$O%Q%9%o!<%I$,4V0c$C$F$$$^$9!#(B"
-#: app/controllers/account_controller.rb:38
+#: app/controllers/account_controller.rb:40
msgid "Thanks for signing up!"
msgstr "$BEPO?$"$j$,$H$&$4$6$$$^$9!*(B"
-#: app/controllers/account_controller.rb:45
+#: app/controllers/account_controller.rb:47
msgid "You have been logged out."
msgstr "$B%m%0%"%&%H$7$^$7$?!#(B"
@@ -128,20 +128,24 @@
msgid "Menu|objectClass list"
msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B"
+#: app/views/layouts/_main_menu.rhtml:9
+msgid "Menu|Attribute list"
+msgstr "$BB0 at -0lMw(B"
+
#: app/views/_entry/_attributes_information.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:8
-msgid "attribute name"
+#: app/views/attributes/_attributes.rhtml:5
+msgid "Attribute name"
msgstr "$BB0 at -L>(B"
#: app/views/_entry/_attributes_information.rhtml:7
-#: app/views/users/_attributes_update_form.rhtml:9
-msgid "value"
+msgid "Value"
msgstr "$BCM(B"
#: app/views/_entry/_attributes_information.rhtml:8
-#: app/views/object_classes/_object_classes.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:10
-msgid "description"
+#: app/views/object_classes/show.rhtml:6
+#: app/views/object_classes/_attributes.rhtml:11
+#: app/views/attributes/_attributes.rhtml:6
+msgid "Description"
msgstr "$B at bL@(B"
#: app/views/_entry/_entry.rhtml:6
@@ -156,9 +160,9 @@
msgid "objectClass name"
msgstr "$B%*%V%8%'%/%H%/%i%9L>(B"
-#: app/views/object_classes/show.rhtml:6
-#: app/views/object_classes/_attributes.rhtml:11
-msgid "Description"
+#: app/views/object_classes/_object_classes.rhtml:6
+#: app/views/users/_attributes_update_form.rhtml:13
+msgid "description"
msgstr "$B at bL@(B"
#: app/views/object_classes/show.rhtml:15
@@ -182,7 +186,7 @@
msgid "Aliases"
msgstr "$BJLL>0lMw(B"
-#: app/views/object_classes/index.rhtml:2
+#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B"
@@ -220,10 +224,18 @@
msgid "No user."
msgstr "$B%f!<%6$,$$$^$;$s!#(B"
-#: app/views/users/_attributes_update_form.rhtml:3
+#: app/views/users/_attributes_update_form.rhtml:6
msgid "Update attributes"
msgstr "$BB0 at -99?7(B"
+#: app/views/users/_attributes_update_form.rhtml:11
+msgid "attribute name"
+msgstr "$BB0 at -L>(B"
+
+#: app/views/users/_attributes_update_form.rhtml:12
+msgid "value"
+msgstr "$BCM(B"
+
#: app/views/account/login.rhtml:5
msgid "Login:"
msgstr "$B%m%0%$%sL>(B:"
@@ -244,7 +256,7 @@
msgid "Login"
msgstr "$B%m%0%$%sL>(B"
-#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:21
+#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:27
msgid "Sign up"
msgstr "$BEPO?(B"
@@ -263,3 +275,7 @@
#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79
msgid "Please login."
msgstr "$B%m%0%$%s$7$F$/$@$5$$!#(B"
+
+#: app/views/attributes/index.rhtml:1
+msgid "Attribute list"
+msgstr "$BB0 at -0lMw(B"
Modified: trunk/examples/al-admin/po/nl/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/nl/al-admin.po (original)
+++ trunk/examples/al-admin/po/nl/al-admin.po Fri Nov 2 22:52:55 2007
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:20+0900\n"
+"POT-Creation-Date: 2007-11-03 14:52+0900\n"
"PO-Revision-Date: 2007-08-24 22:03+0900\n"
"Last-Translator: Ace Suares \n"
"Language-Team: Nederlands \n"
@@ -78,11 +78,11 @@
msgid "Login or Password is incorrect"
msgstr "Gebruikersnaam of Wachtwoord incorrect"
-#: app/controllers/account_controller.rb:38
+#: app/controllers/account_controller.rb:40
msgid "Thanks for signing up!"
msgstr "Bedankt voor het inschrijven!"
-#: app/controllers/account_controller.rb:45
+#: app/controllers/account_controller.rb:47
msgid "You have been logged out."
msgstr "U bent afgemeld."
@@ -133,20 +133,28 @@
msgid "Menu|objectClass list"
msgstr "Gebruikerslijst"
+#: app/views/layouts/_main_menu.rhtml:9
+#, fuzzy
+msgid "Menu|Attribute list"
+msgstr "naam van het attribuut"
+
#: app/views/_entry/_attributes_information.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:8
-msgid "attribute name"
+#: app/views/attributes/_attributes.rhtml:5
+#, fuzzy
+msgid "Attribute name"
msgstr "naam van het attribuut"
#: app/views/_entry/_attributes_information.rhtml:7
-#: app/views/users/_attributes_update_form.rhtml:9
-msgid "value"
+#, fuzzy
+msgid "Value"
msgstr "waarde"
#: app/views/_entry/_attributes_information.rhtml:8
-#: app/views/object_classes/_object_classes.rhtml:6
-#: app/views/users/_attributes_update_form.rhtml:10
-msgid "description"
+#: app/views/object_classes/show.rhtml:6
+#: app/views/object_classes/_attributes.rhtml:11
+#: app/views/attributes/_attributes.rhtml:6
+#, fuzzy
+msgid "Description"
msgstr "beschrijving"
#: app/views/_entry/_entry.rhtml:6
@@ -162,10 +170,9 @@
msgid "objectClass name"
msgstr ""
-#: app/views/object_classes/show.rhtml:6
-#: app/views/object_classes/_attributes.rhtml:11
-#, fuzzy
-msgid "Description"
+#: app/views/object_classes/_object_classes.rhtml:6
+#: app/views/users/_attributes_update_form.rhtml:13
+msgid "description"
msgstr "beschrijving"
#: app/views/object_classes/show.rhtml:15
@@ -191,7 +198,7 @@
msgid "Aliases"
msgstr ""
-#: app/views/object_classes/index.rhtml:2
+#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr ""
@@ -230,11 +237,19 @@
msgid "No user."
msgstr "Geen gebruiker"
-#: app/views/users/_attributes_update_form.rhtml:3
+#: app/views/users/_attributes_update_form.rhtml:6
#, fuzzy
msgid "Update attributes"
msgstr "naam van het attribuut"
+#: app/views/users/_attributes_update_form.rhtml:11
+msgid "attribute name"
+msgstr "naam van het attribuut"
+
+#: app/views/users/_attributes_update_form.rhtml:12
+msgid "value"
+msgstr "waarde"
+
#: app/views/account/login.rhtml:5
#, fuzzy
msgid "Login:"
@@ -257,7 +272,7 @@
msgid "Login"
msgstr "Gebruikersnaam"
-#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:21
+#: app/views/account/sign_up.rhtml:13 app/views/account/sign_up.rhtml:27
msgid "Sign up"
msgstr "inschrijven"
@@ -277,6 +292,11 @@
#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79
msgid "Please login."
msgstr ""
+
+#: app/views/attributes/index.rhtml:1
+#, fuzzy
+msgid "Attribute list"
+msgstr "naam van het attribuut"
#, fuzzy
#~ msgid "Menu|Back"
From codesite-noreply at google.com Sat Nov 3 02:01:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:01:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r467 - in
trunk/examples/al-admin: app/controllers app/views/attributes
public/stylesheets
Message-ID: <00163600d1b5043e00021ee70c589cfd@google.com>
Author: koutou
Date: Fri Nov 2 22:56:15 2007
New Revision: 467
Added:
trunk/examples/al-admin/app/views/attributes/show.rhtml
trunk/examples/al-admin/public/stylesheets/attributes.css
Modified:
trunk/examples/al-admin/app/controllers/attributes_controller.rb
trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
trunk/examples/al-admin/public/stylesheets/detail.css
trunk/examples/al-admin/public/stylesheets/object-classes.css
Log:
* added attribute page.
Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/attributes_controller.rb (original)
+++ trunk/examples/al-admin/app/controllers/attributes_controller.rb
Fri Nov 2 22:56:15 2007
@@ -2,4 +2,13 @@
def index
@attributes = schema.attributes
end
+
+ def show
+ key = params[:id]
+ @attribute = schema.attributes.find do |attribute|
+ attribute.name == key or
+ attribute.id == key
+ end
+ raise ActiveRecord::RecordNotFound if @attribute.nil?
+ end
end
Modified: trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/_attributes.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/_attributes.rhtml Fri
Nov 2 22:56:15 2007
@@ -10,7 +10,10 @@
<% attributes.uniq.sort.each do |attribute| -%>
- | <%= h(la_(attribute)) %> |
+ <%= link_to(h(la_(attribute)),
+ :controller => "attributes",
+ :action => "show",
+ :id => attribute) %> |
<%= h(lad_(attribute)) %> |
<% end -%>
Added: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
22:56:15 2007
@@ -0,0 +1,14 @@
+
+
+
<%= h(la_(@attribute)) %>
+
<%= h(@attribute.id) %>
+
+
<%= _("Description") %>
+
<%= h(lad_(@attribute)) %>
+
+
+
+
+ - <%= link_to s_('Menu|Index'), :action => 'index' %>
+
+
Added: trunk/examples/al-admin/public/stylesheets/attributes.css
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/public/stylesheets/attributes.css Fri Nov
2 22:56:15 2007
@@ -0,0 +1 @@
+ at import url("detail.css");
Modified: trunk/examples/al-admin/public/stylesheets/detail.css
==============================================================================
--- trunk/examples/al-admin/public/stylesheets/detail.css (original)
+++ trunk/examples/al-admin/public/stylesheets/detail.css Fri Nov 2
22:56:15 2007
@@ -29,3 +29,8 @@
text-align: right;
display: block;
}
+
+div.detail p.description
+{
+ margin: 1em;
+}
Modified: trunk/examples/al-admin/public/stylesheets/object-classes.css
==============================================================================
--- trunk/examples/al-admin/public/stylesheets/object-classes.css (original)
+++ trunk/examples/al-admin/public/stylesheets/object-classes.css Fri
Nov 2 22:56:15 2007
@@ -1,10 +1,5 @@
@import url("detail.css");
-p.description
-{
- margin: 1em;
-}
-
td.inherited
{
text-align: center;
From codesite-noreply at google.com Sat Nov 3 02:05:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:05:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r468 - in
trunk/examples/al-admin/app/views: _schema attributes object_classes
Message-ID: <00c09ff7928c043e00106dc7e558e686@google.com>
Author: koutou
Date: Fri Nov 2 23:00:22 2007
New Revision: 468
Added:
trunk/examples/al-admin/app/views/_schema/
trunk/examples/al-admin/app/views/_schema/_aliases.rhtml
- copied unchanged from r452, /trunk/examples/al-admin/app/views/object_classes/_aliases.rhtml
Removed:
trunk/examples/al-admin/app/views/object_classes/_aliases.rhtml
Modified:
trunk/examples/al-admin/app/views/attributes/show.rhtml
trunk/examples/al-admin/app/views/object_classes/show.rhtml
Log:
* supported attribute's alias name information.
Modified: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
23:00:22 2007
@@ -5,6 +5,10 @@
<%= _("Description") %>
<%= h(lad_(@attribute)) %>
+
+<% unless @attribute.aliases.empty? -%>
+ <%= render(:partial => "_schema/aliases", :object => @attribute.aliases) %>
+<% end -%>
Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov
2 23:00:22 2007
@@ -7,7 +7,7 @@
<%= h(locd_(@object_class)) %>
<% unless @object_class.aliases.empty? -%>
- <%= render(:partial => "aliases", :object => @object_class.aliases) %>
+ <%= render(:partial => "_schema/aliases", :object => @object_class.aliases) %>
<% end -%>
From codesite-noreply at google.com Sat Nov 3 02:09:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:09:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r469 -
trunk/examples/al-admin/app/views/object_classes
Message-ID: <00c09ff7922c043e001ec32b4f59005c@google.com>
Author: koutou
Date: Fri Nov 2 23:02:15 2007
New Revision: 469
Modified:
trunk/examples/al-admin/app/views/object_classes/show.rhtml
Log:
* used #switcher.
Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov
2 23:02:15 2007
@@ -10,20 +10,14 @@
<%= render(:partial => "_schema/aliases", :object => @object_class.aliases) %>
<% end -%>
-
-
- <%= _("Super classes") %>
-
-
+ <% switcher("object-classes", _("Super classes")) do %>
<% if @object_class.super_classes.empty? -%>
<%= _("None") %>
<% else -%>
<%= render(:partial => "object_classes",
:object => @object_class.super_classes) %>
<% end -%>
-
- <%= switcher_element('object-classes') %>
-
+ <% end %>
<%= render(:partial => "attributes",
:object => @object_class.must,
From codesite-noreply at google.com Sat Nov 3 02:13:04 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:13:04 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r470 - in
trunk/examples/al-admin/app: helpers views/attributes
views/object_classes
Message-ID: <00c09ff7922c043e002d1919c1591df0@google.com>
Author: koutou
Date: Fri Nov 2 23:11:54 2007
New Revision: 470
Added:
trunk/examples/al-admin/app/views/attributes/_attribute.rhtml
Modified:
trunk/examples/al-admin/app/helpers/application_helper.rb
trunk/examples/al-admin/app/views/attributes/show.rhtml
trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
Log:
* supported attribute detail information.
Modified: trunk/examples/al-admin/app/helpers/application_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/application_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/application_helper.rb Fri Nov
2 23:11:54 2007
@@ -35,4 +35,8 @@
options = options_for_javascript(options)
javascript_tag("new Switcher(#{switch_id}, #{content_id}, #{options});")
end
+
+ def boolean_value(condition)
+ condition ? "o" : "x"
+ end
end
Added: trunk/examples/al-admin/app/views/attributes/_attribute.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/attributes/_attribute.rhtml Fri
Nov 2 23:11:54 2007
@@ -0,0 +1,29 @@
+
+
+
+ | <%= _("Read only") %> |
+ <%= boolean_value(attribute.read_only?) %> |
+
+
+
+ | <%= _("Single value") %> |
+ <%= boolean_value(attribute.single_value?) %> |
+
+
+
+ | <%= _("Binary") %> |
+ <%= boolean_value(attribute.binary?) %> |
+
+
+
+ | <%= _("Binary required") %> |
+ <%= boolean_value(attribute.binary_required?) %> |
+
+
+
+ | <%= _("Syntax") %> |
+ <%= h(ls_(attribute.syntax)) %> |
+
+
+
+<% reset_cycle %>
Modified: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
23:11:54 2007
@@ -9,6 +9,10 @@
<% unless @attribute.aliases.empty? -%>
<%= render(:partial => "_schema/aliases", :object => @attribute.aliases) %>
<% end -%>
+
+ <% switcher("attribute-detail", _("Detail")) do %>
+ <%= render(:partial => "attribute", :object => @attribute) %>
+ <% end %>
Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
Fri Nov 2 23:11:54 2007
@@ -17,7 +17,7 @@
| <%= h(la_(attribute)) %> |
- <%= own_attributes.include?(attribute) ? "x" : "o" %>
+ <%= boolean_value(own_attributes.include?(attribute)) %>
|
<%= h(lad_(attribute)) %> |
From codesite-noreply at google.com Sat Nov 3 02:17:04 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:17:04 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r471 - in
trunk/examples/al-admin/po: en ja nl
Message-ID: <00c09ff7928c043e003b685c3d593eb3@google.com>
Author: koutou
Date: Fri Nov 2 23:13:33 2007
New Revision: 471
Modified:
trunk/examples/al-admin/po/en/al-admin.po
trunk/examples/al-admin/po/ja/al-admin.po
trunk/examples/al-admin/po/nl/al-admin.po
Log:
* updated messages.
Modified: trunk/examples/al-admin/po/en/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/en/al-admin.po (original)
+++ trunk/examples/al-admin/po/en/al-admin.po Fri Nov 2 23:13:33 2007
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:52+0900\n"
+"POT-Creation-Date: 2007-11-03 15:11+0900\n"
"PO-Revision-Date: 2007-08-19 09:44+0900\n"
"Last-Translator: Kouhei Sutou
\n"
"Language-Team: English\n"
@@ -99,8 +99,9 @@
msgid "Done."
msgstr ""
-#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:43
+#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
+#: app/views/attributes/show.rhtml:20
msgid "Menu|Index"
msgstr ""
@@ -144,7 +145,7 @@
#: app/views/_entry/_attributes_information.rhtml:8
#: app/views/object_classes/show.rhtml:6
#: app/views/object_classes/_attributes.rhtml:11
-#: app/views/attributes/_attributes.rhtml:6
+#: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6
msgid "Description"
msgstr ""
@@ -165,27 +166,23 @@
msgid "description"
msgstr ""
-#: app/views/object_classes/show.rhtml:15
+#: app/views/object_classes/show.rhtml:13
msgid "Super classes"
msgstr ""
-#: app/views/object_classes/show.rhtml:19
+#: app/views/object_classes/show.rhtml:15
#: app/views/object_classes/_attributes.rhtml:4
msgid "None"
msgstr ""
-#: app/views/object_classes/show.rhtml:30
+#: app/views/object_classes/show.rhtml:24
msgid "Requeired attributes"
msgstr ""
-#: app/views/object_classes/show.rhtml:36
+#: app/views/object_classes/show.rhtml:30
msgid "Optional attributes"
msgstr ""
-#: app/views/object_classes/_aliases.rhtml:2
-msgid "Aliases"
-msgstr ""
-
#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr ""
@@ -276,6 +273,34 @@
msgid "Please login."
msgstr ""
+#: app/views/attributes/_attribute.rhtml:4
+msgid "Read only"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:9
+msgid "Single value"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:14
+msgid "Binary"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:19
+msgid "Binary required"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:24
+msgid "Syntax"
+msgstr ""
+
+#: app/views/attributes/show.rhtml:13
+msgid "Detail"
+msgstr ""
+
#: app/views/attributes/index.rhtml:1
msgid "Attribute list"
+msgstr ""
+
+#: app/views/_schema/_aliases.rhtml:2
+msgid "Aliases"
msgstr ""
Modified: trunk/examples/al-admin/po/ja/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/ja/al-admin.po (original)
+++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 2 23:13:33 2007
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:52+0900\n"
-"PO-Revision-Date: 2007-11-03 14:52+0900\n"
+"POT-Creation-Date: 2007-11-03 15:11+0900\n"
+"PO-Revision-Date: 2007-11-03 15:13+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -99,8 +99,9 @@
msgid "Done."
msgstr "$B40N;!#(B"
-#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:43
+#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
+#: app/views/attributes/show.rhtml:20
msgid "Menu|Index"
msgstr "$B0lMw(B"
@@ -144,7 +145,7 @@
#: app/views/_entry/_attributes_information.rhtml:8
#: app/views/object_classes/show.rhtml:6
#: app/views/object_classes/_attributes.rhtml:11
-#: app/views/attributes/_attributes.rhtml:6
+#: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6
msgid "Description"
msgstr "$B at bL@(B"
@@ -165,27 +166,23 @@
msgid "description"
msgstr "$B at bL@(B"
-#: app/views/object_classes/show.rhtml:15
+#: app/views/object_classes/show.rhtml:13
msgid "Super classes"
msgstr "$B%9!<%Q!<%H%/%i%90lMw(B"
-#: app/views/object_classes/show.rhtml:19
+#: app/views/object_classes/show.rhtml:15
#: app/views/object_classes/_attributes.rhtml:4
msgid "None"
msgstr "$B$J$7(B"
-#: app/views/object_classes/show.rhtml:30
+#: app/views/object_classes/show.rhtml:24
msgid "Requeired attributes"
msgstr "$BI,?\$NB0 at -0lMw(B"
-#: app/views/object_classes/show.rhtml:36
+#: app/views/object_classes/show.rhtml:30
msgid "Optional attributes"
msgstr "$B>JN,2DG=$JB0 at -0lMw(B"
-#: app/views/object_classes/_aliases.rhtml:2
-msgid "Aliases"
-msgstr "$BJLL>0lMw(B"
-
#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B"
@@ -276,6 +273,34 @@
msgid "Please login."
msgstr "$B%m%0%$%s$7$F$/$@$5$$!#(B"
+#: app/views/attributes/_attribute.rhtml:4
+msgid "Read only"
+msgstr "$BFI$_9~$_ at lMQ(B"
+
+#: app/views/attributes/_attribute.rhtml:9
+msgid "Single value"
+msgstr "$BCM$O0l$D$N$_(B"
+
+#: app/views/attributes/_attribute.rhtml:14
+msgid "Binary"
+msgstr "$B%P%$%J%j(B"
+
+#: app/views/attributes/_attribute.rhtml:19
+msgid "Binary required"
+msgstr "$B%P%$%J%j$,I,?\(B"
+
+#: app/views/attributes/_attribute.rhtml:24
+msgid "Syntax"
+msgstr "$B9=J8(B"
+
+#: app/views/attributes/show.rhtml:13
+msgid "Detail"
+msgstr "$B>\:Y(B"
+
#: app/views/attributes/index.rhtml:1
msgid "Attribute list"
msgstr "$BB0 at -0lMw(B"
+
+#: app/views/_schema/_aliases.rhtml:2
+msgid "Aliases"
+msgstr "$BJLL>0lMw(B"
Modified: trunk/examples/al-admin/po/nl/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/nl/al-admin.po (original)
+++ trunk/examples/al-admin/po/nl/al-admin.po Fri Nov 2 23:13:33 2007
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 14:52+0900\n"
+"POT-Creation-Date: 2007-11-03 15:11+0900\n"
"PO-Revision-Date: 2007-08-24 22:03+0900\n"
"Last-Translator: Ace Suares \n"
"Language-Team: Nederlands \n"
@@ -102,8 +102,9 @@
msgid "Done."
msgstr ""
-#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:43
+#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
+#: app/views/attributes/show.rhtml:20
#, fuzzy
msgid "Menu|Index"
msgstr "menu|Aanmelden"
@@ -152,7 +153,7 @@
#: app/views/_entry/_attributes_information.rhtml:8
#: app/views/object_classes/show.rhtml:6
#: app/views/object_classes/_attributes.rhtml:11
-#: app/views/attributes/_attributes.rhtml:6
+#: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6
#, fuzzy
msgid "Description"
msgstr "beschrijving"
@@ -175,29 +176,25 @@
msgid "description"
msgstr "beschrijving"
-#: app/views/object_classes/show.rhtml:15
+#: app/views/object_classes/show.rhtml:13
msgid "Super classes"
msgstr ""
-#: app/views/object_classes/show.rhtml:19
+#: app/views/object_classes/show.rhtml:15
#: app/views/object_classes/_attributes.rhtml:4
msgid "None"
msgstr ""
-#: app/views/object_classes/show.rhtml:30
+#: app/views/object_classes/show.rhtml:24
#, fuzzy
msgid "Requeired attributes"
msgstr "naam van het attribuut"
-#: app/views/object_classes/show.rhtml:36
+#: app/views/object_classes/show.rhtml:30
#, fuzzy
msgid "Optional attributes"
msgstr "naam van het attribuut"
-#: app/views/object_classes/_aliases.rhtml:2
-msgid "Aliases"
-msgstr ""
-
#: app/views/object_classes/index.rhtml:1
msgid "objectClass list"
msgstr ""
@@ -293,10 +290,38 @@
msgid "Please login."
msgstr ""
+#: app/views/attributes/_attribute.rhtml:4
+msgid "Read only"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:9
+msgid "Single value"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:14
+msgid "Binary"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:19
+msgid "Binary required"
+msgstr ""
+
+#: app/views/attributes/_attribute.rhtml:24
+msgid "Syntax"
+msgstr ""
+
+#: app/views/attributes/show.rhtml:13
+msgid "Detail"
+msgstr ""
+
#: app/views/attributes/index.rhtml:1
#, fuzzy
msgid "Attribute list"
msgstr "naam van het attribuut"
+
+#: app/views/_schema/_aliases.rhtml:2
+msgid "Aliases"
+msgstr ""
#, fuzzy
#~ msgid "Menu|Back"
From codesite-noreply at google.com Sat Nov 3 02:23:04 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:23:04 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r472 - in
trunk/examples/al-admin: app/views/attributes
app/views/object_classes public/stylesheets
Message-ID: <00163600d873043e0050e2ae7258fb6e@google.com>
Author: koutou
Date: Fri Nov 2 23:22:02 2007
New Revision: 472
Modified:
trunk/examples/al-admin/app/views/attributes/show.rhtml
trunk/examples/al-admin/app/views/object_classes/show.rhtml
trunk/examples/al-admin/public/stylesheets/detail.css
Log:
* showed super attribute.
Modified: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
23:22:02 2007
@@ -10,6 +10,15 @@
<%= render(:partial => "_schema/aliases", :object => @attribute.aliases) %>
<% end -%>
+<% if @attribute.super_attribute -%>
+ <%= _("Super attribute") %>
+
+ <%= link_to(h(la_(@attribute)),
+ :action => "show",
+ :id => @attribute) %>
+
+<% end -%>
+
<% switcher("attribute-detail", _("Detail")) do %>
<%= render(:partial => "attribute", :object => @attribute) %>
<% end %>
Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov
2 23:22:02 2007
@@ -10,7 +10,7 @@
<%= render(:partial => "_schema/aliases", :object => @object_class.aliases) %>
<% end -%>
- <% switcher("object-classes", _("Super classes")) do %>
+ <% switcher("super-classes", _("Super classes")) do %>
<% if @object_class.super_classes.empty? -%>
<%= _("None") %>
<% else -%>
Modified: trunk/examples/al-admin/public/stylesheets/detail.css
==============================================================================
--- trunk/examples/al-admin/public/stylesheets/detail.css (original)
+++ trunk/examples/al-admin/public/stylesheets/detail.css Fri Nov 2
23:22:02 2007
@@ -30,7 +30,7 @@
display: block;
}
-div.detail p.description
+div.detail > p
{
margin: 1em;
}
From codesite-noreply at google.com Sat Nov 3 02:27:04 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:27:04 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r473 -
trunk/examples/al-admin/app/views/attributes
Message-ID: <00c09ff7922c043e005f31f3fe598394@google.com>
Author: koutou
Date: Fri Nov 2 23:22:28 2007
New Revision: 473
Modified:
trunk/examples/al-admin/app/views/attributes/show.rhtml
Log:
* fixed typos.
Modified: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
23:22:28 2007
@@ -13,9 +13,9 @@
<% if @attribute.super_attribute -%>
<%= _("Super attribute") %>
- <%= link_to(h(la_(@attribute)),
+ <%= link_to(h(la_(@attribute.super_attribute)),
:action => "show",
- :id => @attribute) %>
+ :id => @attribute.super_attribute) %>
<% end -%>
From codesite-noreply at google.com Sat Nov 3 02:31:05 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:31:05 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r474 - in
trunk/examples/al-admin/po: en ja nl
Message-ID: <00163600d873043e006d85ece9593457@google.com>
Author: koutou
Date: Fri Nov 2 23:23:28 2007
New Revision: 474
Modified:
trunk/examples/al-admin/po/en/al-admin.po
trunk/examples/al-admin/po/ja/al-admin.po
trunk/examples/al-admin/po/nl/al-admin.po
Log:
* updated messages.
Modified: trunk/examples/al-admin/po/en/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/en/al-admin.po (original)
+++ trunk/examples/al-admin/po/en/al-admin.po Fri Nov 2 23:23:28 2007
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:11+0900\n"
+"POT-Creation-Date: 2007-11-03 15:22+0900\n"
"PO-Revision-Date: 2007-08-19 09:44+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: English\n"
@@ -101,7 +101,7 @@
#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
-#: app/views/attributes/show.rhtml:20
+#: app/views/attributes/show.rhtml:29
msgid "Menu|Index"
msgstr ""
@@ -293,7 +293,11 @@
msgid "Syntax"
msgstr ""
-#: app/views/attributes/show.rhtml:13
+#: app/views/attributes/show.rhtml:14
+msgid "Super attribute"
+msgstr ""
+
+#: app/views/attributes/show.rhtml:22
msgid "Detail"
msgstr ""
Modified: trunk/examples/al-admin/po/ja/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/ja/al-admin.po (original)
+++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 2 23:23:28 2007
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:11+0900\n"
-"PO-Revision-Date: 2007-11-03 15:13+0900\n"
+"POT-Creation-Date: 2007-11-03 15:22+0900\n"
+"PO-Revision-Date: 2007-11-03 15:23+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -101,7 +101,7 @@
#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
-#: app/views/attributes/show.rhtml:20
+#: app/views/attributes/show.rhtml:29
msgid "Menu|Index"
msgstr "$B0lMw(B"
@@ -168,7 +168,7 @@
#: app/views/object_classes/show.rhtml:13
msgid "Super classes"
-msgstr "$B%9!<%Q!<%H%/%i%90lMw(B"
+msgstr "$B%9!<%Q!<%/%i%90lMw(B"
#: app/views/object_classes/show.rhtml:15
#: app/views/object_classes/_attributes.rhtml:4
@@ -293,7 +293,11 @@
msgid "Syntax"
msgstr "$B9=J8(B"
-#: app/views/attributes/show.rhtml:13
+#: app/views/attributes/show.rhtml:14
+msgid "Super attribute"
+msgstr "$B%9!<%Q!\:Y(B"
Modified: trunk/examples/al-admin/po/nl/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/nl/al-admin.po (original)
+++ trunk/examples/al-admin/po/nl/al-admin.po Fri Nov 2 23:23:28 2007
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:11+0900\n"
+"POT-Creation-Date: 2007-11-03 15:22+0900\n"
"PO-Revision-Date: 2007-08-24 22:03+0900\n"
"Last-Translator: Ace Suares \n"
"Language-Team: Nederlands \n"
@@ -104,7 +104,7 @@
#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
-#: app/views/attributes/show.rhtml:20
+#: app/views/attributes/show.rhtml:29
#, fuzzy
msgid "Menu|Index"
msgstr "menu|Aanmelden"
@@ -310,7 +310,12 @@
msgid "Syntax"
msgstr ""
-#: app/views/attributes/show.rhtml:13
+#: app/views/attributes/show.rhtml:14
+#, fuzzy
+msgid "Super attribute"
+msgstr "naam van het attribuut"
+
+#: app/views/attributes/show.rhtml:22
msgid "Detail"
msgstr ""
From codesite-noreply at google.com Sat Nov 3 02:35:05 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:35:05 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r475 -
trunk/examples/al-admin/po/ja
Message-ID: <00163600d06e043e007bd6652c500440@google.com>
Author: koutou
Date: Fri Nov 2 23:23:58 2007
New Revision: 475
Modified:
trunk/examples/al-admin/po/ja/al-admin.po
Log:
* improved translations.
Modified: trunk/examples/al-admin/po/ja/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/ja/al-admin.po (original)
+++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 2 23:23:58 2007
@@ -168,7 +168,7 @@
#: app/views/object_classes/show.rhtml:13
msgid "Super classes"
-msgstr "$B%9!<%Q!<%/%i%90lMw(B"
+msgstr "$B?F%/%i%90lMw(B"
#: app/views/object_classes/show.rhtml:15
#: app/views/object_classes/_attributes.rhtml:4
@@ -295,7 +295,7 @@
#: app/views/attributes/show.rhtml:14
msgid "Super attribute"
-msgstr "$B%9!<%Q!
Author: koutou
Date: Fri Nov 2 23:24:50 2007
New Revision: 476
Added:
trunk/examples/al-admin/app/views/attributes/_detail.rhtml
- copied unchanged from r470, /trunk/examples/al-admin/app/views/attributes/_attribute.rhtml
Removed:
trunk/examples/al-admin/app/views/attributes/_attribute.rhtml
Modified:
trunk/examples/al-admin/app/views/attributes/show.rhtml
Log:
* improved name.
Modified: trunk/examples/al-admin/app/views/attributes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/show.rhtml Fri Nov 2
23:24:50 2007
@@ -20,7 +20,7 @@
<% end -%>
<% switcher("attribute-detail", _("Detail")) do %>
- <%= render(:partial => "attribute", :object => @attribute) %>
+ <%= render(:partial => "detail", :locals => {:attribute => @attribute}) %>
<% end %>
From codesite-noreply at google.com Sat Nov 3 02:43:05 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:43:05 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r477 - in
trunk/examples/al-admin/app: helpers views/_entry
views/object_classes
Message-ID: <00163600d873043e00987958f7598bc6@google.com>
Author: koutou
Date: Fri Nov 2 23:30:31 2007
New Revision: 477
Modified:
trunk/examples/al-admin/app/helpers/attributes_helper.rb
trunk/examples/al-admin/app/helpers/directory_helper.rb
trunk/examples/al-admin/app/helpers/object_classes_helper.rb
trunk/examples/al-admin/app/helpers/users_helper.rb
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml
Log:
* link to attribute.
Modified: trunk/examples/al-admin/app/helpers/attributes_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/attributes_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/attributes_helper.rb Fri Nov 2
23:30:31 2007
@@ -1,2 +1,8 @@
module AttributesHelper
+ def link_to_attribute(attribute)
+ link_to(h(la_(attribute)),
+ :controller => "attributes",
+ :action => "show",
+ :id => attribute)
+ end
end
Modified: trunk/examples/al-admin/app/helpers/directory_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/directory_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/directory_helper.rb Fri Nov 2
23:30:31 2007
@@ -1,4 +1,6 @@
module DirectoryHelper
+ include ObjectClassesHelper
+
def failed_to_retrieve_entry_message
content_tag(:h2, _("Failed to retrieve the entry"))
end
Modified: trunk/examples/al-admin/app/helpers/object_classes_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/object_classes_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/object_classes_helper.rb Fri
Nov 2 23:30:31 2007
@@ -1,2 +1,10 @@
module ObjectClassesHelper
+ include AttributesHelper
+
+ def link_to_object_class(object_class)
+ link_to(h(loc_(object_class)),
+ :controller => "object_classes",
+ :action => "show",
+ :id => object_class)
+ end
end
Modified: trunk/examples/al-admin/app/helpers/users_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/users_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/users_helper.rb Fri Nov 2
23:30:31 2007
@@ -1,4 +1,6 @@
module UsersHelper
+ include ObjectClassesHelper
+
def user_link(user, with_edit=false)
user_link_if(true, user, with_edit)
end
Modified: trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
==============================================================================
---
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml (original)
+++
trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml
Fri Nov 2 23:30:31 2007
@@ -12,7 +12,7 @@
<% (entry.attribute_names(true) - ["objectClass"]).sort.each do |name| -%>
- | <%= h(la_(name)) %> |
+ <%= link_to_attribute(name) %> |
<%= h(entry[name, true].join(", ")) %> |
<%= h(lad_(name)) %> |
Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original)
+++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml
Fri Nov 2 23:30:31 2007
@@ -15,7 +15,7 @@
<% attributes.sort.each do |attribute| %>
- | <%= h(la_(attribute)) %> |
+ <%= link_to_attribute(attribute) %> |
<%= boolean_value(own_attributes.include?(attribute)) %>
|
Modified: trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml
==============================================================================
---
trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml (original)
+++
trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml
Fri Nov 2 23:30:31 2007
@@ -10,10 +10,7 @@
<% object_classes.uniq.sort.each do |object_class| -%>
- | <%= link_to(h(loc_(object_class)),
- :controller => "object_classes",
- :action => "show",
- :id => object_class) %> |
+ <%= link_to_object_class(object_class) %> |
<%=h locd_(object_class) %> |
<% end -%>
From codesite-noreply at google.com Sat Nov 3 02:47:06 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Fri, 02 Nov 2007 23:47:06 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r478 -
trunk/examples/al-admin/app/controllers
Message-ID: <00163600d2c5043e00a6ca5bc059e31c@google.com>
Author: koutou
Date: Fri Nov 2 23:32:20 2007
New Revision: 478
Modified:
trunk/examples/al-admin/app/controllers/attributes_controller.rb
Log:
* required login for viewing attributes.
Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/attributes_controller.rb (original)
+++ trunk/examples/al-admin/app/controllers/attributes_controller.rb
Fri Nov 2 23:32:20 2007
@@ -1,4 +1,6 @@
class AttributesController < ApplicationController
+ before_filter :login_required
+
def index
@attributes = schema.attributes
end
From codesite-noreply at google.com Sat Nov 3 09:24:12 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 06:24:12 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r479 - in
trunk/examples/al-admin: app/controllers app/helpers
app/views/attributes app/views/lay...
Message-ID: <00163600d1b5043e0632ee23ac64fed0@google.com>
Author: koutou
Date: Sat Nov 3 06:23:01 2007
New Revision: 479
Added:
trunk/examples/al-admin/app/controllers/syntaxes_controller.rb
trunk/examples/al-admin/app/helpers/syntaxes_helper.rb
trunk/examples/al-admin/app/views/syntaxes/
trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml
trunk/examples/al-admin/app/views/syntaxes/index.rhtml
trunk/examples/al-admin/app/views/syntaxes/show.rhtml
trunk/examples/al-admin/public/stylesheets/syntaxes.css
trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb
Modified:
trunk/examples/al-admin/app/controllers/attributes_controller.rb
trunk/examples/al-admin/app/controllers/object_classes_controller.rb
trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml
trunk/examples/al-admin/config/routes.rb
trunk/examples/al-admin/public/stylesheets/base.css
Log:
* supported syntax list.
Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/attributes_controller.rb (original)
+++ trunk/examples/al-admin/app/controllers/attributes_controller.rb
Sat Nov 3 06:23:01 2007
@@ -6,7 +6,8 @@
end
def show
- key = params[:id]
+ key = params[:id].to_a.flatten.compact[0]
+ raise ActiveRecord::RecordNotFound if key.nil?
@attribute = schema.attributes.find do |attribute|
attribute.name == key or
attribute.id == key
Modified: trunk/examples/al-admin/app/controllers/object_classes_controller.rb
==============================================================================
---
trunk/examples/al-admin/app/controllers/object_classes_controller.rb (original)
+++
trunk/examples/al-admin/app/controllers/object_classes_controller.rb
Sat Nov 3 06:23:01 2007
@@ -6,7 +6,8 @@
end
def show
- key = params[:id]
+ key = params[:id].to_a.flatten.compact[0]
+ raise ActiveRecord::RecordNotFound if key.nil?
@object_class = schema.object_classes.find do |object_class|
object_class.name == key or
object_class.id == key
Added: trunk/examples/al-admin/app/controllers/syntaxes_controller.rb
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/controllers/syntaxes_controller.rb Sat
Nov 3 06:23:01 2007
@@ -0,0 +1,17 @@
+class SyntaxesController < ApplicationController
+ before_filter :login_required
+
+ def index
+ @syntaxes = schema.ldap_syntaxes
+ end
+
+ def show
+ key = params[:id].to_a.flatten.compact[0]
+ raise ActiveRecord::RecordNotFound if key.nil?
+ @syntax = schema.ldap_syntaxes.find do |syntax|
+ syntax.name == key or
+ syntax.id == key
+ end
+ raise ActiveRecord::RecordNotFound if @syntax.nil?
+ end
+end
Added: trunk/examples/al-admin/app/helpers/syntaxes_helper.rb
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/helpers/syntaxes_helper.rb Sat Nov 3
06:23:01 2007
@@ -0,0 +1,8 @@
+module SyntaxesHelper
+ def link_to_syntax(syntax)
+ link_to(h(ls_(syntax)),
+ :controller => "syntaxes",
+ :action => "show",
+ :id => syntax)
+ end
+end
Modified: trunk/examples/al-admin/app/views/attributes/_attributes.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/_attributes.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/_attributes.rhtml Sat
Nov 3 06:23:01 2007
@@ -10,10 +10,7 @@
<% attributes.uniq.sort.each do |attribute| -%>
- | <%= link_to(h(la_(attribute)),
- :controller => "attributes",
- :action => "show",
- :id => attribute) %> |
+ <%= link_to_attribute(attribute) %> |
<%= h(lad_(attribute)) %> |
<% end -%>
Modified: trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml (original)
+++ trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml Sat Nov
3 06:23:01 2007
@@ -7,6 +7,7 @@
[s_("Menu|Directory"), {:controller => "directory"}],
[s_("Menu|objectClass list"), {:controller => "object_classes"}],
[s_("Menu|Attribute list"), {:controller => "attributes"}],
+ [s_("Menu|Syntax list"), {:controller => "syntaxes"}],
].each do |label, options| -%>
>
<%= link_to(label, options) %>
Added: trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml Sat Nov
3 06:23:01 2007
@@ -0,0 +1,19 @@
+
+
+
+
+ | <%= _("Syntax name") %> |
+ <%= _("Description") %> |
+
+
+
+
+<% syntaxes.uniq.sort.each do |syntax| -%>
+
+ | <%= link_to_syntax(syntax) %> |
+ <%= h(lsd_(syntax)) %> |
+
+<% end -%>
+
+
+<% reset_cycle %>
Added: trunk/examples/al-admin/app/views/syntaxes/index.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/syntaxes/index.rhtml Sat Nov 3
06:23:01 2007
@@ -0,0 +1,3 @@
+<%= _("Syntax list") %>
+
+<%= render(:partial => "syntaxes", :object => @syntaxes) %>
Added: trunk/examples/al-admin/app/views/syntaxes/show.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/syntaxes/show.rhtml Sat Nov 3
06:23:01 2007
@@ -0,0 +1,14 @@
+
+
+
<%= h(ls_(@syntax)) %>
+
<%= h(@syntax.id) %>
+
+
<%= _("Description") %>
+
<%= h(lsd_(@syntax)) %>
+
+
+
+
+ - <%= link_to s_('Menu|Index'), :action => 'index' %>
+
+
Modified: trunk/examples/al-admin/config/routes.rb
==============================================================================
--- trunk/examples/al-admin/config/routes.rb (original)
+++ trunk/examples/al-admin/config/routes.rb Sat Nov 3 06:23:01 2007
@@ -29,6 +29,13 @@
# -- just remember to delete public/index.html.
lang_map.call(:top, '', :controller => "welcome")
+ lang_map.call(:connect, 'object_class/*id',
+ :controller => "object_classes", :action => "show")
+ lang_map.call(:connect, 'attribute/*id',
+ :controller => "attributes", :action => "show")
+ lang_map.call(:connect, 'syntax/*id',
+ :controller => "syntaxes", :action => "show")
+
# Allow downloading Web Service WSDL as a file with an extension
# instead of a file named 'wsdl'
lang_map.call(:connect, ':controller/service.wsdl', :action => 'wsdl')
Modified: trunk/examples/al-admin/public/stylesheets/base.css
==============================================================================
--- trunk/examples/al-admin/public/stylesheets/base.css (original)
+++ trunk/examples/al-admin/public/stylesheets/base.css Sat Nov 3
06:23:01 2007
@@ -37,6 +37,7 @@
div#flash-box
{
position: absolute;
+ top: 0;
left: 0;
width: 100%;
background-color: #fcfffc;
Added: trunk/examples/al-admin/public/stylesheets/syntaxes.css
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/public/stylesheets/syntaxes.css Sat Nov 3
06:23:01 2007
@@ -0,0 +1 @@
+ at import url("detail.css");
Added: trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb
Sat Nov 3 06:23:01 2007
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'syntaxes_controller'
+
+# Re-raise errors caught by the controller.
+class SyntaxesController; def rescue_action(e) raise e end; end
+
+class SyntaxesControllerTest < Test::Unit::TestCase
+ def setup
+ @controller = SyntaxesController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
From codesite-noreply at google.com Sat Nov 3 09:35:12 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 06:35:12 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r480 -
trunk/examples/al-admin/app/views/syntaxes
Message-ID: <00c09ff7928c043e065a4f422c6574e2@google.com>
Author: koutou
Date: Sat Nov 3 06:34:24 2007
New Revision: 480
Added:
trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml
Modified:
trunk/examples/al-admin/app/views/syntaxes/show.rhtml
Log:
* showed details.
Added: trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml
==============================================================================
--- (empty file)
+++ trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml Sat Nov 3
06:34:24 2007
@@ -0,0 +1,14 @@
+
+
+
+ | <%= _("Binary tranfer required") %> |
+ <%= boolean_value(syntax.binary_transfer_required?) %> |
+
+
+
+ | <%= _("Human readable") %> |
+ <%= boolean_value(syntax.human_readable?) %> |
+
+
+
+<% reset_cycle %>
Modified: trunk/examples/al-admin/app/views/syntaxes/show.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/syntaxes/show.rhtml (original)
+++ trunk/examples/al-admin/app/views/syntaxes/show.rhtml Sat Nov 3
06:34:24 2007
@@ -5,6 +5,14 @@
<%= _("Description") %>
<%= h(lsd_(@syntax)) %>
+
+<% unless @syntax.aliases.empty? -%>
+ <%= render(:partial => "_schema/aliases", :object => @syntax.aliases) %>
+<% end -%>
+
+ <% switcher("syntax-detail", _("Detail")) do %>
+ <%= render(:partial => "detail", :locals => {:syntax => @syntax}) %>
+ <% end %>
From codesite-noreply at google.com Sat Nov 3 09:39:13 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 06:39:13 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r481 - in
trunk/examples/al-admin/po: en ja nl
Message-ID: <00163600d1b5043e0668a67f1d65694d@google.com>
Author: koutou
Date: Sat Nov 3 06:37:32 2007
New Revision: 481
Modified:
trunk/examples/al-admin/po/en/al-admin.po
trunk/examples/al-admin/po/ja/al-admin.po
trunk/examples/al-admin/po/nl/al-admin.po
Log:
* updated messages.
Modified: trunk/examples/al-admin/po/en/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/en/al-admin.po (original)
+++ trunk/examples/al-admin/po/en/al-admin.po Sat Nov 3 06:37:32 2007
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:22+0900\n"
+"POT-Creation-Date: 2007-11-03 22:35+0900\n"
"PO-Revision-Date: 2007-08-19 09:44+0900\n"
"Last-Translator: Kouhei Sutou
\n"
"Language-Team: English\n"
@@ -87,11 +87,11 @@
msgid "User was successfully updated."
msgstr ""
-#: app/helpers/directory_helper.rb:3
+#: app/helpers/directory_helper.rb:5
msgid "Failed to retrieve the entry"
msgstr ""
-#: app/helpers/users_helper.rb:10
+#: app/helpers/users_helper.rb:12
msgid "Edit"
msgstr ""
@@ -101,7 +101,7 @@
#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
-#: app/views/attributes/show.rhtml:29
+#: app/views/syntaxes/show.rhtml:20 app/views/attributes/show.rhtml:29
msgid "Menu|Index"
msgstr ""
@@ -133,6 +133,10 @@
msgid "Menu|Attribute list"
msgstr ""
+#: app/views/layouts/_main_menu.rhtml:10
+msgid "Menu|Syntax list"
+msgstr ""
+
#: app/views/_entry/_attributes_information.rhtml:6
#: app/views/attributes/_attributes.rhtml:5
msgid "Attribute name"
@@ -145,6 +149,7 @@
#: app/views/_entry/_attributes_information.rhtml:8
#: app/views/object_classes/show.rhtml:6
#: app/views/object_classes/_attributes.rhtml:11
+#: app/views/syntaxes/_syntaxes.rhtml:6 app/views/syntaxes/show.rhtml:6
#: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6
msgid "Description"
msgstr ""
@@ -257,6 +262,26 @@
msgid "Sign up"
msgstr ""
+#: app/views/syntaxes/_syntaxes.rhtml:5
+msgid "Syntax name"
+msgstr ""
+
+#: app/views/syntaxes/show.rhtml:13 app/views/attributes/show.rhtml:22
+msgid "Detail"
+msgstr ""
+
+#: app/views/syntaxes/_detail.rhtml:4
+msgid "Binary tranfer required"
+msgstr ""
+
+#: app/views/syntaxes/_detail.rhtml:9
+msgid "Human readable"
+msgstr ""
+
+#: app/views/syntaxes/index.rhtml:1
+msgid "Syntax list"
+msgstr ""
+
#: app/views/welcome/index.rhtml:4
msgid "Menu|Populate"
msgstr ""
@@ -273,32 +298,28 @@
msgid "Please login."
msgstr ""
-#: app/views/attributes/_attribute.rhtml:4
+#: app/views/attributes/show.rhtml:14
+msgid "Super attribute"
+msgstr ""
+
+#: app/views/attributes/_detail.rhtml:4
msgid "Read only"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:9
+#: app/views/attributes/_detail.rhtml:9
msgid "Single value"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:14
+#: app/views/attributes/_detail.rhtml:14
msgid "Binary"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:19
+#: app/views/attributes/_detail.rhtml:19
msgid "Binary required"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:24
+#: app/views/attributes/_detail.rhtml:24
msgid "Syntax"
-msgstr ""
-
-#: app/views/attributes/show.rhtml:14
-msgid "Super attribute"
-msgstr ""
-
-#: app/views/attributes/show.rhtml:22
-msgid "Detail"
msgstr ""
#: app/views/attributes/index.rhtml:1
Modified: trunk/examples/al-admin/po/ja/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/ja/al-admin.po (original)
+++ trunk/examples/al-admin/po/ja/al-admin.po Sat Nov 3 06:37:32 2007
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:22+0900\n"
-"PO-Revision-Date: 2007-11-03 15:23+0900\n"
+"POT-Creation-Date: 2007-11-03 22:35+0900\n"
+"PO-Revision-Date: 2007-11-03 22:36+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -87,11 +87,11 @@
msgid "User was successfully updated."
msgstr "$B%f!<%6$r at 5>o$K99?7$7$^$7$?!#(B"
-#: app/helpers/directory_helper.rb:3
+#: app/helpers/directory_helper.rb:5
msgid "Failed to retrieve the entry"
msgstr "$B;XDj$5$l$?%(%s%H%j$N(B"
+
+#: app/views/syntaxes/show.rhtml:13 app/views/attributes/show.rhtml:22
+msgid "Detail"
+msgstr "$B>\:Y(B"
+
+#: app/views/syntaxes/_detail.rhtml:4
+msgid "Binary tranfer required"
+msgstr "$B%P%$%J%j$,I,?\(B"
+
+#: app/views/syntaxes/_detail.rhtml:9
+msgid "Human readable"
+msgstr "$B2DFI(B"
+
+#: app/views/syntaxes/index.rhtml:1
+msgid "Syntax list"
+msgstr "$B9=J80lMw(B"
+
#: app/views/welcome/index.rhtml:4
msgid "Menu|Populate"
msgstr "$B9=C[(B"
@@ -273,33 +298,29 @@
msgid "Please login."
msgstr "$B%m%0%$%s$7$F$/$@$5$$!#(B"
-#: app/views/attributes/_attribute.rhtml:4
+#: app/views/attributes/show.rhtml:14
+msgid "Super attribute"
+msgstr "$B?FB0 at -(B"
+
+#: app/views/attributes/_detail.rhtml:4
msgid "Read only"
msgstr "$BFI$_9~$_ at lMQ(B"
-#: app/views/attributes/_attribute.rhtml:9
+#: app/views/attributes/_detail.rhtml:9
msgid "Single value"
msgstr "$BCM$O0l$D$N$_(B"
-#: app/views/attributes/_attribute.rhtml:14
+#: app/views/attributes/_detail.rhtml:14
msgid "Binary"
msgstr "$B%P%$%J%j(B"
-#: app/views/attributes/_attribute.rhtml:19
+#: app/views/attributes/_detail.rhtml:19
msgid "Binary required"
msgstr "$B%P%$%J%j$,I,?\(B"
-#: app/views/attributes/_attribute.rhtml:24
+#: app/views/attributes/_detail.rhtml:24
msgid "Syntax"
msgstr "$B9=J8(B"
-
-#: app/views/attributes/show.rhtml:14
-msgid "Super attribute"
-msgstr "$B?FB0 at -(B"
-
-#: app/views/attributes/show.rhtml:22
-msgid "Detail"
-msgstr "$B>\:Y(B"
#: app/views/attributes/index.rhtml:1
msgid "Attribute list"
Modified: trunk/examples/al-admin/po/nl/al-admin.po
==============================================================================
--- trunk/examples/al-admin/po/nl/al-admin.po (original)
+++ trunk/examples/al-admin/po/nl/al-admin.po Sat Nov 3 06:37:32 2007
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: AL Admin 0.8.4\n"
-"POT-Creation-Date: 2007-11-03 15:22+0900\n"
+"POT-Creation-Date: 2007-11-03 22:35+0900\n"
"PO-Revision-Date: 2007-08-24 22:03+0900\n"
"Last-Translator: Ace Suares \n"
"Language-Team: Nederlands \n"
@@ -90,11 +90,11 @@
msgid "User was successfully updated."
msgstr "Gebruikersgegevens bijgewerkt."
-#: app/helpers/directory_helper.rb:3
+#: app/helpers/directory_helper.rb:5
msgid "Failed to retrieve the entry"
msgstr ""
-#: app/helpers/users_helper.rb:10
+#: app/helpers/users_helper.rb:12
msgid "Edit"
msgstr "bewerken"
@@ -104,7 +104,7 @@
#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37
#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9
-#: app/views/attributes/show.rhtml:29
+#: app/views/syntaxes/show.rhtml:20 app/views/attributes/show.rhtml:29
#, fuzzy
msgid "Menu|Index"
msgstr "menu|Aanmelden"
@@ -139,6 +139,11 @@
msgid "Menu|Attribute list"
msgstr "naam van het attribuut"
+#: app/views/layouts/_main_menu.rhtml:10
+#, fuzzy
+msgid "Menu|Syntax list"
+msgstr "Gebruikerslijst"
+
#: app/views/_entry/_attributes_information.rhtml:6
#: app/views/attributes/_attributes.rhtml:5
#, fuzzy
@@ -153,6 +158,7 @@
#: app/views/_entry/_attributes_information.rhtml:8
#: app/views/object_classes/show.rhtml:6
#: app/views/object_classes/_attributes.rhtml:11
+#: app/views/syntaxes/_syntaxes.rhtml:6 app/views/syntaxes/show.rhtml:6
#: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6
#, fuzzy
msgid "Description"
@@ -273,6 +279,26 @@
msgid "Sign up"
msgstr "inschrijven"
+#: app/views/syntaxes/_syntaxes.rhtml:5
+msgid "Syntax name"
+msgstr ""
+
+#: app/views/syntaxes/show.rhtml:13 app/views/attributes/show.rhtml:22
+msgid "Detail"
+msgstr ""
+
+#: app/views/syntaxes/_detail.rhtml:4
+msgid "Binary tranfer required"
+msgstr ""
+
+#: app/views/syntaxes/_detail.rhtml:9
+msgid "Human readable"
+msgstr ""
+
+#: app/views/syntaxes/index.rhtml:1
+msgid "Syntax list"
+msgstr ""
+
#: app/views/welcome/index.rhtml:4
#, fuzzy
msgid "Menu|Populate"
@@ -290,33 +316,29 @@
msgid "Please login."
msgstr ""
-#: app/views/attributes/_attribute.rhtml:4
+#: app/views/attributes/show.rhtml:14
+#, fuzzy
+msgid "Super attribute"
+msgstr "naam van het attribuut"
+
+#: app/views/attributes/_detail.rhtml:4
msgid "Read only"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:9
+#: app/views/attributes/_detail.rhtml:9
msgid "Single value"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:14
+#: app/views/attributes/_detail.rhtml:14
msgid "Binary"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:19
+#: app/views/attributes/_detail.rhtml:19
msgid "Binary required"
msgstr ""
-#: app/views/attributes/_attribute.rhtml:24
+#: app/views/attributes/_detail.rhtml:24
msgid "Syntax"
-msgstr ""
-
-#: app/views/attributes/show.rhtml:14
-#, fuzzy
-msgid "Super attribute"
-msgstr "naam van het attribuut"
-
-#: app/views/attributes/show.rhtml:22
-msgid "Detail"
msgstr ""
#: app/views/attributes/index.rhtml:1
From codesite-noreply at google.com Sat Nov 3 09:43:13 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 06:43:13 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r482 - in
trunk/examples/al-admin/app: helpers views/attributes
Message-ID: <00163600d06e043e0676fb2c925bf00f@google.com>
Author: koutou
Date: Sat Nov 3 06:39:06 2007
New Revision: 482
Modified:
trunk/examples/al-admin/app/helpers/attributes_helper.rb
trunk/examples/al-admin/app/views/attributes/_detail.rhtml
Log:
* linked to syntax page.
Modified: trunk/examples/al-admin/app/helpers/attributes_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/attributes_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/attributes_helper.rb Sat Nov 3
06:39:06 2007
@@ -1,4 +1,6 @@
module AttributesHelper
+ include SyntaxesHelper
+
def link_to_attribute(attribute)
link_to(h(la_(attribute)),
:controller => "attributes",
Modified: trunk/examples/al-admin/app/views/attributes/_detail.rhtml
==============================================================================
--- trunk/examples/al-admin/app/views/attributes/_detail.rhtml (original)
+++ trunk/examples/al-admin/app/views/attributes/_detail.rhtml Sat Nov
3 06:39:06 2007
@@ -22,7 +22,7 @@
| <%= _("Syntax") %> |
- <%= h(ls_(attribute.syntax)) %> |
+ <%= link_to_syntax(attribute.syntax) %> |
From codesite-noreply at google.com Sat Nov 3 09:58:14 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 06:58:14 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r483 - in trunk:
examples/al-admin/app/helpers lib/active_ldap
Message-ID: <00c09ff7928c043e06acb1baee6617a0@google.com>
Author: koutou
Date: Sat Nov 3 06:58:08 2007
New Revision: 483
Modified:
trunk/examples/al-admin/app/helpers/syntaxes_helper.rb
trunk/lib/active_ldap/schema.rb
Log:
* supported length value ({\d+}) in syntax name.
Modified: trunk/examples/al-admin/app/helpers/syntaxes_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/syntaxes_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/syntaxes_helper.rb Sat Nov 3
06:58:08 2007
@@ -1,6 +1,8 @@
module SyntaxesHelper
def link_to_syntax(syntax)
- link_to(h(ls_(syntax)),
+ label = h(ls_(syntax))
+ label << "{#{syntax.length}}" if syntax.length
+ link_to(label,
:controller => "syntaxes",
:action => "show",
:id => syntax)
Modified: trunk/lib/active_ldap/schema.rb
==============================================================================
--- trunk/lib/active_ldap/schema.rb (original)
+++ trunk/lib/active_ldap/schema.rb Sat Nov 3 06:58:08 2007
@@ -277,7 +277,14 @@
end
class Syntax < Entry
+ attr_reader :length
def initialize(id, schema)
+ if /\{(\d+)\}\z/ =~ id
+ id = $PREMATCH
+ @length = Integer($1)
+ else
+ @length = nil
+ end
super(id, schema, "ldapSyntaxes")
@id = id
@name = nil if @name == @id
@@ -318,6 +325,14 @@
else
value
end
+ end
+
+ def <=>(other)
+ id <=> other.id
+ end
+
+ def to_param
+ id
end
private
From codesite-noreply at google.com Sat Nov 3 10:07:15 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 07:07:15 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r484 - trunk/test
Message-ID: <00c09ff7922c043e06cceff4926654be@google.com>
Author: koutou
Date: Sat Nov 3 07:06:24 2007
New Revision: 484
Modified:
trunk/test/test_syntax.rb
Log:
* added a test for syntax ID with length.
Modified: trunk/test/test_syntax.rb
==============================================================================
--- trunk/test/test_syntax.rb (original)
+++ trunk/test/test_syntax.rb Sat Nov 3 07:06:24 2007
@@ -55,6 +55,17 @@
end
priority :must
+ def test_id_with_length
+ id = "1.3.6.1.4.1.1466.115.121.1.26"
+
+ syntax = ActiveLdap::Schema::Syntax.new(id, @schema)
+ assert_equal([id, nil], [syntax.id, syntax.length])
+
+ syntax = ActiveLdap::Schema::Syntax.new("#{id}{128}", @schema)
+ assert_equal([id, 128], [syntax.id, syntax.length])
+ end
+
+ priority :normal
def test_bit_string_type_cast
assert_type_cast_without_validation(nil, nil, 'Bit String')
assert_type_cast("0101111101", "'0101111101'B", 'Bit String')
@@ -86,7 +97,6 @@
assert_type_cast(1321, "1321", "Integer")
end
- priority :normal
def test_bit_string_validate
assert_valid("'0101111101'B", 'Bit String')
assert_valid("''B", 'Bit String')
From codesite-noreply at google.com Sat Nov 3 22:48:40 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 19:48:40 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r485 - in trunk:
lib/active_ldap test
Message-ID: <00163600d2c5043e116ff2ebc27afdbd@google.com>
Author: koutou
Date: Sat Nov 3 19:48:02 2007
New Revision: 485
Modified:
trunk/lib/active_ldap/base.rb
trunk/lib/active_ldap/validations.rb
trunk/test/test_validation.rb
Log:
* fixed complex value handling.
Modified: trunk/lib/active_ldap/base.rb
==============================================================================
--- trunk/lib/active_ldap/base.rb (original)
+++ trunk/lib/active_ldap/base.rb Sat Nov 3 19:48:02 2007
@@ -908,6 +908,23 @@
normalize_attribute(key, value)[1]
end
+ def type_cast(attribute, value)
+ case value
+ when Hash
+ result = {}
+ value.each do |option, val|
+ result[option] = type_cast(attribute, val)
+ end
+ result
+ when Array
+ value.collect do |val|
+ type_cast(attribute, val)
+ end
+ else
+ attribute.type_cast(value)
+ end
+ end
+
def init_instance_variables
@mutex = Mutex.new
@data = {} # where the r/w entry data is stored
@@ -974,13 +991,7 @@
def get_attribute(name, force_array=false)
name, value = get_attribute_before_type_cast(name, force_array)
attribute = schema.attribute(name)
- if value.is_a?(Array)
- value.collect do |val|
- attribute.type_cast(val)
- end
- else
- attribute.type_cast(value)
- end
+ type_cast(attribute, value)
end
def get_attribute_before_type_cast(name, force_array=false)
Modified: trunk/lib/active_ldap/validations.rb
==============================================================================
--- trunk/lib/active_ldap/validations.rb (original)
+++ trunk/lib/active_ldap/validations.rb Sat Nov 3 19:48:02 2007
@@ -126,18 +126,44 @@
def validate_ldap_values
@attribute_schemata.each do |name, attribute|
self[name, true].each do |value|
- failed_reason = attribute.validate(value)
- if failed_reason
- params = [value,
- self.class.human_syntax_description(attribute.syntax),
- failed_reason]
- if ActiveLdap.get_text_supported?
+ validate_ldap_value(attribute, name, value)
+ end
+ end
+ end
+
+ def validate_ldap_value(attribute, name, value, option=nil)
+ case value
+ when Hash
+ value.each do |sub_option, val|
+ validate_ldap_value(attribute, name, val,
+ [option, sub_option].compact.join(";"))
+ end
+ when Array
+ value.each do |val|
+ validate_ldap_value(attribute, name, val, option)
+ end
+ else
+ failed_reason = attribute.validate(value)
+ if failed_reason
+ params = [value,
+ self.class.human_syntax_description(attribute.syntax),
+ failed_reason]
+ if ActiveLdap.get_text_supported?
+ if option
+ format =
+ _("%{fn} (%s) has invalid format: %s: required syntax: %s: %s")
+ else
format = _("%{fn} has invalid format: %s: required syntax: %s: %s")
+ end
+ else
+ if option
+ format = _("(%s) has invalid format: %s: required syntax: %s: %s")
else
format = _("has invalid format: %s: required syntax: %s: %s")
end
- errors.add(name, format % params)
end
+ params.unshift(option) if option
+ errors.add(name, format % params)
end
end
end
Modified: trunk/test/test_validation.rb
==============================================================================
--- trunk/test/test_validation.rb (original)
+++ trunk/test/test_validation.rb Sat Nov 3 19:48:02 2007
@@ -5,6 +5,34 @@
include ActiveLdap::Helper
priority :must
+ def test_syntax_validation_with_complex_value
+ make_temporary_user do |user, password|
+ assert(user.save)
+
+ option = 'lang-en-us'
+ value = 'test-en'
+ user.see_also = ["cn=test,dc=example,dc=com", {option => value}]
+ assert(!user.save)
+ assert(user.errors.invalid?(:seeAlso))
+ assert_equal(1, user.errors.size)
+
+ syntax_description = lsd_("1.3.6.1.4.1.1466.115.121.1.12")
+ assert_not_nil(syntax_description)
+ reason_params = [value, _("attribute value is missing")]
+ reason = _('%s is invalid distinguished name (DN): %s') % reason_params
+ params = [option, value, syntax_description, reason]
+ if ActiveLdap.get_text_supported?
+ format = _("%{fn} (%s) has invalid format: %s: required syntax: %s: %s")
+ format = format % {:fn => la_("seeAlso")}
+ assert_equal([format % params], user.errors.full_messages)
+ else
+ format = _("(%s) has invalid format: %s: required syntax: %s: %s")
+ assert_equal(["seeAlso #{format % params}"], user.errors.full_messages)
+ end
+ end
+ end
+
+ priority :normal
def test_duplicated_dn_creation
assert(ou_class.new("YYY").save)
ou = ou_class.new("YYY")
@@ -17,7 +45,6 @@
assert_equal([format % ou.dn], ou.errors.full_messages)
end
- priority :normal
def test_syntax_validation
make_temporary_user do |user, password|
assert(user.save)
From codesite-noreply at google.com Sat Nov 3 22:54:41 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 19:54:41 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r486 - trunk/test
Message-ID: <00c09ff7922c043e11857364487b6171@google.com>
Author: koutou
Date: Sat Nov 3 19:53:53 2007
New Revision: 486
Modified:
trunk/test/test_validation.rb
Log:
* cleanup a test.
Modified: trunk/test/test_validation.rb
==============================================================================
--- trunk/test/test_validation.rb (original)
+++ trunk/test/test_validation.rb Sat Nov 3 19:53:53 2007
@@ -5,31 +5,25 @@
include ActiveLdap::Helper
priority :must
- def test_syntax_validation_with_complex_value
+ def test_syntax_validation
make_temporary_user do |user, password|
assert(user.save)
- option = 'lang-en-us'
- value = 'test-en'
- user.see_also = ["cn=test,dc=example,dc=com", {option => value}]
- assert(!user.save)
- assert(user.errors.invalid?(:seeAlso))
- assert_equal(1, user.errors.size)
-
- syntax_description = lsd_("1.3.6.1.4.1.1466.115.121.1.12")
- assert_not_nil(syntax_description)
- reason_params = [value, _("attribute value is missing")]
- reason = _('%s is invalid distinguished name (DN): %s') % reason_params
- params = [option, value, syntax_description, reason]
- if ActiveLdap.get_text_supported?
- format = _("%{fn} (%s) has invalid format: %s: required syntax: %s: %s")
- format = format % {:fn => la_("seeAlso")}
- assert_equal([format % params], user.errors.full_messages)
- else
- format = _("(%s) has invalid format: %s: required syntax: %s: %s")
- assert_equal(["seeAlso #{format % params}"], user.errors.full_messages)
- end
+ user.see_also = "cn=test,dc=example,dc=com"
+ assert(user.save)
end
+
+ assert_invalid_see_also_value("test", "test")
+ assert_invalid_see_also_value("test-en",
+ ["cn=test,dc=example,dc=com",
+ {"lang-en-us" => "test-en"}],
+ "lang-en-us")
+ assert_invalid_see_also_value("test-ja-jp",
+ ["cn=test,dc=example,dc=com",
+ {"lang-ja-jp" =>
+ ["cn=test-ja,dc=example,dc=com",
+ "test-ja-jp"]}],
+ "lang-ja-jp")
end
priority :normal
@@ -45,35 +39,6 @@
assert_equal([format % ou.dn], ou.errors.full_messages)
end
- def test_syntax_validation
- make_temporary_user do |user, password|
- assert(user.save)
-
- user.see_also = "cn=test,dc=example,dc=com"
- assert(user.save)
-
- value = "test"
- user.see_also = value
- assert(!user.save)
- assert(user.errors.invalid?(:seeAlso))
- assert_equal(1, user.errors.size)
-
- syntax_description = lsd_("1.3.6.1.4.1.1466.115.121.1.12")
- assert_not_nil(syntax_description)
- reason_params = [value, _("attribute value is missing")]
- reason = _('%s is invalid distinguished name (DN): %s') % reason_params
- params = [value, syntax_description, reason]
- if ActiveLdap.get_text_supported?
- format = _("%{fn} has invalid format: %s: required syntax: %s: %s")
- format = format % {:fn => la_("seeAlso")}
- assert_equal([format % params], user.errors.full_messages)
- else
- format = _("has invalid format: %s: required syntax: %s: %s")
- assert_equal(["seeAlso #{format % params}"], user.errors.full_messages)
- end
- end
- end
-
def test_save!
make_temporary_group do |group|
group.description = ""
@@ -101,6 +66,45 @@
assert(!group.valid?)
assert(group.errors.invalid?(:description))
assert_equal(1, group.errors.size)
+ end
+ end
+
+ private
+ def assert_invalid_see_also_value(invalid_value, value, option=nil)
+ make_temporary_user do |user, password|
+ assert(user.save)
+
+ user.see_also = "cn=test,dc=example,dc=com"
+ assert(user.save)
+
+ user.see_also = value
+ assert(!user.save)
+ assert(user.errors.invalid?(:seeAlso))
+ assert_equal(1, user.errors.size)
+
+ syntax_description = lsd_("1.3.6.1.4.1.1466.115.121.1.12")
+ assert_not_nil(syntax_description)
+ reason_params = [invalid_value, _("attribute value is missing")]
+ reason = _('%s is invalid distinguished name (DN): %s') % reason_params
+ params = [invalid_value, syntax_description, reason]
+ params.unshift(option) if option
+ if ActiveLdap.get_text_supported?
+ if option
+ format =
+ _("%{fn} (%s) has invalid format: %s: required syntax: %s: %s")
+ else
+ format = _("%{fn} has invalid format: %s: required syntax: %s: %s")
+ end
+ format = format % {:fn => la_("seeAlso")}
+ assert_equal([format % params], user.errors.full_messages)
+ else
+ if option
+ format = _("(%s) has invalid format: %s: required syntax: %s: %s")
+ else
+ format = _("has invalid format: %s: required syntax: %s: %s")
+ end
+ assert_equal(["seeAlso #{format % params}"], user.errors.full_messages)
+ end
end
end
end
From codesite-noreply at google.com Sat Nov 3 22:58:41 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 19:58:41 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r487 -
trunk/lib/active_ldap
Message-ID: <00163600d1b5043e1193cb055f7b55f9@google.com>
Author: koutou
Date: Sat Nov 3 19:55:04 2007
New Revision: 487
Modified:
trunk/lib/active_ldap/base.rb
Log:
* moved type_cast defined position.
Modified: trunk/lib/active_ldap/base.rb
==============================================================================
--- trunk/lib/active_ldap/base.rb (original)
+++ trunk/lib/active_ldap/base.rb Sat Nov 3 19:55:04 2007
@@ -908,23 +908,6 @@
normalize_attribute(key, value)[1]
end
- def type_cast(attribute, value)
- case value
- when Hash
- result = {}
- value.each do |option, val|
- result[option] = type_cast(attribute, val)
- end
- result
- when Array
- value.collect do |val|
- type_cast(attribute, val)
- end
- else
- attribute.type_cast(value)
- end
- end
-
def init_instance_variables
@mutex = Mutex.new
@data = {} # where the r/w entry data is stored
@@ -992,6 +975,23 @@
name, value = get_attribute_before_type_cast(name, force_array)
attribute = schema.attribute(name)
type_cast(attribute, value)
+ end
+
+ def type_cast(attribute, value)
+ case value
+ when Hash
+ result = {}
+ value.each do |option, val|
+ result[option] = type_cast(attribute, val)
+ end
+ result
+ when Array
+ value.collect do |val|
+ type_cast(attribute, val)
+ end
+ else
+ attribute.type_cast(value)
+ end
end
def get_attribute_before_type_cast(name, force_array=false)
From codesite-noreply at google.com Sat Nov 3 23:02:42 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 20:02:42 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r488 - trunk
Message-ID: <00c09ffb4bcf043e11a229266d7b0cfb@google.com>
Author: koutou
Date: Sat Nov 3 19:55:38 2007
New Revision: 488
Modified:
trunk/CHANGES
Log:
* updated CHANGES.
Modified: trunk/CHANGES
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Sat Nov 3 19:55:38 2007
@@ -15,6 +15,7 @@
* AL-Admin:
* Supported lang parameter in URL.
* Improved design a bit. (Please someone help us!)
+ * Supported schema inspection.
* Rails plugin:
* Added ActiveLdap::VERSION check.
* Added model_active_ldap generator.
From codesite-noreply at google.com Sat Nov 3 23:10:01 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 20:10:01 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r489 - in
trunk/examples/al-admin/app: helpers views/users
Message-ID: <00163600d1b5043e11bc54c2717ba67d@google.com>
Author: koutou
Date: Sat Nov 3 20:09:01 2007
New Revision: 489
Modified:
trunk/examples/al-admin/app/helpers/attributes_helper.rb
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
Log:
* added help link to attribute.
Modified: trunk/examples/al-admin/app/helpers/attributes_helper.rb
==============================================================================
--- trunk/examples/al-admin/app/helpers/attributes_helper.rb (original)
+++ trunk/examples/al-admin/app/helpers/attributes_helper.rb Sat Nov 3
20:09:01 2007
@@ -1,10 +1,15 @@
module AttributesHelper
include SyntaxesHelper
+ def attribute_url_for_options(attribute)
+ {
+ :controller => "attributes",
+ :action => "show",
+ :id => attribute
+ }
+ end
+
def link_to_attribute(attribute)
- link_to(h(la_(attribute)),
- :controller => "attributes",
- :action => "show",
- :id => attribute)
+ link_to(h(la_(attribute)), attribute_url_for_options(attribute))
end
end
Modified: trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
==============================================================================
---
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml (original)
+++
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
Sat Nov 3 20:09:01 2007
@@ -18,6 +18,7 @@
|
+ <%= link_to("?", attribute_url_for_options(name)) %>
<% if required_attributes.include?(name) -%>
*
<% end -%>
From codesite-noreply at google.com Sat Nov 3 23:14:02 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 20:14:02 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r490 - in
trunk/po: en ja
Message-ID: <00c09ff7922c043e11caa9cc137bec7a@google.com>
Author: koutou
Date: Sat Nov 3 20:11:24 2007
New Revision: 490
Modified:
trunk/po/en/active-ldap.po
trunk/po/ja/active-ldap.po
Log:
* updated messages.
Modified: trunk/po/en/active-ldap.po
==============================================================================
--- trunk/po/en/active-ldap.po (original)
+++ trunk/po/en/active-ldap.po Sat Nov 3 20:11:24 2007
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Ruby/ActiveLdap 0.8.4\n"
-"POT-Creation-Date: 2007-10-25 20:50+0900\n"
+"POT-Creation-Date: 2007-11-04 12:09+0900\n"
"PO-Revision-Date: 2007-08-19 09:49+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: English\n"
@@ -3335,7 +3335,7 @@
"%s"
msgstr ""
-#: lib/active_ldap/acts/tree.rb:38
+#: lib/active_ldap/acts/tree.rb:66
msgid "parent must be an entry or parent DN: %s"
msgstr ""
@@ -3347,27 +3347,27 @@
msgid ":ldap_scope search option is deprecated. Use :scope instead."
msgstr ""
-#: lib/active_ldap/operations.rb:197
+#: lib/active_ldap/operations.rb:201
msgid "Invalid order: %s"
msgstr ""
-#: lib/active_ldap/operations.rb:232
+#: lib/active_ldap/operations.rb:236
msgid "Couldn't find %s without a DN"
msgstr ""
-#: lib/active_ldap/operations.rb:253
+#: lib/active_ldap/operations.rb:258
msgid "Couldn't find %s: DN: %s: filter: %s"
msgstr ""
-#: lib/active_ldap/operations.rb:256
+#: lib/active_ldap/operations.rb:261
msgid "Couldn't find %s: DN: %s"
msgstr ""
-#: lib/active_ldap/operations.rb:283
+#: lib/active_ldap/operations.rb:288
msgid "Couldn't find all %s: DNs (%s): filter: %s"
msgstr ""
-#: lib/active_ldap/operations.rb:286
+#: lib/active_ldap/operations.rb:291
msgid "Couldn't find all %s: DNs (%s)"
msgstr ""
@@ -3411,11 +3411,19 @@
msgid "%{fn} is required attribute by objectClass '%s': aliases: %s"
msgstr ""
-#: lib/active_ldap/validations.rb:135
+#: lib/active_ldap/validations.rb:154
+msgid "%{fn} (%s) has invalid format: %s: required syntax: %s: %s"
+msgstr ""
+
+#: lib/active_ldap/validations.rb:156
msgid "%{fn} has invalid format: %s: required syntax: %s: %s"
msgstr ""
-#: lib/active_ldap/validations.rb:137
+#: lib/active_ldap/validations.rb:160
+msgid "(%s) has invalid format: %s: required syntax: %s: %s"
+msgstr ""
+
+#: lib/active_ldap/validations.rb:162
msgid "has invalid format: %s: required syntax: %s: %s"
msgstr ""
@@ -3455,32 +3463,32 @@
msgid "scope '%s' must be a Symbol"
msgstr ""
-#: lib/active_ldap/base.rb:426
+#: lib/active_ldap/base.rb:429
msgid ""
"'%s' must be either nil, DN value as String or Array or attributes as Hash"
msgstr ""
-#: lib/active_ldap/base.rb:508
+#: lib/active_ldap/base.rb:514
msgid "%s's DN attribute (%s) isn't set"
msgstr ""
-#: lib/active_ldap/base.rb:541
+#: lib/active_ldap/base.rb:551
msgid "Failed to delete LDAP entry: %s"
msgstr ""
-#: lib/active_ldap/base.rb:560
+#: lib/active_ldap/base.rb:570
msgid "entry %s can't be saved"
msgstr ""
-#: lib/active_ldap/base.rb:581 lib/active_ldap/base.rb:592
+#: lib/active_ldap/base.rb:591 lib/active_ldap/base.rb:602
msgid "wrong number of arguments (%d for 1)"
msgstr ""
-#: lib/active_ldap/base.rb:708
+#: lib/active_ldap/base.rb:718
msgid "Can't find DN '%s' to reload"
msgstr ""
-#: lib/active_ldap/base.rb:1167
+#: lib/active_ldap/base.rb:1209
msgid "dn_attribute isn't set for this class: %s"
msgstr ""
Modified: trunk/po/ja/active-ldap.po
==============================================================================
--- trunk/po/ja/active-ldap.po (original)
+++ trunk/po/ja/active-ldap.po Sat Nov 3 20:11:24 2007
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Ruby/ActiveLdap 0.8.4\n"
-"POT-Creation-Date: 2007-10-25 20:50+0900\n"
-"PO-Revision-Date: 2007-10-27 16:01+0900\n"
+"POT-Creation-Date: 2007-11-04 12:09+0900\n"
+"PO-Revision-Date: 2007-11-04 12:10+0900\n"
"Last-Translator: Kouhei Sutou \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -3349,7 +3349,7 @@
"$B%5!<%P$X$N:F@\B3<:GT;~$N%P%C%/%H%l!<%9(B:\n"
"%s"
-#: lib/active_ldap/acts/tree.rb:38
+#: lib/active_ldap/acts/tree.rb:66
msgid "parent must be an entry or parent DN: %s"
msgstr "$B?F$O%(%s%H%j$+(BDN$B$G$J$1$l$P$$$1$^$;$s(B: %s"
@@ -3362,27 +3362,27 @@
msgstr ""
":ldap_search$B8!:w%*%W%7%g%s$OGQ;_M=Dj$G$9!#Be$o$j(B
$B$K(B:scope$B$r;H$C$F$/$@$5$$!#(B"
-#: lib/active_ldap/operations.rb:197
+#: lib/active_ldap/operations.rb:201
msgid "Invalid order: %s"
msgstr "$BIT at 5$J=g=x$G$9(B: %s"
-#: lib/active_ldap/operations.rb:232
+#: lib/active_ldap/operations.rb:236
msgid "Couldn't find %s without a DN"
msgstr "DN$B$,$J$$$?$a(B%s$B$,8+$D$+$j$^$;$s!#(B"
-#: lib/active_ldap/operations.rb:253
+#: lib/active_ldap/operations.rb:258
msgid "Couldn't find %s: DN: %s: filter: %s"
msgstr "%s$B$,8+$D$+$j$^$;$s(B: DN: %s: $B%U%#%k%?(B: %s"
-#: lib/active_ldap/operations.rb:256
+#: lib/active_ldap/operations.rb:261
msgid "Couldn't find %s: DN: %s"
msgstr "%s$B$,8+$D$+$j$^$;$s(B: DN: %s"
-#: lib/active_ldap/operations.rb:283
+#: lib/active_ldap/operations.rb:288
msgid "Couldn't find all %s: DNs (%s): filter: %s"
msgstr "$B$9$Y$F$N(B%s$B$r8+$D$1$i$l$^$;$s$G$7$?(B: DN (%s):
$B%U%#%k%?(B: %s"
-#: lib/active_ldap/operations.rb:286
+#: lib/active_ldap/operations.rb:291
msgid "Couldn't find all %s: DNs (%s)"
msgstr "$B$9$Y$F$N(B%s$B$r8+$D$1$i$l$^$;$s$G$7$?(B: DN (%s)"
@@ -3426,13 +3426,21 @@
msgid "%{fn} is required attribute by objectClass '%s': aliases: %s"
msgstr "%{fn}$B$O(BobjectClass'%s'$B$NI,?\$NB0 at -$G$9(B: $BJLL>(B: %s"
-#: lib/active_ldap/validations.rb:135
+#: lib/active_ldap/validations.rb:154
+msgid "%{fn} (%s) has invalid format: %s: required syntax: %s: %s"
+msgstr "%{fn}(%s)$B$OIT at 5$J=q<0$G$9(B: %s: $BMW5a$5$l$F$$$k9=J8(B: %s: %s"
+
+#: lib/active_ldap/validations.rb:156
msgid "%{fn} has invalid format: %s: required syntax: %s: %s"
msgstr "%{fn}$B$OIT at 5$J=q<0$G$9(B: %s: $BMW5a$5$l$F$$$k9=J8(B: %s: %s"
-#: lib/active_ldap/validations.rb:137
+#: lib/active_ldap/validations.rb:160
+msgid "(%s) has invalid format: %s: required syntax: %s: %s"
+msgstr "(%s)$B$OIT at 5$J=q<0$G$9(B: %s: $BMW5a$5$l$F$$$k9=J8(B: %s: %s"
+
+#: lib/active_ldap/validations.rb:162
msgid "has invalid format: %s: required syntax: %s: %s"
-msgstr "$BIT at 5$J=q<0$G$9(B: %s: $BMW5a$5$l$F$$$k9=J8(B: %s: %s"
+msgstr "$B$OIT at 5$J=q<0$G$9(B: %s: $BMW5a$5$l$F$$$k9=J8(B: %s: %s"
#: lib/active_ldap/command.rb:16
msgid "Common options:"
@@ -3470,34 +3478,34 @@
msgid "scope '%s' must be a Symbol"
msgstr "$B%9%3!<%W(B'%s'$B$O%7%s%\%k$G$J$1$l$P$$$1$^$;$s!#(B"
-#: lib/active_ldap/base.rb:426
+#: lib/active_ldap/base.rb:429
msgid ""
"'%s' must be either nil, DN value as String or Array or attributes as Hash"
msgstr ""
"'%s'$B$O(Bnil$B!"(BString$B$K$h$k(BDN$B!"(BDN$B$NG[Ns!"(BHash$B$K$h$kB0 at -$N(B
$B$I$l$+$G$J$1$l$P$$$1$^$;(B"
"$B$s!#(B"
-#: lib/active_ldap/base.rb:508
+#: lib/active_ldap/base.rb:514
msgid "%s's DN attribute (%s) isn't set"
msgstr "%s$B$N(BDN$BB0 at -(B(%s)$B$, at _Dj$5$l$F$$$^$;$s!#(B"
-#: lib/active_ldap/base.rb:541
+#: lib/active_ldap/base.rb:551
msgid "Failed to delete LDAP entry: %s"
msgstr "LDAP$B%(%s%H%j$N:o=|$K<:GT$7$^$7$?(B: %s"
-#: lib/active_ldap/base.rb:560
+#: lib/active_ldap/base.rb:570
msgid "entry %s can't be saved"
msgstr "$B%(%s%H%j(B%s$B$rJ]B8$G$-$^$;$s!#(B"
-#: lib/active_ldap/base.rb:581 lib/active_ldap/base.rb:592
+#: lib/active_ldap/base.rb:591 lib/active_ldap/base.rb:602
msgid "wrong number of arguments (%d for 1)"
msgstr "$B0z?t$N?t$,0c$$$^$9!#(B(1$B$D$N0z?t$J$N$K(B%d$B8D;X(B
$BDj$7$^$7$?(B)"
-#: lib/active_ldap/base.rb:708
+#: lib/active_ldap/base.rb:718
msgid "Can't find DN '%s' to reload"
msgstr "$B:FFI$_9~$_$9$k(BDN '%s'$B$,8+$D$+$j$^$;$s!#(B"
-#: lib/active_ldap/base.rb:1167
+#: lib/active_ldap/base.rb:1209
msgid "dn_attribute isn't set for this class: %s"
msgstr "$B$3$N%/%i%9$N(Bdn_attribute$B$, at _Dj$5$l$F$$$^$;$s(B: %s"
From codesite-noreply at google.com Sat Nov 3 23:29:03 2007
From: codesite-noreply at google.com (codesite-noreply at google.com)
Date: Sat, 03 Nov 2007 20:29:03 -0700
Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r491 - in
trunk/examples/al-admin: app/controllers app/models
app/views/users lib
Message-ID: <00163600cf97043e120063ba047bee37@google.com>
Author: koutou
Date: Sat Nov 3 20:28:33 2007
New Revision: 491
Modified:
trunk/examples/al-admin/app/controllers/application.rb
trunk/examples/al-admin/app/controllers/directory_controller.rb
trunk/examples/al-admin/app/controllers/users_controller.rb
trunk/examples/al-admin/app/models/user.rb
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
trunk/examples/al-admin/app/views/users/_password_change_form.rhtml
trunk/examples/al-admin/app/views/users/edit.rhtml
trunk/examples/al-admin/lib/authenticated_system.rb
Log:
* cleanup authentication handling.
Modified: trunk/examples/al-admin/app/controllers/application.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/application.rb (original)
+++ trunk/examples/al-admin/app/controllers/application.rb Sat Nov 3
20:28:33 2007
@@ -10,7 +10,6 @@
include ExceptionNotifiable
include AuthenticatedSystem
- before_filter :check_connectivity
before_filter :login_from_cookie
private
@@ -21,7 +20,15 @@
default_options.merge(options)
end
+ def current_ldap_user
+ logged_in? ? current_user.ldap_user : nil
+ end
+
def schema
@schema ||= current_ldap_user.schema
+ end
+
+ def authorized?
+ current_ldap_user.connected?
end
end
Modified: trunk/examples/al-admin/app/controllers/directory_controller.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/directory_controller.rb (original)
+++ trunk/examples/al-admin/app/controllers/directory_controller.rb Sat
Nov 3 20:28:33 2007
@@ -34,7 +34,7 @@
end
def find_options
- {:connection => current_user.ldap_connection}
+ {:connection => current_ldap_user.connection}
end
def access_denied
Modified: trunk/examples/al-admin/app/controllers/users_controller.rb
==============================================================================
--- trunk/examples/al-admin/app/controllers/users_controller.rb (original)
+++ trunk/examples/al-admin/app/controllers/users_controller.rb Sat Nov
3 20:28:33 2007
@@ -21,7 +21,7 @@
previous_user_password = @user.user_password
if @user.update_attributes(params[:user])
if previous_user_password != @user.user_password
- @user.establish_connection(:password => @user.password)
+ @user.bind(@user.password)
end
flash[:notice] = _('User was successfully updated.')
redirect_to :action => 'show', :id => @user
Modified: trunk/examples/al-admin/app/models/user.rb
==============================================================================
--- trunk/examples/al-admin/app/models/user.rb (original)
+++ trunk/examples/al-admin/app/models/user.rb Sat Nov 3 20:28:33 2007
@@ -41,19 +41,11 @@
end
end
- def connected?
- ldap_user.connected?
- end
-
- def ldap_connection
- ldap_user.connection
- end
-
def remember_token?
begin
remember_token_expires_at and
Time.now.utc < remember_token_expires_at and
- connected?
+ ldap_user.connected?
rescue ActiveLdap::EntryNotFound
false
end
@@ -75,7 +67,7 @@
end
def short_dn
- @ldap_user.short_dn
+ ldap_user.short_dn
end
private
Modified: trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
==============================================================================
---
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml (original)
+++
trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml
Sat Nov 3 20:28:33 2007
@@ -28,3 +28,5 @@
|
<% end -%>