card 1.15.pre → 1.15.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/bootstrap/card_actions.yml +1039 -668
- data/db/bootstrap/card_acts.yml +1 -1
- data/db/bootstrap/card_changes.yml +3614 -2523
- data/db/bootstrap/card_references.yml +1401 -1163
- data/db/bootstrap/cards.yml +2832 -1848
- data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +58 -4
- data/db/migrate_core_cards/20150317162412_bootstrap_themes.rb +37 -0
- data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +1 -1
- data/db/migrate_core_cards/data/bootstrap_layout.json +39 -24
- data/db/migrate_core_cards/data/skin_images.json +91 -0
- data/db/schema.rb +1 -1
- data/db/version_core_cards.txt +1 -1
- data/lib/card/format.rb +6 -6
- data/lib/card/migration.rb +7 -2
- data/mod/01_core/chunk/include.rb +10 -0
- data/mod/01_core/format/html_format.rb +2 -8
- data/mod/01_core/set/all/collection.rb +4 -0
- data/mod/01_core/set/all/states.rb +1 -1
- data/mod/01_core/set/all/utils.rb +3 -2
- data/mod/01_core/set_pattern/02_all_plus.rb +1 -1
- data/mod/01_core/set_pattern/04_star.rb +2 -2
- data/mod/01_core/set_pattern/05_rstar.rb +2 -2
- data/mod/01_core/set_pattern/07_type_plus_right.rb +1 -1
- data/mod/01_core/spec/format/html_format_spec.rb +23 -24
- data/mod/01_history/set/all/history.rb +6 -7
- data/mod/02_basic_types/set/all/all_css.rb +1 -1
- data/mod/02_basic_types/set/all/all_csv.rb +2 -2
- data/mod/02_basic_types/set/all/json.rb +1 -1
- data/mod/02_basic_types/set/type/plain_text.rb +1 -1
- data/mod/02_basic_types/set/type/pointer.rb +25 -29
- data/mod/03_machines/lib/javascript/wagn.js.coffee +7 -6
- data/mod/03_machines/lib/javascript/wagn_mod.js.coffee +2 -1
- data/mod/03_machines/lib/stylesheets/style_bootstrap_compatible.css +154 -0
- data/mod/03_machines/lib/stylesheets/{standard.scss → style_cards.scss} +260 -166
- data/mod/03_machines/set/self/style_bootstrap_compatible.rb +9 -0
- data/mod/03_machines/set/self/{style_functional.rb → style_cards.rb} +1 -1
- data/mod/03_machines/spec/set/type/scss_spec.rb +1 -1
- data/mod/04_settings/set/type/setting.rb +1 -1
- data/mod/05_email/set/all/notify.rb +1 -1
- data/mod/05_email/set/self/follow_defaults.rb +3 -3
- data/mod/05_standard/file/{790/icon-6419.png → credit/icon-image.png} +0 -0
- data/mod/05_standard/file/{790/large-6419.png → credit/large-image.png} +0 -0
- data/mod/05_standard/file/{790/medium-6419.png → credit/medium-image.png} +0 -0
- data/mod/05_standard/file/{790/original-6419.png → credit/original-image.png} +0 -0
- data/mod/05_standard/file/{790/small-6419.png → credit/small-image.png} +0 -0
- data/mod/05_standard/file/{103/icon-6566.ico → favicon/icon-image.ico} +0 -0
- data/mod/05_standard/file/{103/large-6566.ico → favicon/large-image.ico} +0 -0
- data/mod/05_standard/file/{103/medium-6566.ico → favicon/medium-image.ico} +0 -0
- data/mod/05_standard/file/{103/original-6566.ico → favicon/original-image.ico} +0 -0
- data/mod/05_standard/file/{103/small-6566.ico → favicon/small-image.ico} +0 -0
- data/mod/05_standard/file/{79/icon-6556.png → logo/icon-image.png} +0 -0
- data/mod/05_standard/file/{79/large-6556.png → logo/large-image.png} +0 -0
- data/mod/05_standard/file/{79/medium-6556.png → logo/medium-image.png} +0 -0
- data/mod/05_standard/file/{79/original-6556.png → logo/original-image.png} +0 -0
- data/mod/05_standard/file/{79/small-6556.png → logo/small-image.png} +0 -0
- data/mod/05_standard/set/all/attach.rb +8 -10
- data/mod/05_standard/set/all/comment.rb +1 -1
- data/mod/05_standard/set/all/error.rb +1 -1
- data/mod/05_standard/set/all/rich_html/content.rb +14 -2
- data/mod/05_standard/set/all/rich_html/editing.rb +19 -18
- data/mod/05_standard/set/all/rich_html/form.rb +38 -47
- data/mod/05_standard/set/all/rich_html/header.rb +37 -14
- data/mod/05_standard/set/all/rich_html/wrapper.rb +3 -3
- data/mod/05_standard/set/rstar/rules.rb +18 -18
- data/mod/05_standard/set/self/account_links.rb +6 -18
- data/mod/05_standard/set/self/navbox.rb +23 -10
- data/mod/05_standard/set/self/recent.rb +1 -1
- data/mod/05_standard/set/self/signin.rb +6 -3
- data/mod/05_standard/set/type/cardtype.rb +1 -1
- data/mod/05_standard/set/type/html.rb +1 -1
- data/mod/05_standard/set/type/search_type.rb +76 -54
- data/mod/05_standard/set/type/signup.rb +5 -5
- data/mod/05_standard/set/type/user.rb +4 -4
- data/mod/05_standard/spec/set/all/rich_html/wrapper_spec.rb +2 -2
- data/mod/05_standard/spec/set/self/account_links_spec.rb +1 -1
- data/mod/06_bootstrap/file/cerulean_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cerulean_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cosmo_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/cyborg_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/darkly_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/flatly_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/journal_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/lumen_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/paper_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/readable_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/sandstone_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/simplex_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/slate_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/spacelab_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/superhero_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/united_skin/small-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/icon-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/large-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/medium-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/original-image.png +0 -0
- data/mod/06_bootstrap/file/yeti_skin/small-image.png +0 -0
- data/mod/06_bootstrap/lib/stylesheets/bootstrap_cards.scss +199 -0
- data/mod/06_bootstrap/lib/stylesheets/{bootstrap.css → bootstrap_css.css} +0 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_amelia.css +5871 -0
- data/mod/06_bootstrap/lib/stylesheets/{bootstrap-theme.css → theme_bootstrap_default.css} +0 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cerulean.css +5893 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cosmo.css +5898 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_cyborg.css +5876 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_darkly.css +5986 -0
- data/mod/06_bootstrap/lib/stylesheets/{darkly.css → theme_flatly.css} +574 -327
- data/mod/06_bootstrap/lib/stylesheets/theme_holo.css +183 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_journal.css +6647 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_lumen.css +6097 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_paper.css +6647 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_readable.css +5896 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_sandstone.css +6733 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_simplex.css +5886 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_slate.css +7057 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_spacelab.css +5935 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_superhero.css +5964 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_united.css +6588 -0
- data/mod/06_bootstrap/lib/stylesheets/theme_yeti.css +6088 -0
- data/mod/06_bootstrap/set/all/rich_bootstrap.rb +0 -16
- data/mod/06_bootstrap/set/self/bootstrap_cards.rb +9 -0
- data/mod/06_bootstrap/set/self/bootstrap_css.rb +5 -3
- data/mod/06_bootstrap/set/self/theme_bootstrap_default.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cerulean.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cosmo.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_cyborg.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_darkly.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_flatly.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_journal.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_lumen.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_paper.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_readable.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_sandstone.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_simplex.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_slate.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_spacelab.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_superhero.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_united.rb +2 -0
- data/mod/06_bootstrap/set/self/theme_yeti.rb +2 -0
- data/test/fixtures/card_actions.yml +1951 -1580
- data/test/fixtures/card_acts.yml +282 -282
- data/test/fixtures/card_changes.yml +6769 -5678
- data/test/fixtures/card_references.yml +2086 -1848
- data/test/fixtures/cards.yml +4167 -3183
- metadata +142 -30
- data/mod/03_machines/lib/stylesheets/functional.scss +0 -184
- data/mod/03_machines/set/self/style_standard.rb +0 -8
- data/mod/03_machines/spec/set/self/style_functional_spec.rb +0 -5
- data/mod/03_machines/spec/set/self/style_standard_spec.rb +0 -5
- data/mod/06_bootstrap/set/all/bootstrap/header.rb +0 -29
- data/mod/06_bootstrap/set/self/bootstrap_theme_css.rb +0 -7
- data/mod/06_bootstrap/set/self/navbox.rb +0 -32
- data/mod/06_bootstrap/set/type/search_type.rb +0 -79
|
@@ -139,7 +139,7 @@ format do
|
|
|
139
139
|
if args[:followed_set] && (set_card = Card.fetch(args[:followed_set])) && args[:follow_option] && args[:follower]
|
|
140
140
|
rule_name = set_card.follow_rule_name args[:follower]
|
|
141
141
|
target_name = "#{args[:follower]}+#{Card[:follow].name}"
|
|
142
|
-
update_path = page_path target_name, :
|
|
142
|
+
update_path = page_path target_name, :action=>:update, :card=>{:subcards=>{rule_name=>Card[:never].name}}
|
|
143
143
|
card_url update_path # absolutize path
|
|
144
144
|
end
|
|
145
145
|
end
|
|
@@ -31,9 +31,9 @@ format :html do
|
|
|
31
31
|
view :edit, :perms=>:update, :tags=>:unknown_ok do |args|
|
|
32
32
|
frame_and_form :update, args do
|
|
33
33
|
[
|
|
34
|
-
_optional_render( :
|
|
34
|
+
_optional_render( :content_formgroups, args ),
|
|
35
35
|
_optional_render( :confirm_update_all, args ),
|
|
36
|
-
_optional_render( :
|
|
36
|
+
_optional_render( :button_formgroup, args )
|
|
37
37
|
]
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -41,7 +41,7 @@ format :html do
|
|
|
41
41
|
|
|
42
42
|
view :confirm_update_all do |args|
|
|
43
43
|
wrap args do
|
|
44
|
-
alert 'info'do
|
|
44
|
+
alert 'info' do
|
|
45
45
|
%{
|
|
46
46
|
<h1>Are you sure you want to change the default follow rules?</h1>
|
|
47
47
|
<p>You may choose to update all existing users. This may take a while. </p>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -96,8 +96,8 @@ def self.included(base)
|
|
|
96
96
|
|
|
97
97
|
has_attached_file :attach, :preserve_files=>true,
|
|
98
98
|
:default_url => "missing",
|
|
99
|
-
:url => ":
|
|
100
|
-
:path => ":
|
|
99
|
+
:url => ":web_dir/:basename-:size:action_id.:extension",
|
|
100
|
+
:path => ":system_path.:extension",
|
|
101
101
|
:styles => { :icon => '16x16#', :small => '75x75',
|
|
102
102
|
:medium => '200x200>', :large => '500x500>' }
|
|
103
103
|
|
|
@@ -120,23 +120,21 @@ module Paperclip::Interpolations
|
|
|
120
120
|
|
|
121
121
|
extend Card::Format::Location
|
|
122
122
|
|
|
123
|
-
def
|
|
123
|
+
def system_path at, style
|
|
124
|
+
card = at.instance
|
|
124
125
|
if mod = at.instance.attach_mod
|
|
125
126
|
# generalize this to work with any mod (needs design)
|
|
126
|
-
|
|
127
|
+
codecard = card.cardname.junction? ? card.left : card
|
|
128
|
+
"#{ Cardio.gem_root}/mod/#{mod}/file/#{codecard.codename}/#{size at, style}#{card.type_code}"
|
|
127
129
|
else
|
|
128
|
-
Card.paths['files'].existent.first
|
|
130
|
+
"#{ Card.paths['files'].existent.first }/#{card.id}/#{size at, style}#{action_id at, style}"
|
|
129
131
|
end
|
|
130
132
|
end
|
|
131
133
|
|
|
132
|
-
def
|
|
134
|
+
def web_dir at, style_name
|
|
133
135
|
card_path Card.config.files_web_path
|
|
134
136
|
end
|
|
135
137
|
|
|
136
|
-
def card_id at, style_name
|
|
137
|
-
at.instance.id
|
|
138
|
-
end
|
|
139
|
-
|
|
140
138
|
def basename at, style_name
|
|
141
139
|
at.instance.name.to_name.url_key
|
|
142
140
|
end
|
|
@@ -31,7 +31,7 @@ view( :comment_box, :denial=>:blank, :tags=>:unknown_ok, :perms=>lambda { |r| r.
|
|
|
31
31
|
%{<label>My Name is:</label> #{ text_field :comment_author }}
|
|
32
32
|
end
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
#{ button_tag 'Comment', :type=>:submit, :disable_with=>"Commenting" }
|
|
35
35
|
</div>
|
|
36
36
|
}
|
|
37
37
|
end}
|
|
@@ -18,13 +18,24 @@ format :html do
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
view :content do |args|
|
|
21
|
-
wrap args.
|
|
21
|
+
wrap args.reverse_merge(:slot_class=>'card-content') do
|
|
22
22
|
[
|
|
23
23
|
_optional_render( :menu, args, :hide ),
|
|
24
24
|
_render_core( args )
|
|
25
25
|
]
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
view :content_panel do |args|
|
|
30
|
+
wrap args.reverse_merge(:slot_class=>'card-content panel panel-default') do
|
|
31
|
+
wrap_with :div, :class=>'panel-body' do
|
|
32
|
+
[
|
|
33
|
+
_optional_render( :menu, args, :hide ),
|
|
34
|
+
_render_core( args )
|
|
35
|
+
]*"\n"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
28
39
|
|
|
29
40
|
view :titled, :tags=>:comment do |args|
|
|
30
41
|
wrap args do
|
|
@@ -142,7 +153,8 @@ format :html do
|
|
|
142
153
|
end
|
|
143
154
|
end
|
|
144
155
|
end
|
|
145
|
-
|
|
156
|
+
klass = [args[:help_class], 'help-text'].compact*' '
|
|
157
|
+
%{<div class="#{klass}">#{raw text}</div>} if text
|
|
146
158
|
end
|
|
147
159
|
|
|
148
160
|
|
|
@@ -4,10 +4,10 @@ format :html do
|
|
|
4
4
|
view :new, :perms=>:create, :tags=>:unknown_ok do |args|
|
|
5
5
|
frame_and_form :create, args, 'main-success'=>'REDIRECT' do
|
|
6
6
|
[
|
|
7
|
-
_optional_render( :
|
|
8
|
-
_optional_render( :
|
|
9
|
-
_optional_render( :
|
|
10
|
-
_optional_render( :
|
|
7
|
+
_optional_render( :name_formgroup, args ),
|
|
8
|
+
_optional_render( :type_formgroup, args ),
|
|
9
|
+
_optional_render( :content_formgroups, args ),
|
|
10
|
+
_optional_render( :button_formgroup, args )
|
|
11
11
|
]
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -30,10 +30,10 @@ format :html do
|
|
|
30
30
|
unless card.rule_card :autoname
|
|
31
31
|
# prompt for name
|
|
32
32
|
hidden[:name_prompt] = true unless hidden.has_key? :name_prompt
|
|
33
|
-
args[:
|
|
33
|
+
args[:optional_name_formgroup] ||= :show
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
|
-
args[:
|
|
36
|
+
args[:optional_name_formgroup] ||= :hide
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
# type field
|
|
@@ -41,10 +41,10 @@ format :html do
|
|
|
41
41
|
( main? || card.simple? || card.is_template? ) and
|
|
42
42
|
Card.new( :type_id=>card.type_id ).ok? :create #otherwise current type won't be on menu
|
|
43
43
|
)
|
|
44
|
-
args[:
|
|
44
|
+
args[:optional_type_formgroup] = :show
|
|
45
45
|
else
|
|
46
46
|
hidden[:card][:type_id] ||= card.type_id
|
|
47
|
-
args[:
|
|
47
|
+
args[:optional_type_formgroup] = :hide
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
|
|
@@ -65,8 +65,8 @@ format :html do
|
|
|
65
65
|
view :edit, :perms=>:update, :tags=>:unknown_ok do |args|
|
|
66
66
|
frame_and_form :update, args do
|
|
67
67
|
[
|
|
68
|
-
_optional_render( :
|
|
69
|
-
_optional_render( :
|
|
68
|
+
_optional_render( :content_formgroups, args ),
|
|
69
|
+
_optional_render( :button_formgroup, args )
|
|
70
70
|
]
|
|
71
71
|
end
|
|
72
72
|
end
|
|
@@ -83,20 +83,20 @@ format :html do
|
|
|
83
83
|
view :edit_name, :perms=>:update do |args|
|
|
84
84
|
frame_and_form( { :action=>:update, :id=>card.id }, args, 'main-success'=>'REDIRECT' ) do
|
|
85
85
|
[
|
|
86
|
-
|
|
86
|
+
_render_name_formgroup( args ),
|
|
87
87
|
_optional_render( :confirm_rename, args ),
|
|
88
|
-
_optional_render( :
|
|
88
|
+
_optional_render( :button_formgroup, args )
|
|
89
89
|
]
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
view :confirm_rename do |args|
|
|
94
94
|
referers = args[:referers]
|
|
95
95
|
dependents = card.dependents
|
|
96
|
-
|
|
96
|
+
alert 'warning' do
|
|
97
97
|
%{
|
|
98
|
-
<
|
|
99
|
-
#{ %{ <
|
|
98
|
+
<h5>Are you sure you want to rename <em>#{card.name}</em>?</h5>
|
|
99
|
+
#{ %{ <h6>This change will...</h6> } if referers.any? || dependents.any? }
|
|
100
100
|
<ul>
|
|
101
101
|
#{ %{<li>automatically alter #{ dependents.size } related name(s). } if dependents.any? }
|
|
102
102
|
#{ %{<li>affect at least #{referers.size} reference(s) to "#{card.name}".} if referers.any? }
|
|
@@ -106,6 +106,7 @@ format :html do
|
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
+
|
|
109
110
|
def default_edit_name_args args
|
|
110
111
|
referers = args[:referers] = card.extended_referencers
|
|
111
112
|
args[:hidden] ||= {}
|
|
@@ -128,8 +129,8 @@ format :html do
|
|
|
128
129
|
frame_and_form :update, args do
|
|
129
130
|
#'main-success'=>'REDIRECT: _self', # adding this back in would make main cards redirect on cardtype changes
|
|
130
131
|
[
|
|
131
|
-
|
|
132
|
-
optional_render( :
|
|
132
|
+
_render_type_formgroup( args ),
|
|
133
|
+
optional_render( :button_formgroup, args )
|
|
133
134
|
]
|
|
134
135
|
end
|
|
135
136
|
end
|
|
@@ -14,9 +14,9 @@ format :html do
|
|
|
14
14
|
# single-card edit mode
|
|
15
15
|
field = content_field form, args
|
|
16
16
|
|
|
17
|
-
if [ args[:
|
|
18
|
-
# display content field in
|
|
19
|
-
|
|
17
|
+
if [ args[:optional_type_formgroup], args[:optional_name_formgroup] ].member? :show
|
|
18
|
+
# display content field in formgroup for consistency with other fields
|
|
19
|
+
formgroup '', field, :editor=>:content
|
|
20
20
|
else
|
|
21
21
|
editor_wrap( :content ) { field }
|
|
22
22
|
end
|
|
@@ -70,26 +70,27 @@ format :html do
|
|
|
70
70
|
content_tag( :div, :class=>"editor#{ " #{type}-editor" if type }" ) { yield }
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
def
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
end
|
|
79
|
-
help_text = case opts[:help]
|
|
80
|
-
when String ; _render_help :help_text=> opts[:help]
|
|
81
|
-
when true ; _render_help
|
|
73
|
+
def formgroup title, content, opts={}
|
|
74
|
+
help_text =
|
|
75
|
+
case opts[:help]
|
|
76
|
+
when String ; _render_help :help_class=>'help-block', :help_text=> opts[:help]
|
|
77
|
+
when true ; _render_help :help_class=>'help-block'
|
|
82
78
|
else ; nil
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
div_args = { :class=>['form-group', opts[:class]].compact*' ' }
|
|
82
|
+
div_args[:card_id ] = card.id if card.real?
|
|
83
|
+
div_args[:card_name] = h card.name if card.name.present?
|
|
84
|
+
|
|
85
|
+
wrap_with :div, div_args do
|
|
86
|
+
%{
|
|
87
|
+
<label>#{ title }</label>
|
|
88
|
+
<div>
|
|
89
|
+
#{ editor_wrap( opts[:editor] ) { content } }
|
|
90
|
+
#{ help_text }
|
|
91
|
+
</div>
|
|
92
|
+
}
|
|
83
93
|
end
|
|
84
|
-
%{
|
|
85
|
-
<fieldset #{ attrib_string }>
|
|
86
|
-
<legend>
|
|
87
|
-
<h2>#{ title }</h2>
|
|
88
|
-
#{ help_text }
|
|
89
|
-
</legend>
|
|
90
|
-
#{ editor_wrap( opts[:editor] ) { content } }
|
|
91
|
-
</fieldset>
|
|
92
|
-
}
|
|
93
94
|
end
|
|
94
95
|
|
|
95
96
|
def hidden_tags hash, base=nil
|
|
@@ -110,35 +111,29 @@ format :html do
|
|
|
110
111
|
|
|
111
112
|
# FIELDSET VIEWS
|
|
112
113
|
|
|
113
|
-
view :
|
|
114
|
-
|
|
114
|
+
view :name_formgroup do |args|
|
|
115
|
+
formgroup 'name', raw( name_field form ), :editor=>'name', :help=>args[:help]
|
|
115
116
|
end
|
|
116
117
|
|
|
117
|
-
view :
|
|
118
|
+
view :type_formgroup do |args|
|
|
118
119
|
field = if args[:variety] == :edit #FIXME dislike this api -ef
|
|
119
120
|
type_field :class=>'type-field edit-type-field'
|
|
120
121
|
else
|
|
121
122
|
type_field :class=>"type-field live-type-field", :href=>path(:view=>:new), 'data-remote'=>true
|
|
122
123
|
end
|
|
123
|
-
|
|
124
|
+
formgroup 'type', field, :editor => 'type', :class=>'type-formgroup'
|
|
124
125
|
end
|
|
125
126
|
|
|
126
127
|
|
|
127
|
-
view :
|
|
128
|
-
%{
|
|
129
|
-
<fieldset>
|
|
130
|
-
<div class="button-area">
|
|
131
|
-
#{ args[:buttons] }
|
|
132
|
-
</div>
|
|
133
|
-
</fieldset>
|
|
134
|
-
}
|
|
128
|
+
view :button_formgroup do |args|
|
|
129
|
+
%{<div class="form-group"><div>#{ args[:buttons] }</div></div>}
|
|
135
130
|
end
|
|
136
131
|
|
|
137
|
-
view :
|
|
132
|
+
view :content_formgroups do |args|
|
|
138
133
|
raw %{
|
|
139
|
-
<
|
|
134
|
+
<fieldset class="card-editor editor">
|
|
140
135
|
#{ edit_slot args }
|
|
141
|
-
</
|
|
136
|
+
</fieldset>
|
|
142
137
|
}
|
|
143
138
|
end
|
|
144
139
|
|
|
@@ -184,23 +179,19 @@ format :html do
|
|
|
184
179
|
# FIELD VIEWS
|
|
185
180
|
|
|
186
181
|
view :editor do |args|
|
|
187
|
-
text_area :content, :rows=>3, :class=>'tinymce-textarea card-content', :id=>unique_id
|
|
182
|
+
text_area :content, :rows=>3, :class=>'tinymce-textarea card-content', :id=>unique_id, "data-card-type-code"=>card.type_code
|
|
188
183
|
end
|
|
189
184
|
|
|
190
|
-
|
|
191
185
|
view :edit_in_form, :perms=>:update, :tags=>:unknown_ok do |args|
|
|
192
186
|
eform = form_for_multi
|
|
187
|
+
|
|
193
188
|
content = content_field eform, args.merge( :nested=>true )
|
|
194
|
-
opts = { :editor=>'content', :help=>true, :
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
if card.
|
|
198
|
-
content += raw( "\n #{ eform.hidden_field :type_id }" )
|
|
199
|
-
else
|
|
200
|
-
opts[:attribs].merge! :card_id=>card.id, :card_name=>(h card.name)
|
|
201
|
-
end
|
|
189
|
+
opts = { :editor=>'content', :help=>true, :class=>'card-editor' }
|
|
190
|
+
|
|
191
|
+
content += raw( "\n #{ eform.hidden_field :type_id }" ) if card.new_card?
|
|
192
|
+
opts[:class] += " RIGHT-#{ card.cardname.tag_name.safe_key }" if card.cardname.junction?
|
|
202
193
|
|
|
203
|
-
|
|
194
|
+
formgroup fancy_title( args[:title] ), content, opts
|
|
204
195
|
end
|
|
205
196
|
|
|
206
197
|
def process_relative_tags args
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
format :html do
|
|
2
|
-
|
|
3
|
-
view :toggle do |args|
|
|
4
|
-
verb, adjective, direction = ( args[:toggle_mode] == :close ? %w{ open open e } : %w{ close closed s } )
|
|
5
|
-
|
|
6
|
-
view_link '', adjective, :title => "#{verb} #{card.name}",
|
|
7
|
-
:class => "#{verb}-icon ui-icon ui-icon-circle-triangle-#{direction} toggler slotter nodblclick"
|
|
8
|
-
end
|
|
9
|
-
|
|
10
2
|
|
|
11
3
|
view :header do |args|
|
|
12
4
|
%{
|
|
13
|
-
<
|
|
14
|
-
#{
|
|
15
|
-
|
|
5
|
+
<div class="card-header #{ args[:header_class] }">
|
|
6
|
+
<div class="card-header-title #{ args[:title_class] }">
|
|
7
|
+
#{ _optional_render :toggle, args, :hide }
|
|
8
|
+
#{ _optional_render :title, args }
|
|
9
|
+
</div>
|
|
16
10
|
#{ _optional_render :menu, args }
|
|
17
|
-
</
|
|
11
|
+
</div>
|
|
18
12
|
}
|
|
19
13
|
end
|
|
14
|
+
|
|
15
|
+
view :toggle do |args|
|
|
16
|
+
verb, adjective, direction = ( args[:toggle_mode] == :close ? %w{ open open expand } : %w{ close closed collapse-down } )
|
|
17
|
+
|
|
18
|
+
link_to glyphicon(direction), #content_tag(:span, '', :class=>"glyphicon glyphicon-#{direction}"),
|
|
19
|
+
path( :view=>adjective ),
|
|
20
|
+
:remote => true,
|
|
21
|
+
:title => "#{verb} #{card.name}",
|
|
22
|
+
:class => "#{verb}-icon toggler slotter nodblclick"
|
|
23
|
+
end
|
|
24
|
+
|
|
20
25
|
|
|
21
26
|
view :menu, :tags=>:unknown_ok do |args|
|
|
22
27
|
return _render_template_closer if args[:menu_hack] == :template_closer
|
|
@@ -54,11 +59,29 @@ format :html do
|
|
|
54
59
|
end
|
|
55
60
|
|
|
56
61
|
view :menu_link do |args|
|
|
57
|
-
|
|
62
|
+
glyphicon 'cog'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
view :link_list do |args|
|
|
66
|
+
content_tag :ul, :class=>args[:class] do
|
|
67
|
+
item_links(args).map do |al|
|
|
68
|
+
content_tag :li, raw(al)
|
|
69
|
+
end.join "\n"
|
|
70
|
+
end
|
|
58
71
|
end
|
|
59
|
-
|
|
72
|
+
|
|
73
|
+
view :navbar_right do |args|
|
|
74
|
+
render_link_list args.merge(:class=>"nav navbar-nav navbar-right")
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
view :navbar_left do |args|
|
|
78
|
+
render_link_list args.merge(:class=>"nav navbar-nav navbar-left")
|
|
79
|
+
end
|
|
80
|
+
|
|
60
81
|
def show_follow?
|
|
61
82
|
Auth.signed_in? && !card.new_card?
|
|
62
83
|
end
|
|
84
|
+
|
|
85
|
+
|
|
63
86
|
end
|
|
64
87
|
|