-
Notifications
You must be signed in to change notification settings - Fork 1
/
NOTES
175 lines (141 loc) · 5.45 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
- sort labels by call number or shelf
-
document ready: just define a function when_ready() wherever is needed. It will be called from the main application.js
Namespaces:
There's no real "Rails way" for admin interfaces, actually - you can find every possible solution in a number of applications. DHH has implied that he prefers namespaces (with HTTP Basic authentication), but that has remained a simple implication and not one of the official Rails Opinions.
That said, I've found good success with that approach lately (namespacing + HTTP Basic). It looks like this:
routes.rb:
map.namespace :admin do |admin|
admin.resources :users
admin.resources :posts
end
admin/users_controller.rb:
class Admin::UsersController < ApplicationController
before_filter :admin_required
# ...
end
application.rb
class ApplicationController < ActionController::Base
# ...
protected
def admin_required
authenticate_or_request_with_http_basic do |user_name, password|
user_name == 'admin' && password == 's3cr3t'
end if RAILS_ENV == 'production' || params[:admin_http]
end
end
Generations
always appended
rails generate ... --no-controller-specs --no-view-specs --no-helper-specs --skip-stylesheets --skip-javascripts --skip-helpers
resource lab
name:string nick:string
resource location
name:string
resource publisher
name:string
resource book
title:string author:string editor:string call1:string
call2:string call3:string call4:string collation:string
isbn:string edition:string publisher:reference collection:string
language:string abstract:text toc:text idx:text notes:text
publication_year:integer price:float currency:string
resource item
lab:reference room:reference user:reference inv:integer
status:string price:float currency:string inventoriable:reference
inventoriable_type:string
resource borrowing
user:reference item:reference return_date:date
Library of Congress Query
--------------------------
http://www.loc.gov/standards/sru/specs/search-retrieve.html
http://www.loc.gov/standards/sru/resources/schemas.html
exemple:
http://z3950.loc.gov:7090/voyager?version=1.1&operation=searchRetrieve&query=bath.isbn%3D<ISBN>&maximumRecords=1&recordSchema=mods
http://z3950.loc.gov:7090/voyager?version=1.1&operation=searchRetrieve&query=bath.isbn%3D9780521852296&maximumRecords=1&recordSchema=mods
a scuola ai buoni un premio, ai cattivi la punizione
ma in seguito nella vita è meno chiara la divisione
Giorgio Gaber
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<zs:searchRetrieveResponse xmlns:zs="http://www.loc.gov/zing/srw/">
<zs:version>1.1</zs:version>
<zs:numberOfRecords>1</zs:numberOfRecords>
<zs:records>
<zs:record>
<zs:recordSchema>info:srw/schema/1/mods-v3.2</zs:recordSchema>
<zs:recordPacking>xml</zs:recordPacking>
<zs:recordData>
<mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/mods/v3" version="3.2" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
<titleInfo>...</titleInfo>
<name type="personal">
<namePart>Buchberger, Bruno.</namePart>
</name>
<name type="personal">
<namePart>Winkler, Franz</namePart>
<namePart type="date">1955-</namePart>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">bibliography</genre>
<originInfo>
<place>
<placeTerm type="code" authority="marccountry">enk</placeTerm>
</place>
<place>
<placeTerm type="text">Cambridge, U.K</placeTerm>
</place>
<place>
<placeTerm type="text">New York</placeTerm>
</place>
<publisher>Cambridge University Press</publisher>
<dateIssued>1998</dateIssued>
<issuance>monographic</issuance>
</originInfo>
<language>
<languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<physicalDescription>
<form authority="marcform">print</form>
<extent>viii, 552 p. : ill. ; 23 cm.</extent>
</physicalDescription>
<note type="statement of responsibility">edited by B. Buchberger & F. Winkler.</note>
<note>
Papers from an intensive course for researchers (Jan. 1998) and a conference "33 Years of Gröbner Bases" held at RISC-Linz, Feb. 2-4, 1998.
</note>
<note>Includes bibliographical references and index.</note>
<subject authority="lcsh">
<topic>Gröbner bases</topic>
</subject>
<classification authority="lcc">QA251.3 .G76 1998</classification>
<classification authority="ddc" edition="21">512/.24</classification>
<relatedItem type="series">
<titleInfo>
<title>
London Mathematical Society lecture note series ; 251
</title>
</titleInfo>
</relatedItem>
<identifier type="isbn">0521632986 (paperback)</identifier>
<identifier type="lccn">97044181</identifier>
<identifier type="uri">
http://www.loc.gov/catdir/description/cam028/97044181.html
</identifier>
<identifier type="uri">http://www.loc.gov/catdir/toc/cam027/97044181.html</identifier>
<location>
<url displayLabel="Publisher description">
http://www.loc.gov/catdir/description/cam028/97044181.html
</url>
</location>
<location>
<url displayLabel="Table of contents">http://www.loc.gov/catdir/toc/cam027/97044181.html</url>
</location>
<recordInfo>
<recordContentSource authority="marcorg">DLC</recordContentSource>
<recordCreationDate encoding="marc">971125</recordCreationDate>
<recordChangeDate encoding="iso8601">20020831182157.0</recordChangeDate>
<recordIdentifier>2600033</recordIdentifier>
</recordInfo>
</mods>
</zs:recordData>
<zs:recordPosition>1</zs:recordPosition>
</zs:record>
</zs:records>
</zs:searchRetrieveResponse>