card 1.16.9 → 1.16.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +3 -1
- data/db/seed/new/card_actions.yml +389 -557
- data/db/seed/new/card_acts.yml +595 -1
- data/db/seed/new/card_changes.yml +22595 -7526
- data/db/seed/new/card_references.yml +379 -407
- data/db/seed/new/cards.yml +1694 -2072
- data/db/seed/test/fixtures/card_actions.yml +966 -1102
- data/db/seed/test/fixtures/card_acts.yml +1017 -399
- data/db/seed/test/fixtures/card_changes.yml +24750 -9681
- data/db/seed/test/fixtures/card_references.yml +603 -631
- data/db/seed/test/fixtures/cards.yml +2293 -2671
- data/lib/card/set.rb +1 -1
- data/mod/01_core/set/all/content.rb +14 -12
- data/mod/03_machines/lib/javascript/wagn_mod.js.coffee +1 -1
- data/mod/05_standard/set/abstract/attachment.rb +9 -9
- data/mod/05_standard/set/all/rich_html/content.rb +115 -103
- data/mod/05_standard/set/type/file.rb +1 -1
- data/tmpsets/set/mod001-01_core/all/active_card.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/collection.rb +3 -3
- data/tmpsets/set/mod001-01_core/all/content.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/erb.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/fetch.rb +169 -93
- data/tmpsets/set/mod001-01_core/all/haml.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/initialize.rb +11 -23
- data/tmpsets/set/mod001-01_core/all/name.rb +130 -80
- data/tmpsets/set/mod001-01_core/all/pattern.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/permissions.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/phases.rb +95 -96
- data/tmpsets/set/mod001-01_core/all/references.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/rules.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/states.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/templating.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/tracked_attributes.rb +85 -60
- data/tmpsets/set/mod001-01_core/all/trash.rb +16 -13
- data/tmpsets/set/mod001-01_core/all/type.rb +5 -25
- data/tmpsets/set/mod001-01_core/all/utils.rb +2 -1
- data/tmpsets/set/mod001-01_core/all/view_cache.rb +2 -1
- data/tmpsets/set/mod002-01_history/all/actions.rb +2 -1
- data/tmpsets/set/mod002-01_history/all/content_history.rb +7 -4
- data/tmpsets/set/mod002-01_history/all/history.rb +119 -83
- data/tmpsets/set/mod003-02_basic_types/all/all_css.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/all_csv.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/all_js.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/base.rb +52 -50
- data/tmpsets/set/mod003-02_basic_types/all/file.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/json.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/rss.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/all/text.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/html.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/plain_text.rb +2 -1
- data/tmpsets/set/mod003-02_basic_types/type/pointer.rb +10 -1
- data/tmpsets/set/mod004-03_machines/right/machine_input.rb +2 -1
- data/tmpsets/set/mod004-03_machines/right/machine_output.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_ace.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_card_menu.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_html5shiv_printshiv.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_jquery.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_jquery_helper.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_slot.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/script_tinymce.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_bootstrap_compatible.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_cards.rb +2 -1
- data/tmpsets/set/mod004-03_machines/self/style_jquery_ui_smoothness.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/coffee_script.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/css.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/java_script.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/scss.rb +2 -1
- data/tmpsets/set/mod004-03_machines/type/skin.rb +2 -1
- data/tmpsets/set/mod005-04_settings/abstract/permission.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/add_help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/comment.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/default.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/read.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/script.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/structure.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/style.rb +2 -1
- data/tmpsets/set/mod005-04_settings/right/update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/accountable.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/add_help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/autoname.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/captcha.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/default.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/help.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/input.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/layout.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_create.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_delete.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/on_update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/options.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/options_label.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/read.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/recent_settings.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/script.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/structure.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/style.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/table_of_contents.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/thanks.rb +2 -1
- data/tmpsets/set/mod005-04_settings/self/update.rb +2 -1
- data/tmpsets/set/mod005-04_settings/type/setting.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/email_html.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/email_text.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/notify.rb +2 -1
- data/tmpsets/set/mod006-05_email/all/observer.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/bcc.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/cc.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/follow_fields.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/followers.rb +7 -6
- data/tmpsets/set/mod006-05_email/right/following.rb +3 -2
- data/tmpsets/set/mod006-05_email/right/from.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/html_message.rb +2 -1
- data/tmpsets/set/mod006-05_email/right/to.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/always.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/created.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/edited.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/follow.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/follow_defaults.rb +2 -1
- data/tmpsets/set/mod006-05_email/self/never.rb +2 -1
- data/tmpsets/set/mod006-05_email/type/email_template.rb +2 -1
- data/tmpsets/set/mod006-05_email/type_plus_right/user/follow.rb +3 -2
- data/tmpsets/set/mod007-05_standard/abstract/attachment.rb +22 -9
- data/tmpsets/set/mod007-05_standard/all/account.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/comment.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/error.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/event_viz.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/links.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/content.rb +3 -2
- data/tmpsets/set/mod007-05_standard/all/rich_html/editing.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/form.rb +23 -12
- data/tmpsets/set/mod007-05_standard/all/rich_html/header.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/menu.rb +3 -2
- data/tmpsets/set/mod007-05_standard/all/rich_html/modal.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/toolbar.rb +2 -1
- data/tmpsets/set/mod007-05_standard/all/rich_html/wrapper.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/account.rb +7 -6
- data/tmpsets/set/mod007-05_standard/right/discussion.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/email.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/password.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/salt.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/stats.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/status.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/token.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/when_created.rb +2 -1
- data/tmpsets/set/mod007-05_standard/right/when_last_edited.rb +2 -1
- data/tmpsets/set/mod007-05_standard/rstar/rules.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/account_links.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/alerts.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/all.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/foot.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/head.rb +2 -2
- data/tmpsets/set/mod007-05_standard/self/navbox.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/now.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/recent.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/search.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/signin.rb +45 -36
- data/tmpsets/set/mod007-05_standard/self/stats.rb +2 -1
- data/tmpsets/set/mod007-05_standard/self/version.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/basic.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/cardtype.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/date.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/file.rb +11 -3
- data/tmpsets/set/mod007-05_standard/type/image.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/layout_type.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/number.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/phrase.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/search_type.rb +70 -64
- data/tmpsets/set/mod007-05_standard/type/session.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/set.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/signup.rb +96 -64
- data/tmpsets/set/mod007-05_standard/type/toggle.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/uri.rb +2 -1
- data/tmpsets/set/mod007-05_standard/type/user.rb +50 -40
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/form.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/helper.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/bootstrap/wrapper.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/all/rich_bootstrap.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootstrap_cards.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootstrap_js.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/bootswatch_shared.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/smartmenu_css.rb +2 -1
- data/tmpsets/set/mod008-06_bootstrap/self/smartmenu_js.rb +2 -1
- metadata +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module Token; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module Token; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/token.rb ~~~~~~~~~~~
|
3
4
|
include All::Permissions::Accounts
|
4
5
|
|
5
6
|
view :raw do |args|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module WhenCreated; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module WhenCreated; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/when_created.rb ~~~~~~~~~~~
|
3
4
|
view :raw do |args|
|
4
5
|
card.left.new_card? ? '' : card.left.created_at.strftime('%A, %B %d, %Y %I:%M %p %Z')
|
5
6
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Right; module WhenLastEdited; extend Card::Set
|
2
|
+
class Card; module Set; module Right; module WhenLastEdited; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/right/when_last_edited.rb ~~~~~~~~~~~
|
3
4
|
view :raw do |args|
|
4
5
|
card.left.new_card? ? '' : card.left.updated_at.strftime('%A, %B %d, %Y %I:%M %p %Z')
|
5
6
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Rstar; module Rules; extend Card::Set
|
2
|
+
class Card; module Set; module Rstar; module Rules; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/rstar/rules.rb ~~~~~~~~~~~
|
3
4
|
event :save_recently_edited_settings, before: :extend, on: :save, when: proc{|c| c.is_rule? } do
|
4
5
|
if (recent = Card[:recent_settings])
|
5
6
|
recent.insert_item 0, cardname.right
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module AccountLinks; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module AccountLinks; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/account_links.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Alerts; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Alerts; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/alerts.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
view :raw do |args|
|
5
6
|
'<!-- *alerts is deprecated. please remove from layout -->'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module All; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module All; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/all.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
event :admin_tasks, on: :update, before: :approve do
|
5
6
|
if task = Env.params[:task]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Foot; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Foot; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/foot.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
view :raw do |args|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Head; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Head; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/head.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
|
5
6
|
view :raw do |args|
|
@@ -86,7 +87,6 @@ format :html do
|
|
86
87
|
elsif script_card
|
87
88
|
javascript_include_tag script_card.machine_output_url
|
88
89
|
end
|
89
|
-
|
90
90
|
ie9_card = Card[:script_html5shiv_printshiv]
|
91
91
|
%(#{ javascript_tag do varvals * ';' end }
|
92
92
|
#{ @js_tag if @js_tag }
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Navbox; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Navbox; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/navbox.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Now; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Now; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/now.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
view :raw do |args|
|
5
6
|
Time.now.strftime '%A, %B %d, %Y %I:%M %p %Z'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Recent; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Recent; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/recent.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
view :title do |args|
|
5
6
|
super args.merge( title: 'Recent Changes' )
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Search; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Search; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/search.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Signin; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Signin; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/signin.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
|
-
|
6
6
|
view :open do |args|
|
7
7
|
args.merge! optional_help: :show
|
8
8
|
super args
|
@@ -14,84 +14,93 @@ format :html do
|
|
14
14
|
|
15
15
|
view :open_content do |args|
|
16
16
|
# annoying step designed to avoid table of contents. sigh
|
17
|
-
_render_core(
|
17
|
+
_render_core(args)
|
18
18
|
end
|
19
19
|
|
20
|
-
view :closed_content do |
|
20
|
+
view :closed_content do |_args|
|
21
21
|
''
|
22
22
|
end
|
23
23
|
|
24
24
|
def default_core_args args={}
|
25
25
|
args[:buttons] = button_tag 'Sign in', situation: 'primary'
|
26
26
|
if Card.new(type_id: Card::SignupID).ok? :create
|
27
|
-
args[:buttons] += link_to(
|
27
|
+
args[:buttons] += link_to('...or sign up!', card_path('account/signup'))
|
28
28
|
end
|
29
|
-
args[:buttons] += raw(
|
29
|
+
args[:buttons] += raw(
|
30
|
+
"<div style='float:right'>" \
|
31
|
+
"#{ view_link 'RESET PASSWORD', :edit,
|
32
|
+
path_opts: { slot: { hide: :toolbar } } }" \
|
33
|
+
'</div>') # FIXME: hardcoded styling
|
30
34
|
args
|
31
35
|
end
|
32
36
|
|
33
37
|
view :core do |args|
|
34
|
-
account = card.fetch trait: :account, new: {}
|
35
38
|
form_args = {
|
36
39
|
hidden: { success: "REDIRECT: #{Env.interrupted_action || '*previous'}" },
|
37
40
|
recaptcha: :off
|
38
41
|
}
|
39
|
-
|
40
42
|
with_inclusion_mode :edit do
|
41
43
|
card_form :update, form_args do
|
42
44
|
[
|
43
|
-
|
44
|
-
|
45
|
-
end,
|
46
|
-
_optional_render( :button_formgroup, args )
|
45
|
+
_optional_render(:content_formgroup, args.merge(structure: true)),
|
46
|
+
_optional_render(:button_formgroup, args)
|
47
47
|
].join
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
#FORGOT PASSWORD
|
52
|
+
# FORGOT PASSWORD
|
53
53
|
view :edit do |args|
|
54
|
-
|
54
|
+
@forgot_password = true
|
55
|
+
args.merge!(
|
55
56
|
title: 'Forgot Password',
|
56
57
|
optional_help: :hide,
|
57
|
-
buttons: button_tag(
|
58
|
+
buttons: button_tag('Reset my password', situation: 'primary'),
|
58
59
|
structure: true,
|
59
60
|
hidden: {
|
60
61
|
reset_password: true,
|
61
62
|
success: { view: :reset_password_success }
|
62
63
|
}
|
63
|
-
|
64
|
+
)
|
64
65
|
|
65
66
|
Auth.as_bot { super args }
|
66
67
|
end
|
67
68
|
|
68
|
-
view :raw do |
|
69
|
-
|
69
|
+
view :raw do |_args|
|
70
|
+
if @forgot_password
|
71
|
+
"{{+#{Card[:email].name}|title:email;type:Phrase}}"
|
72
|
+
else
|
73
|
+
%(
|
74
|
+
{{+#{Card[:email].name}|titled;title:email}}
|
75
|
+
{{+#{Card[:password].name}|titled;title:password}}
|
76
|
+
)
|
77
|
+
end
|
70
78
|
end
|
71
79
|
|
72
|
-
view :reset_password_success do |
|
80
|
+
view :reset_password_success do |_args|
|
73
81
|
frame { 'Check your email for a link to reset your password' }
|
74
82
|
end
|
75
|
-
|
76
83
|
end
|
77
84
|
|
78
85
|
event :signin, before: :approve, on: :update do
|
79
|
-
email =
|
80
|
-
email &&= email
|
81
|
-
pword =
|
82
|
-
pword &&= pword
|
86
|
+
email = subfield :email
|
87
|
+
email &&= email.content
|
88
|
+
pword = subfield :password
|
89
|
+
pword &&= pword.content
|
83
90
|
|
84
91
|
abort :failure, 'bad signin args' unless email && pword
|
85
92
|
|
86
|
-
if signin_id = Auth.authenticate(
|
93
|
+
if (signin_id = Auth.authenticate(email, pword))
|
87
94
|
Auth.signin signin_id
|
88
95
|
else
|
89
|
-
accted = Auth[
|
90
|
-
|
91
|
-
|
92
|
-
when
|
93
|
-
|
96
|
+
accted = Auth[email.strip.downcase]
|
97
|
+
error_msg =
|
98
|
+
case
|
99
|
+
when accted.nil? then 'Unrecognized email.'
|
100
|
+
when !accted.account.active? then 'Sorry, that account is not active.'
|
101
|
+
else 'Wrong password'
|
94
102
|
end
|
103
|
+
errors.add :signin, error_msg
|
95
104
|
abort :failure
|
96
105
|
end
|
97
106
|
end
|
@@ -100,11 +109,13 @@ event :signin_success, after: :signin do
|
|
100
109
|
abort :success
|
101
110
|
end
|
102
111
|
|
103
|
-
event :send_reset_password_token,
|
104
|
-
|
105
|
-
|
112
|
+
event :send_reset_password_token,
|
113
|
+
before: :signin, on: :update,
|
114
|
+
when: proc { Env.params[:reset_password] } do
|
115
|
+
email = subfield :email
|
116
|
+
email &&= email.content
|
106
117
|
|
107
|
-
if accted = Auth[
|
118
|
+
if (accted = Auth[email.strip.downcase]) && accted.account.active?
|
108
119
|
accted.account.send_reset_password_token
|
109
120
|
abort :success
|
110
121
|
else
|
@@ -123,7 +134,5 @@ event :signout, before: :approve, on: :delete do
|
|
123
134
|
end
|
124
135
|
|
125
136
|
|
126
|
-
|
127
|
-
|
128
137
|
# ~~~~~~~~~~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/signin.rb ~~~~~~~~~~~
|
129
138
|
end;end;end;end;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Stats; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Stats; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/stats.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
view :core do |args|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Self; module Version; extend Card::Set
|
2
|
+
class Card; module Set; module Self; module Version; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/self/version.rb ~~~~~~~~~~~
|
3
4
|
# -*- encoding : utf-8 -*-
|
4
5
|
require_dependency 'card/version'
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Basic; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Basic; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/basic.rb ~~~~~~~~~~~
|
3
4
|
format :html do
|
4
5
|
view :open_content do |args|
|
5
6
|
content = _render_core args
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Cardtype; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Cardtype; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/cardtype.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Date; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Date; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/date.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
format :html do
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module File; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module File; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/file.rb ~~~~~~~~~~~
|
3
4
|
attachment :file, uploader: FileUploader
|
4
5
|
|
5
6
|
module SelectedAction
|
@@ -89,9 +90,11 @@ format :html do
|
|
89
90
|
end
|
90
91
|
|
91
92
|
view :preview_editor, tags: :unknown_ok do |args|
|
93
|
+
cached_upload_card_name = Card::Env.params[:attachment_upload]
|
94
|
+
cached_upload_card_name.gsub!(/\[\w+\]$/, "[cached_upload]")
|
92
95
|
<<-HTML
|
93
96
|
<div class="chosen-file">
|
94
|
-
<input type="hidden" name="
|
97
|
+
<input type="hidden" name="#{cached_upload_card_name}" value="#{card.selected_action_id}">
|
95
98
|
<table role="presentation" class="table table-striped"><tbody class="files">
|
96
99
|
<tr class="template-download fade in">
|
97
100
|
<td>
|
@@ -128,7 +131,12 @@ format :html do
|
|
128
131
|
<span>
|
129
132
|
#{card.new_card? ? 'Add' : 'Replace'} #{card.attachment_name}...
|
130
133
|
</span>
|
131
|
-
|
134
|
+
<input class="file-upload slotter form-control" type="file"
|
135
|
+
name="card[#{card.type_code}]" id="card_#{card.type_code}">
|
136
|
+
#{hidden_field_tag 'attachment_type_id', card.type_id}
|
137
|
+
#{hidden_field card.attachment_name, class: "attachment_card_name",
|
138
|
+
value: ''}
|
139
|
+
#{hidden_field_tag 'file_card_name', card.cardname.url_key}
|
132
140
|
</span>
|
133
141
|
</div>
|
134
142
|
<div id="progress" class="progress" style="display: none;">
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Image; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Image; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/image.rb ~~~~~~~~~~~
|
3
4
|
attachment :image, uploader: ImageUploader
|
4
5
|
|
5
6
|
include File::SelectedAction
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module LayoutType; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module LayoutType; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/layout_type.rb ~~~~~~~~~~~
|
3
4
|
# -*- encoding : utf-8 -*-
|
4
5
|
include Html
|
5
6
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Number; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Number; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/number.rb ~~~~~~~~~~~
|
3
4
|
|
4
5
|
view :editor do |args|
|
5
6
|
text_field :content, class: 'card-content'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module Phrase; extend Card::Set
|
2
|
+
class Card; module Set; module Type; module Phrase; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/phrase.rb ~~~~~~~~~~~
|
3
4
|
view :editor do |args|
|
4
5
|
text_field :content, class: 'card-content'
|
5
6
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
class Card; module Set; module Type; module SearchType; extend Card::Set
|
3
|
-
|
2
|
+
class Card; module Set; module Type; module SearchType; extend Card::Set
|
3
|
+
# ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/search_type.rb ~~~~~~~~~~~
|
4
4
|
|
5
5
|
def item_cards params={}
|
6
6
|
s = query(params)
|
7
|
-
raise(
|
7
|
+
raise('OH NO.. no limit') unless s[:limit]
|
8
8
|
# forces explicit limiting
|
9
9
|
# can be 0 or less to force no limit
|
10
|
-
Card.search(
|
10
|
+
Card.search(s)
|
11
11
|
end
|
12
12
|
|
13
13
|
def item_names params={}
|
@@ -15,11 +15,12 @@ def item_names params={}
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def item_type
|
18
|
+
return if query[:type].is_a?(Array) || query[:type].is_a?(Hash)
|
18
19
|
query[:type]
|
19
20
|
end
|
20
21
|
|
21
22
|
def count params={}
|
22
|
-
Card.count_by_wql query(
|
23
|
+
Card.count_by_wql query(params)
|
23
24
|
end
|
24
25
|
|
25
26
|
def query params={}
|
@@ -28,47 +29,50 @@ def query params={}
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def get_query params={}
|
31
|
-
|
32
|
+
# why is this a wagn_bot thing? can't deny search content??
|
33
|
+
query = Auth.as_bot do
|
32
34
|
query_content = params.delete(:query) || raw_content
|
33
|
-
|
35
|
+
case
|
36
|
+
when query_content.empty?
|
34
37
|
raise JSON::ParserError,
|
35
|
-
|
38
|
+
"Error in card '#{name}':can't run search with empty content"
|
39
|
+
when query_content.is_a?(String)
|
40
|
+
JSON.parse(query_content)
|
41
|
+
else query_content
|
36
42
|
end
|
37
|
-
String === query_content ? JSON.parse( query_content ) : query_content
|
38
43
|
end
|
39
44
|
query.symbolize_keys!.merge! params.symbolize_keys
|
40
|
-
if default_limit = query.delete(:default_limit)
|
41
|
-
query[:limit]
|
45
|
+
if (default_limit = query.delete(:default_limit))
|
46
|
+
query[:limit] ||= default_limit
|
42
47
|
end
|
43
48
|
query[:context] ||= cardname
|
44
49
|
query
|
45
50
|
end
|
46
51
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
52
|
format do
|
51
|
-
|
53
|
+
# rubocop:disable Style/ExtraSpacing
|
52
54
|
view :core do |args|
|
53
|
-
view =
|
54
|
-
|
55
|
-
when
|
56
|
-
when
|
57
|
-
|
55
|
+
view =
|
56
|
+
case search_results args
|
57
|
+
when Exception then :search_error
|
58
|
+
when Integer then :search_count
|
59
|
+
when @mode == :template then :raw
|
60
|
+
else :card_list
|
58
61
|
end
|
59
62
|
_render view, args
|
60
63
|
end
|
64
|
+
# rubocop:enable Style/ExtraSpacing
|
61
65
|
|
62
|
-
|
63
|
-
view :search_count do |args|
|
66
|
+
view :search_count do |_args|
|
64
67
|
search_results.to_s
|
65
68
|
end
|
66
69
|
|
67
|
-
view :search_error do |
|
68
|
-
|
70
|
+
view :search_error do |_args|
|
71
|
+
sr_class = search_results.class.to_s
|
72
|
+
%{#{sr_class} :: #{search_results.message} :: #{card.raw_content}}
|
69
73
|
end
|
70
74
|
|
71
|
-
view :card_list do |
|
75
|
+
view :card_list do |_args|
|
72
76
|
if search_results.empty?
|
73
77
|
'no results'
|
74
78
|
else
|
@@ -82,8 +86,8 @@ format do
|
|
82
86
|
@search_vars ||=
|
83
87
|
begin
|
84
88
|
v = {}
|
85
|
-
v[:query] = card.query(
|
86
|
-
v[:item]
|
89
|
+
v[:query] = card.query(search_params)
|
90
|
+
v[:item] = set_inclusion_opts args.merge(query_view: v[:query][:view])
|
87
91
|
v
|
88
92
|
rescue JSON::ParserError => e
|
89
93
|
{ error: e }
|
@@ -96,9 +100,13 @@ format do
|
|
96
100
|
if search_vars[:error]
|
97
101
|
search_vars[:error]
|
98
102
|
else
|
99
|
-
|
100
|
-
|
101
|
-
|
103
|
+
begin
|
104
|
+
raw_results = card.item_cards search_params
|
105
|
+
is_count = search_vars[:query][:return] == 'count'
|
106
|
+
is_count ? raw_results.to_i : raw_results
|
107
|
+
rescue BadQuery => e
|
108
|
+
e
|
109
|
+
end
|
102
110
|
end
|
103
111
|
end
|
104
112
|
end
|
@@ -108,7 +116,7 @@ format do
|
|
108
116
|
begin
|
109
117
|
card.item_names search_params
|
110
118
|
rescue => e
|
111
|
-
{ error: e}
|
119
|
+
{ error: e }
|
112
120
|
end
|
113
121
|
end
|
114
122
|
|
@@ -121,13 +129,12 @@ format do
|
|
121
129
|
def set_inclusion_opts args
|
122
130
|
@inclusion_defaults = nil
|
123
131
|
@inclusion_opts ||= {}
|
124
|
-
@inclusion_opts[:view] = args[:item] || inclusion_opts[:view] ||
|
132
|
+
@inclusion_opts[:view] = args[:item] || inclusion_opts[:view] ||
|
133
|
+
args[:query_view] || default_item_view
|
125
134
|
# explicit > inclusion syntax > WQL > inclusion defaults
|
126
135
|
end
|
127
136
|
|
128
|
-
|
129
|
-
|
130
|
-
def page_link text, page, current=false, options={}
|
137
|
+
def page_link text, page, _current=false, options={}
|
131
138
|
@paging_path_args[:offset] = page * @paging_limit
|
132
139
|
options.merge!(class: 'card-paging-link slotter', remote: true)
|
133
140
|
link_to raw(text), path(@paging_path_args), options
|
@@ -146,11 +153,13 @@ format do
|
|
146
153
|
end
|
147
154
|
|
148
155
|
def previous_page_link page
|
149
|
-
page_li '<span aria-hidden="true">«</span>', page, false,
|
156
|
+
page_li '<span aria-hidden="true">«</span>', page, false,
|
157
|
+
'aria-label' => 'Previous'
|
150
158
|
end
|
151
159
|
|
152
160
|
def next_page_link page
|
153
|
-
page_li '<span aria-hidden="true">»</span>', page, false,
|
161
|
+
page_li '<span aria-hidden="true">»</span>', page, false,
|
162
|
+
'aria-label' => 'Next'
|
154
163
|
end
|
155
164
|
|
156
165
|
def ellipse_page
|
@@ -162,10 +171,8 @@ format do
|
|
162
171
|
end
|
163
172
|
end
|
164
173
|
|
165
|
-
|
166
174
|
format :data do
|
167
|
-
|
168
|
-
view :card_list do |args|
|
175
|
+
view :card_list do |_args|
|
169
176
|
search_results.map do |c|
|
170
177
|
nest c
|
171
178
|
end
|
@@ -192,13 +199,13 @@ end
|
|
192
199
|
format :rss do
|
193
200
|
view :feed_body do |args|
|
194
201
|
case raw_feed_items args
|
195
|
-
when Exception
|
196
|
-
when Integer
|
202
|
+
when Exception then @xml.item(render :search_error)
|
203
|
+
when Integer then @xml.item(render :search_count)
|
197
204
|
else super args
|
198
205
|
end
|
199
206
|
end
|
200
207
|
|
201
|
-
def raw_feed_items
|
208
|
+
def raw_feed_items _args
|
202
209
|
@raw_feed_items ||= begin
|
203
210
|
search_params.merge!(default_limit: 25)
|
204
211
|
search_results
|
@@ -207,7 +214,6 @@ format :rss do
|
|
207
214
|
end
|
208
215
|
|
209
216
|
format :html do
|
210
|
-
|
211
217
|
view :card_list do |args|
|
212
218
|
paging = _optional_render :paging, args
|
213
219
|
|
@@ -234,42 +240,44 @@ format :html do
|
|
234
240
|
end
|
235
241
|
end
|
236
242
|
|
237
|
-
|
238
243
|
view :closed_content do |args|
|
239
244
|
if @depth > self.class.max_depth
|
240
|
-
|
245
|
+
'...'
|
241
246
|
else
|
242
247
|
search_limit = args[:closed_search_limit]
|
243
|
-
search_params[:limit] =
|
244
|
-
|
245
|
-
_render_core args.merge(
|
246
|
-
# TODO: if item is queryified to be "name", then that should work.
|
248
|
+
search_params[:limit] =
|
249
|
+
search_limit && [search_limit, Card.config.closed_search_limit].min
|
250
|
+
_render_core args.merge(hide: 'paging', item: :link)
|
251
|
+
# TODO: if item is queryified to be "name", then that should work.
|
252
|
+
# otherwise use link
|
247
253
|
end
|
248
254
|
end
|
249
255
|
|
250
256
|
view :editor, mod: Html::HtmlFormat
|
251
257
|
|
252
|
-
view :no_search_results do |
|
258
|
+
view :no_search_results do |_args|
|
253
259
|
%{<div class="search-no-results"></div>}
|
254
260
|
end
|
255
261
|
|
256
|
-
view :paging do |
|
262
|
+
view :paging do |_args|
|
257
263
|
s = card.query search_params
|
258
264
|
offset, limit = s[:offset].to_i, s[:limit].to_i
|
259
265
|
return '' if limit < 1
|
260
|
-
|
266
|
+
# avoid query if we know there aren't enough results to warrant paging
|
267
|
+
return '' if offset == 0 && limit > offset + search_results.length
|
261
268
|
total = card.count search_params
|
262
|
-
|
269
|
+
# should only happen if limit exactly equals the total
|
270
|
+
return '' if limit >= total
|
263
271
|
|
264
272
|
@paging_path_args = { limit: limit, item: inclusion_defaults(card)[:view] }
|
265
273
|
@paging_limit = limit
|
266
274
|
|
267
275
|
s[:vars].each { |key, value| @paging_path_args["_#{key}"] = value }
|
268
276
|
|
269
|
-
out = ['<nav><ul class="pagination paging">'
|
277
|
+
out = ['<nav><ul class="pagination paging">']
|
270
278
|
|
271
|
-
total_pages
|
272
|
-
current_page = (
|
279
|
+
total_pages = ((total - 1) / limit).to_i
|
280
|
+
current_page = (offset / limit).to_i # should already be integer
|
273
281
|
window = 2 # should be configurable
|
274
282
|
window_min = current_page - window
|
275
283
|
window_max = current_page + window
|
@@ -277,19 +285,19 @@ format :html do
|
|
277
285
|
previous_page = current_page > 0 ? current_page - 1 : false
|
278
286
|
out << previous_page_link(previous_page)
|
279
287
|
if window_min > 0
|
280
|
-
out << page_li(
|
288
|
+
out << page_li(1, 0)
|
281
289
|
out << ellipse_page if window_min > 1
|
282
290
|
end
|
283
291
|
|
284
|
-
(window_min
|
285
|
-
next if page < 0
|
292
|
+
(window_min..window_max).each do |page|
|
293
|
+
next if page < 0 || page > total_pages
|
286
294
|
text = page + 1
|
287
|
-
out << page_li(
|
295
|
+
out << page_li(text, page, page == current_page)
|
288
296
|
end
|
289
297
|
|
290
298
|
if total_pages > window_max
|
291
299
|
out << ellipse_page if total_pages > window_max + 1
|
292
|
-
out << page_li(
|
300
|
+
out << page_li(total_pages + 1, total_pages)
|
293
301
|
end
|
294
302
|
|
295
303
|
next_page = current_page < total_pages ? current_page + 1 : false
|
@@ -302,10 +310,8 @@ format :html do
|
|
302
310
|
def default_search_params
|
303
311
|
set_default_search_params default_limit: 20
|
304
312
|
end
|
305
|
-
|
306
313
|
end
|
307
314
|
|
308
315
|
|
309
|
-
|
310
316
|
# ~~~~~~~~~~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/search_type.rb ~~~~~~~~~~~
|
311
317
|
end;end;end;end;
|