├── .buildpath
├── .gitignore
├── .htaccess_dist
├── .project
├── .settings
└── org.eclipse.php.core.prefs
├── .travis.yml
├── LICENSE
├── README.md
├── UPGRADE-2.2.md
├── UPGRADE.md
├── app
├── .htaccess
├── AppCache.php
├── AppKernel.php
├── Resources
│ ├── FOSOAuthServerBundle
│ │ └── views
│ │ │ └── Authorize
│ │ │ ├── authorize.html.twig
│ │ │ └── authorize_content.html.twig
│ ├── FOSUserBundle
│ │ └── views
│ │ │ └── layout.html.twig
│ └── views
│ │ └── base.html.twig
├── SymfonyRequirements.php
├── autoload.php
├── check.php
├── config
│ ├── .buildpath
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.php.core.prefs
│ ├── config.yml
│ ├── config_dev.yml
│ ├── config_prod.yml
│ ├── config_test.yml
│ ├── parameters.yml.dist
│ ├── routing.yml
│ ├── routing_dev.yml
│ └── security.yml
├── console
└── phpunit.xml.dist
├── composer.json
├── composer.lock
├── netrunnerdb-2013-10-16.sql.gz
├── netrunnerdb-2014-06-07.sql.gz
├── netrunnerdb_cards_2014-08-27.sql.gz
├── src
├── .buildpath
├── .htaccess
├── .project
├── .settings
│ └── org.eclipse.php.core.prefs
└── Netrunnerdb
│ ├── .project
│ ├── .settings
│ └── org.eclipse.core.resources.prefs
│ ├── BuilderBundle
│ ├── .project
│ ├── Command
│ │ └── HighlightCommand.php
│ ├── Controller
│ │ ├── ApiController.php
│ │ ├── BuilderController.php
│ │ ├── SocialController.php
│ │ ├── TagController.php
│ │ └── ToolsController.php
│ ├── DependencyInjection
│ │ ├── Configuration.php
│ │ └── NetrunnerdbBuilderExtension.php
│ ├── Entity
│ │ ├── Comment.php
│ │ ├── CommentRepository.php
│ │ ├── Deck.php
│ │ ├── DeckRepository.php
│ │ ├── Decklist.php
│ │ ├── DecklistRepository.php
│ │ ├── Decklistslot.php
│ │ ├── DecklistslotRepository.php
│ │ ├── Deckslot.php
│ │ ├── DeckslotRepository.php
│ │ └── Highlight.php
│ ├── NetrunnerdbBuilderBundle.php
│ ├── Resources
│ │ ├── config
│ │ │ ├── doctrine
│ │ │ │ ├── Comment.orm.yml
│ │ │ │ ├── Deck.orm.yml
│ │ │ │ ├── Decklist.orm.yml
│ │ │ │ ├── Decklistslot.orm.yml
│ │ │ │ ├── Deckslot.orm.yml
│ │ │ │ └── Highlight.orm.yml
│ │ │ ├── routing.yml
│ │ │ └── services.yml
│ │ ├── doc
│ │ │ └── index.rst
│ │ ├── public
│ │ │ ├── css
│ │ │ │ ├── icons.css
│ │ │ │ └── style.css
│ │ │ ├── fonts
│ │ │ │ ├── exo-light-webfont.eot
│ │ │ │ ├── exo-light-webfont.svg
│ │ │ │ ├── exo-light-webfont.ttf
│ │ │ │ ├── exo-light-webfont.woff
│ │ │ │ ├── exo-medium-webfont.eot
│ │ │ │ ├── exo-medium-webfont.svg
│ │ │ │ ├── exo-medium-webfont.ttf
│ │ │ │ ├── exo-medium-webfont.woff
│ │ │ │ ├── exo-regular-webfont.eot
│ │ │ │ ├── exo-regular-webfont.svg
│ │ │ │ ├── exo-regular-webfont.ttf
│ │ │ │ ├── exo-regular-webfont.woff
│ │ │ │ ├── exo-semibold-webfont.eot
│ │ │ │ ├── exo-semibold-webfont.svg
│ │ │ │ ├── exo-semibold-webfont.ttf
│ │ │ │ ├── exo-semibold-webfont.woff
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ ├── netrunner.eot
│ │ │ │ ├── netrunner.svg
│ │ │ │ ├── netrunner.ttf
│ │ │ │ ├── netrunner.woff
│ │ │ │ ├── nrdb.eot
│ │ │ │ ├── nrdb.svg
│ │ │ │ ├── nrdb.ttf
│ │ │ │ └── nrdb.woff
│ │ │ ├── images
│ │ │ │ ├── apple-touch-icon.png
│ │ │ │ ├── factions
│ │ │ │ │ ├── 16px
│ │ │ │ │ │ ├── anarch.png
│ │ │ │ │ │ ├── criminal.png
│ │ │ │ │ │ ├── haas-bioroid.png
│ │ │ │ │ │ ├── jinteki.png
│ │ │ │ │ │ ├── nbn.png
│ │ │ │ │ │ ├── neutral.png
│ │ │ │ │ │ ├── shaper.png
│ │ │ │ │ │ └── weyland-consortium.png
│ │ │ │ │ └── 38px
│ │ │ │ │ │ ├── anarch.png
│ │ │ │ │ │ ├── criminal.png
│ │ │ │ │ │ ├── haas-bioroid.png
│ │ │ │ │ │ ├── jinteki.png
│ │ │ │ │ │ ├── nbn.png
│ │ │ │ │ │ ├── neutral.png
│ │ │ │ │ │ ├── shaper.png
│ │ │ │ │ │ └── weyland-consortium.png
│ │ │ │ ├── favicon.png
│ │ │ │ ├── flags.png
│ │ │ │ ├── icon.png
│ │ │ │ ├── search.jpg
│ │ │ │ └── types
│ │ │ │ │ ├── Agenda.png
│ │ │ │ │ ├── Asset.png
│ │ │ │ │ ├── Event.png
│ │ │ │ │ ├── ICE.png
│ │ │ │ │ ├── Identity.png
│ │ │ │ │ ├── Operation.png
│ │ │ │ │ ├── Program.png
│ │ │ │ │ ├── Upgrade.png
│ │ │ │ │ ├── agenda.png
│ │ │ │ │ ├── asset.png
│ │ │ │ │ ├── event.png
│ │ │ │ │ ├── hardware.png
│ │ │ │ │ ├── ice.png
│ │ │ │ │ ├── identity.png
│ │ │ │ │ ├── operation.png
│ │ │ │ │ ├── program.png
│ │ │ │ │ ├── resource.png
│ │ │ │ │ └── upgrade.png
│ │ │ ├── js
│ │ │ │ ├── deck.js
│ │ │ │ ├── decklist.js
│ │ │ │ ├── decks.js
│ │ │ │ ├── deckview.js
│ │ │ │ ├── directimport.js
│ │ │ │ ├── index.js
│ │ │ │ ├── jquery.textcomplete.min.js
│ │ │ │ ├── nrdb.card_modal.js
│ │ │ │ ├── nrdb.data.js
│ │ │ │ ├── nrdb.deck_browser.js
│ │ │ │ ├── nrdb.deck_gallery.js
│ │ │ │ ├── nrdb.draw_simulator.js
│ │ │ │ ├── nrdb.format.js
│ │ │ │ ├── nrdb.fuzzy_search.js
│ │ │ │ ├── nrdb.js
│ │ │ │ ├── nrdb.smart_filter.js
│ │ │ │ ├── nrdb.tip.js
│ │ │ │ ├── nrdb.user.js
│ │ │ │ ├── search.js
│ │ │ │ ├── string_score.min.js
│ │ │ │ └── taffy.js
│ │ │ └── libs
│ │ │ │ ├── jquery
│ │ │ │ └── 2.1.0
│ │ │ │ │ └── jquery.min.js
│ │ │ │ └── qtip2
│ │ │ │ └── 2.1.1
│ │ │ │ ├── jquery.qtip.css
│ │ │ │ └── jquery.qtip.js
│ │ ├── translations
│ │ │ └── messages.fr.xlf
│ │ └── views
│ │ │ ├── Builder
│ │ │ ├── deck.html.twig
│ │ │ ├── decks.html.twig
│ │ │ ├── deckview.html.twig
│ │ │ ├── directimport.html.twig
│ │ │ └── initbuild.html.twig
│ │ │ ├── Decklist
│ │ │ ├── decklist.html.twig
│ │ │ └── decklists.html.twig
│ │ │ ├── Default
│ │ │ ├── allcomments.html.twig
│ │ │ ├── donators.html.twig
│ │ │ ├── index.html.twig
│ │ │ ├── profile.html.twig
│ │ │ └── usercomments.html.twig
│ │ │ ├── Emails
│ │ │ ├── newcomment_author.html.twig
│ │ │ ├── newcomment_commenter.html.twig
│ │ │ └── newcomment_mentionned.html.twig
│ │ │ ├── Search
│ │ │ └── form.html.twig
│ │ │ ├── Tools
│ │ │ └── demo.html.twig
│ │ │ ├── layout.html.twig
│ │ │ └── octgn.xml.twig
│ ├── Services
│ │ ├── Decks.php
│ │ └── Judge.php
│ └── Tests
│ │ └── Controller
│ │ └── DefaultControllerTest.php
│ ├── CardsBundle
│ ├── .buildpath
│ ├── .project
│ ├── .settings
│ │ ├── org.eclipse.core.resources.prefs
│ │ └── org.eclipse.php.core.prefs
│ ├── Controller
│ │ ├── ApiController.php
│ │ ├── CardController.php
│ │ ├── CycleController.php
│ │ ├── DefaultController.php
│ │ ├── ExcelController.php
│ │ ├── PackController.php
│ │ ├── SearchController.php
│ │ └── TypeController.php
│ ├── DQL
│ │ ├── BinaryFunction.php
│ │ └── ReplaceFunction.php
│ ├── DependencyInjection
│ │ ├── Configuration.php
│ │ └── NetrunnerdbCardsExtension.php
│ ├── Entity
│ │ ├── Card.php
│ │ ├── Cycle.php
│ │ ├── Faction.php
│ │ ├── Pack.php
│ │ ├── Side.php
│ │ └── Type.php
│ ├── Form
│ │ ├── CardType.php
│ │ ├── CycleType.php
│ │ ├── PackType.php
│ │ └── TypeType.php
│ ├── NetrunnerdbCardsBundle.php
│ ├── Resources
│ │ ├── config
│ │ │ ├── doctrine
│ │ │ │ ├── Card.orm.yml
│ │ │ │ ├── Cycle.orm.yml
│ │ │ │ ├── Faction.orm.yml
│ │ │ │ ├── Pack.orm.yml
│ │ │ │ ├── Side.orm.yml
│ │ │ │ └── Type.orm.yml
│ │ │ ├── routing.yml
│ │ │ ├── routing
│ │ │ │ ├── card.yml
│ │ │ │ ├── cards.yml
│ │ │ │ ├── cycle.yml
│ │ │ │ ├── pack.yml
│ │ │ │ ├── rulings.yml
│ │ │ │ ├── rxc.yml
│ │ │ │ └── type.yml
│ │ │ └── services.yml
│ │ ├── doc
│ │ │ └── index.rst
│ │ ├── public
│ │ │ ├── images
│ │ │ │ ├── contact.png
│ │ │ │ └── factions
│ │ │ │ │ ├── 16px
│ │ │ │ │ ├── Anarch.png
│ │ │ │ │ ├── Criminal.png
│ │ │ │ │ ├── Haas-Bioroid.png
│ │ │ │ │ ├── Jinteki.png
│ │ │ │ │ ├── NBN.png
│ │ │ │ │ ├── Shaper.png
│ │ │ │ │ └── Weyland Consortium.png
│ │ │ │ │ ├── 64px-alpha
│ │ │ │ │ ├── anarch.png
│ │ │ │ │ ├── criminal.png
│ │ │ │ │ ├── haas-bioroid.png
│ │ │ │ │ ├── jinteki.png
│ │ │ │ │ ├── nbn.png
│ │ │ │ │ ├── shaper.png
│ │ │ │ │ └── weyland-consortium.png
│ │ │ │ │ └── 64px
│ │ │ │ │ ├── Anarch.png
│ │ │ │ │ ├── Criminal.png
│ │ │ │ │ ├── Haas-Bioroid.png
│ │ │ │ │ ├── Jinteki.png
│ │ │ │ │ ├── NBN.png
│ │ │ │ │ ├── Shaper.png
│ │ │ │ │ └── Weyland Consortium.png
│ │ │ └── js
│ │ │ │ └── save-settings.js
│ │ ├── translations
│ │ │ ├── messages.de.yml
│ │ │ ├── messages.de.yml~
│ │ │ ├── messages.es.yml
│ │ │ ├── messages.es.yml~
│ │ │ ├── messages.fr.yml
│ │ │ ├── messages.fr.yml~
│ │ │ └── messages.pl.yml
│ │ └── views
│ │ │ ├── Card
│ │ │ ├── edit.html.twig
│ │ │ ├── index.html.twig
│ │ │ ├── new.html.twig
│ │ │ └── show.html.twig
│ │ │ ├── Cycle
│ │ │ ├── edit.html.twig
│ │ │ ├── index.html.twig
│ │ │ ├── new.html.twig
│ │ │ └── show.html.twig
│ │ │ ├── Default
│ │ │ ├── about.html.twig
│ │ │ ├── allsets.html.twig
│ │ │ ├── apidoc.html.twig
│ │ │ ├── langs.html.twig
│ │ │ ├── menu.html.twig
│ │ │ ├── rules.html.twig
│ │ │ ├── rulings.html.twig
│ │ │ ├── searchoptions.html.twig
│ │ │ └── sitemap.html.twig
│ │ │ ├── Excel
│ │ │ ├── confirm.html.twig
│ │ │ └── form.html.twig
│ │ │ ├── Pack
│ │ │ ├── edit.html.twig
│ │ │ ├── index.html.twig
│ │ │ ├── new.html.twig
│ │ │ └── show.html.twig
│ │ │ ├── Search
│ │ │ ├── cardlayouts.html.twig
│ │ │ ├── display-card.html.twig
│ │ │ ├── display-list.html.twig
│ │ │ ├── display-scan.html.twig
│ │ │ ├── display-short.html.twig
│ │ │ ├── display-spoiler.html.twig
│ │ │ ├── display.html.twig
│ │ │ ├── pagination.html.twig
│ │ │ ├── paginationitem.html.twig
│ │ │ ├── searchbar.html.twig
│ │ │ ├── searchform.html.twig
│ │ │ └── setnavigation.html.twig
│ │ │ ├── Type
│ │ │ ├── edit.html.twig
│ │ │ ├── index.html.twig
│ │ │ ├── new.html.twig
│ │ │ └── show.html.twig
│ │ │ ├── apiset.xml.twig
│ │ │ └── main.html.twig
│ ├── Services
│ │ └── CardsData.php
│ └── Tests
│ │ └── Controller
│ │ ├── CardControllerTest.php
│ │ ├── CardsControllerTest.php
│ │ ├── CycleControllerTest.php
│ │ ├── DefaultControllerTest.php
│ │ ├── PackControllerTest.php
│ │ ├── RulingsControllerTest.php
│ │ ├── RxcControllerTest.php
│ │ └── TypeControllerTest.php
│ └── UserBundle
│ ├── Command
│ ├── CreateClientCommand.php
│ └── DeleteInactiveCommand.php
│ ├── Controller
│ ├── DefaultController.php
│ ├── RegistrationController.php
│ └── SecurityController.php
│ ├── DependencyInjection
│ ├── Configuration.php
│ └── NetrunnerdbUserExtension.php
│ ├── Entity
│ ├── AccessToken.php
│ ├── AuthCode.php
│ ├── Client.php
│ ├── RefreshToken.php
│ ├── User.php
│ └── UserRepository.php
│ ├── NetrunnerdbUserBundle.php
│ ├── Provider
│ └── UserProvider.php
│ ├── Resources
│ ├── config
│ │ ├── doctrine
│ │ │ ├── AccessToken.orm.yml
│ │ │ ├── AuthCode.orm.yml
│ │ │ ├── Client.orm.yml
│ │ │ ├── RefreshToken.orm.yml
│ │ │ └── User.orm.yml
│ │ ├── routing.yml
│ │ └── services.yml
│ ├── doc
│ │ └── index.rst
│ ├── translations
│ │ └── messages.fr.xlf
│ └── views
│ │ ├── Default
│ │ └── profile.html.twig
│ │ └── Security
│ │ └── login.html.twig
│ └── Tests
│ └── Controller
│ └── DefaultControllerTest.php
└── web
├── app.php
├── app_dev.php
├── config.php
└── robots.txt
/.buildpath:
--------------------------------------------------------------------------------
1 |
2 |
8 | The application {{ client.name }} would like to connect to your account. 9 |
10 |11 | If you agree, {{ client.name }} will be able to perform the following operations on your behalf: 12 |
13 |'); 31 | return '
'+text+'
'; 32 | } 33 | 34 | })(NRDB.format, jQuery); 35 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/public/js/nrdb.fuzzy_search.js: -------------------------------------------------------------------------------- 1 | if (typeof NRDB != "object") 2 | var NRDB = { data_loaded: jQuery.Callbacks() }; 3 | 4 | NRDB.fuzzy_search = {}; 5 | (function(fuzzy_search, $) { 6 | 7 | // takes a card name and fuzzy-searches it in the card db 8 | // the input can include a qty indicator like 3x 9 | // returns an array of objects Card with an additional key "qty" 10 | fuzzy_search.lookup = function(input, max_results) { 11 | if(max_results == null) max_results = 5; 12 | var qty = null, name = input.replace(/\(.*\)/, '').replace(/\W+/g, ' ').replace(/\s+/, ' ').trim().toLowerCase(); 13 | if(name.match(/^(\d+)x?\s*(.*)/)) { 14 | qty = parseInt(RegExp.$1, 10); 15 | name = RegExp.$2; 16 | } else if(name.match(/(.*)\s*x?(\d+)$/)) { 17 | qty = parseInt(RegExp.$2, 10); 18 | name = RegExp.$1; 19 | } 20 | if(name == "") return; 21 | var options = []; 22 | var query = NRDB.data.cards({token: {likenocase:name}}); 23 | if(query.count()) { 24 | query.each(function (record,recordnumber) { 25 | options.push(record); 26 | }); 27 | } else if(typeof String.prototype.score === "function") { 28 | var matches = []; 29 | $.each(dict, function(index, row) { 30 | var score = row.token.score(name, 0.9); 31 | row.score = score; 32 | matches.push(row); 33 | }); 34 | matches.sort(function (a,b) { return a.score > b.score ? -1 : a.score < b.score ? 1 : 0 }); 35 | var bestScore = matches[0].score; 36 | for(var i=0; i' + NRDB.format.type(card) + '
'; 19 | var influence = ''; 20 | for (var i = 0; i < card.factioncost; i++) 21 | influence += "•"; 22 | if (card.strength != null) 23 | type += 'Strength ' + card.strength + '
'; 24 | var image_svg = ''; 25 | if($('#nrdb_svg_hex').length && typeof InstallTrigger === 'undefined') { 26 | // no hexagon for Firefox, bad boy! 27 | image_svg = ''; 29 | } 30 | $(this).qtip( 31 | { 32 | content : { 33 | text : image_svg 34 | + '' + influence 39 | + ' ' + card.faction + ' – ' + card.setname + '
' 40 | }, 41 | style : { 42 | classes : 'qtip-bootstrap qtip-nrdb' 43 | }, 44 | position : { 45 | my : 'left center', 46 | at : 'right center', 47 | viewport : $(window) 48 | }, 49 | show : { 50 | event : event.type, 51 | ready : true, 52 | solo : true 53 | }/*, 54 | hide : { 55 | event: 'unfocus' 56 | }*/ 57 | }, event); 58 | }; 59 | 60 | $(function() { 61 | 62 | if(typeof Modernizr == 'undefined' || !Modernizr.touch ) { 63 | $('body').on({ 64 | mouseover : tip.display, 65 | focus : tip.display 66 | }, 'a'); 67 | } 68 | 69 | }); 70 | 71 | })(NRDB.tip, jQuery); 72 | 73 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/public/js/nrdb.user.js: -------------------------------------------------------------------------------- 1 | if (typeof NRDB != "object") 2 | var NRDB = { data_loaded: jQuery.Callbacks() }; 3 | 4 | NRDB.user = {}; 5 | (function(user, $) { 6 | 7 | user.params = {}; 8 | user.deferred = $.Deferred().always(function() { 9 | if(user.data) { 10 | user.update(); 11 | } else { 12 | user.anonymous(); 13 | } 14 | }); 15 | 16 | user.query = function () { 17 | $.ajax(Routing.generate('user_info', user.params), { 18 | cache: false, 19 | dataType: 'json', 20 | success: function(data, textStatus, jqXHR) { 21 | user.data = data; 22 | user.deferred.resolve(); 23 | }, 24 | error: function(jqXHR, textStatus, errorThrown) { 25 | user.deferred.reject(); 26 | } 27 | }); 28 | } 29 | 30 | user.retrieve = function () { 31 | if(localStorage) { 32 | var timestamp = new Date(parseInt(localStorage.getItem('user_timestamp'),10)); 33 | var now = new Date(); 34 | if(now - timestamp < 3600000) { 35 | var storedData = localStorage.getItem('user'); 36 | if(storedData) { 37 | user.data = JSON.parse(storedData); 38 | user.deferred.resolve(); 39 | return; 40 | } 41 | } 42 | } 43 | user.query(); 44 | } 45 | 46 | user.wipe = function () { 47 | localStorage.removeItem('user'); 48 | localStorage.removeItem('user_timestamp'); 49 | } 50 | 51 | user.store = function () { 52 | localStorage.setItem('user', JSON.stringify(user.data)); 53 | localStorage.setItem('user_timestamp', new Date().getTime()); 54 | } 55 | 56 | user.anonymous = function() { 57 | user.wipe(); 58 | $('#login').append(' '); 59 | } 60 | 61 | user.update = function() { 62 | user.store(); 63 | $('#login').addClass('dropdown').append(' '); 72 | } 73 | 74 | $(function() { 75 | if($.isEmptyObject(user.params)) { 76 | user.retrieve() 77 | } else { 78 | user.query(); 79 | } 80 | }); 81 | 82 | })(NRDB.user, jQuery); 83 | 84 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/public/js/search.js: -------------------------------------------------------------------------------- 1 | NRDB.data_loaded.add(function() { 2 | NRDB.data.sets({ 3 | code : "alt" 4 | }).remove(); 5 | 6 | NRDB.data.cards({ 7 | set_code : "alt" 8 | }).remove(); 9 | 10 | $('#card').typeahead({ 11 | name : 'cardnames', 12 | local : NRDB.data.cards().select('title') 13 | }); 14 | }); 15 | 16 | $(function() { 17 | $('#card').on('typeahead:selected typeahead:autocompleted', function(event, data) { 18 | var card = NRDB.data.cards({ 19 | title : data.value 20 | }).first(); 21 | var line = $(''+ 22 | card.title + '
'); 23 | line.on({ 24 | click: function(event) { line.remove() } 25 | }); 26 | line.insertBefore($('#card')); 27 | $(event.target).typeahead('setQuery', ''); 28 | }); 29 | }) 30 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/public/js/string_score.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * string_score.js: String Scoring Algorithm 0.1.10 3 | * 4 | * http://joshaven.com/string_score 5 | * https://github.com/joshaven/string_score 6 | * 7 | * Copyright (C) 2009-2011 Joshaven Potter-1)?l:Math.max(a,b);if(n===-1){if(s){e+=1-s;continue}else{return 0}}else{r=0.1}if(g[n]===h){r+=0.1}if(n===0){r+=0.6;if(d===0){o=1}}else{if(g.charAt(n-1)===" "){r+=0.8}}g=g.substring(n+1,p);f+=r}k=f/q;j=((k*(q/p))+k)/2;j=j/e;if(o&&(j+0.15<1)){j+=0.15}return j}; -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/translations/messages.fr.xlf: -------------------------------------------------------------------------------- 1 | 2 |3 | 12 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Builder/directimport.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block head %} 4 | 5 | 6 | 7 | 8 | 13 | 14 | {% endblock %} 15 | 16 | {% block body %} 17 | 18 |4 | 5 | 11 |6 | 9 | 10 |Symfony2 is great 7 |J'aime Symfony2 8 |19 | 20 |60 | 61 | {% endblock %} 62 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Builder/initbuild.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block body %} 4 | 5 | 17 | 18 |21 | 22 |58 | 59 |23 | 30 |31 | 32 |33 | 46 |47 | 48 |49 | 55 |56 | 57 |19 | 20 |46 | 47 | {% endblock %} 48 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Default/allcomments.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |21 | 22 |42 | 43 | 44 | 45 |23 |37 |24 | 25 |36 |Choose your identity26 | 27 |28 | {% for identity in identities %} 29 | 30 | 31 | {{ identity.title(app.request.locale) }} ({{ identity.pack.name }}) 32 | 33 | {% endfor %} 34 |35 |38 |40 | 41 |39 |
6 |55 | 56 | {% endblock %} 57 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Default/donators.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |7 | 8 |54 |9 | 10 |51 | 52 | 53 |Decklist comments:
11 |12 | 13 | 14 | 15 | {% for comment in comments %} 16 | 17 |
27 | 28 |18 | 23 | {% endfor %} 24 | 25 | 26 |19 | 22 |{{ comment.creation|date('M d, Y') }} on {{ comment.decklist_name }}, by {{ comment.author }}:20 | {{ comment.text|raw }} 21 |29 |49 | 50 |30 | {% if prevurl is null %} 31 |
48 |- «
32 | {% else %} 33 |- «
34 | {% endif %} 35 | {% for page in pages %} 36 | {% if page.current %} 37 |- {{ page.numero }} (current)
38 | {% else %} 39 |- {{ page.numero }}
40 | {% endif %} 41 | {% endfor %} 42 | {% if nexturl is null %} 43 |- »
44 | {% else %} 45 |- »
46 | {% endif %} 47 |6 |23 | 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Default/usercomments.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |7 | 8 |22 |9 |20 | 21 |The Gracious Donators
10 |NetrunnerDB wouldn't be the same without them. Many, many thanks.
11 |12 | {% for donator in donators %} 13 |
19 |- 14 | {{ donator.username }} 15 | 16 |
17 | {% endfor %} 18 |6 |55 | 56 | {% endblock %} 57 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Emails/newcomment_author.html.twig: -------------------------------------------------------------------------------- 1 |7 | 8 |54 |9 | 10 |51 | 52 | 53 |Published comments:
11 |12 | 13 | 14 | 15 | {% for comment in comments %} 16 | 17 |
27 | 28 |18 | 23 | {% endfor %} 24 | 25 | 26 |19 | 22 |{{ comment.creation|date('M d, Y') }} on {{ comment.decklist_name }}:20 | {{ comment.text|raw }} 21 |29 |49 | 50 |30 | {% if prevurl is null %} 31 |
48 |- «
32 | {% else %} 33 |- «
34 | {% endif %} 35 | {% for page in pages %} 36 | {% if page.current %} 37 |- {{ page.numero }} (current)
38 | {% else %} 39 |- {{ page.numero }}
40 | {% endif %} 41 | {% endfor %} 42 | {% if nexturl is null %} 43 |- »
44 | {% else %} 45 |- »
46 | {% endif %} 47 |{{ username }} commented on your decklist {{ decklist_name }}
2 |3 | {{ comment|raw }} 4 |5 |To unsubscribe from those notifications, change your account settings.
6 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Emails/newcomment_commenter.html.twig: -------------------------------------------------------------------------------- 1 |{{ username }} also commented on a decklist {{ decklist_name }}
2 |3 | {{ comment|raw }} 4 |5 |To unsubscribe from those notifications, change your account settings.
6 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/Emails/newcomment_mentionned.html.twig: -------------------------------------------------------------------------------- 1 |{{ username }} mentionned you in a comment on the decklist {{ decklist_name }}
2 |3 | {{ comment|raw }} 4 |5 |To unsubscribe from those notifications, change your account settings.
6 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Resources/views/octgn.xml.twig: -------------------------------------------------------------------------------- 1 | 2 |3 | -------------------------------------------------------------------------------- /src/Netrunnerdb/BuilderBundle/Tests/Controller/DefaultControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/hello/Fabien'); 14 | 15 | $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/.buildpath: -------------------------------------------------------------------------------- 1 | 2 |4 | 6 |{{ identity.name }} 5 |7 | {% for card in rd %} 8 | 11 |{{ card.name }} 9 | {% endfor %} 10 |12 | 3 | 6 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/.project: -------------------------------------------------------------------------------- 1 | 2 |4 | 5 | 3 | 23 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Fri Jul 05 15:27:43 CEST 2013 2 | eclipse.preferences.version=1 3 | encoding//Controller/DefaultController.php=UTF-8 4 | encoding/CardsBundle 4 |5 | 6 | 7 |8 | 19 |9 | 13 |org.eclipse.wst.validation.validationbuilder 10 |11 | 12 |14 | 18 |org.eclipse.dltk.core.scriptbuilder 15 |16 | 17 |20 | 22 |org.eclipse.php.core.PHPNature 21 |=UTF-8 5 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/.settings/org.eclipse.php.core.prefs: -------------------------------------------------------------------------------- 1 | #Fri Jul 05 15:27:45 CEST 2013 2 | eclipse.preferences.version=1 3 | include_path=0;/CardsBundle 4 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/DQL/BinaryFunction.php: -------------------------------------------------------------------------------- 1 | stringPrimary->dispatch($sqlWalker); 20 | } 21 | 22 | /** 23 | * @override 24 | */ 25 | public function parse(\Doctrine\ORM\Query\Parser $parser) { 26 | $parser->match(Lexer::T_IDENTIFIER); 27 | $parser->match(Lexer::T_OPEN_PARENTHESIS); 28 | $this->stringPrimary = $parser->StringPrimary(); 29 | $parser->match(Lexer::T_CLOSE_PARENTHESIS); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/DQL/ReplaceFunction.php: -------------------------------------------------------------------------------- 1 | stringPrimary->dispatch($sqlWalker) . ', ' . 28 | $this->stringSecondary->dispatch($sqlWalker) . ', ' . 29 | $this->stringThird->dispatch($sqlWalker) . 30 | ')'; 31 | /* return $sqlWalker->getConnection()->getDatabasePlatform()->getReplaceExpression( 32 | $this->stringPrimary, $this->stringSecondary, $this->stringThird 33 | );*/ 34 | } 35 | 36 | /** 37 | * @override 38 | */ 39 | public function parse(\Doctrine\ORM\Query\Parser $parser) { 40 | $parser->match(Lexer::T_IDENTIFIER); 41 | $parser->match(Lexer::T_OPEN_PARENTHESIS); 42 | $this->stringPrimary = $parser->StringPrimary(); 43 | $parser->match(Lexer::T_COMMA); 44 | $this->stringSecondary = $parser->StringPrimary(); 45 | $parser->match(Lexer::T_COMMA); 46 | $this->stringThird = $parser->StringPrimary(); 47 | $parser->match(Lexer::T_CLOSE_PARENTHESIS); 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('netrunnerdb_netrunner_cards'); 22 | 23 | // Here you should define the parameters that are allowed to 24 | // configure your bundle. See the documentation linked above for 25 | // more information on that topic. 26 | 27 | return $treeBuilder; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/DependencyInjection/NetrunnerdbCardsExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 24 | 25 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 | $loader->load('services.yml'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Form/CycleType.php: -------------------------------------------------------------------------------- 1 | add('code') 15 | ->add('name') 16 | ->add('nameFr') 17 | ->add('nameDe') 18 | ->add('nameEs') 19 | ->add('namePl') 20 | ->add('number') 21 | ; 22 | } 23 | 24 | public function setDefaultOptions(OptionsResolverInterface $resolver) 25 | { 26 | $resolver->setDefaults(array( 27 | 'data_class' => 'Netrunnerdb\CardsBundle\Entity\Cycle' 28 | )); 29 | } 30 | 31 | public function getName() 32 | { 33 | return 'netrunnerdb_cardsbundle_cycletype'; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Form/PackType.php: -------------------------------------------------------------------------------- 1 | add('code') 15 | ->add('name') 16 | ->add('nameFr') 17 | ->add('nameDe') 18 | ->add('nameEs') 19 | ->add('namePl') 20 | ->add('released') 21 | ->add('size') 22 | ->add('number') 23 | ->add('cycle', 'entity', array('class' => 'NetrunnerdbCardsBundle:Cycle', 'property' => 'name')) 24 | ; 25 | } 26 | 27 | public function setDefaultOptions(OptionsResolverInterface $resolver) 28 | { 29 | $resolver->setDefaults(array( 30 | 'data_class' => 'Netrunnerdb\CardsBundle\Entity\Pack' 31 | )); 32 | } 33 | 34 | public function getName() 35 | { 36 | return 'netrunnerdb_cardsbundle_packtype'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Form/TypeType.php: -------------------------------------------------------------------------------- 1 | add('name') 15 | ->add('nameFr') 16 | ->add('nameDe') 17 | ->add('nameEs') 18 | ->add('namePl') 19 | ; 20 | } 21 | 22 | public function setDefaultOptions(OptionsResolverInterface $resolver) 23 | { 24 | $resolver->setDefaults(array( 25 | 'data_class' => 'Netrunnerdb\CardsBundle\Entity\Type' 26 | )); 27 | } 28 | 29 | public function getName() 30 | { 31 | return 'netrunnerdb_cardsbundle_typetype'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/NetrunnerdbCardsBundle.php: -------------------------------------------------------------------------------- 1 | Card edit 5 | 6 | 13 | 14 | 15 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Card/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 16 | 17 | Back to the list 18 | 19 |
20 |- 21 | 26 |
27 |Card creation
5 | 6 | 12 | 13 |14 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Cycle/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 15 | 16 | Back to the list 17 | 18 |
19 |Cycle edit
5 | 6 | 13 | 14 |15 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Cycle/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 16 | 17 | Back to the list 18 | 19 |
20 |- 21 | 26 |
27 |Cycle list
5 | 6 |7 | 8 |
45 | 46 |9 | 19 | 20 | 21 | {% for entity in entities %} 22 |Id 10 |Code 11 |Name 12 |Namefr 13 |Namede 14 |Namees 15 |Namepl 16 |Number 17 |Actions 18 |23 | 42 | {% endfor %} 43 | 44 |{{ entity.id }} 24 |{{ entity.code }} 25 |{{ entity.name }} 26 |{{ entity.nameFr }} 27 |{{ entity.nameDe }} 28 |{{ entity.nameEs }} 29 |{{ entity.namePl }} 30 |{{ entity.number }} 31 |32 | 40 | 41 |47 |
53 | {% endblock %} 54 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Cycle/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 48 | 49 | Create a new entry 50 | 51 |
52 |Cycle creation
5 | 6 | 12 | 13 |14 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Cycle/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 15 | 16 | Back to the list 17 | 18 |
19 |Cycle
5 | 6 |7 | 8 |
42 | 43 |9 | 12 |Id 10 |{{ entity.id }} 11 |13 | 16 |Code 14 |{{ entity.code }} 15 |17 | 20 |Name 18 |{{ entity.name }} 19 |21 | 24 |Namefr 22 |{{ entity.nameFr }} 23 |25 | 28 |Namede 26 |{{ entity.nameDe }} 27 |29 | 32 |Namees 30 |{{ entity.nameEs }} 31 |33 | 36 |Namepl 34 |{{ entity.namePl }} 35 |37 | 40 | 41 |Number 38 |{{ entity.number }} 39 |44 |
62 | {% endblock %} 63 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/allsets.html.twig: -------------------------------------------------------------------------------- 1 |- 45 | 46 | Back to the list 47 | 48 |
49 |- 50 | 51 | Edit 52 | 53 |
54 |- 55 | 60 |
61 |2 | {% for cycle in data %} 3 |
14 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/langs.html.twig: -------------------------------------------------------------------------------- 1 | {% set params = app.request.attributes.get('_route_params')|merge(app.request.query.all()) %} 2 |- {{ cycle.name }} {% if cycle.cyclenumber != 0 and cycle.known != cycle.total %}({{cycle.known}}/{{cycle.total}}){% endif %} 4 | {% if cycle.packs|length > 1 %} 5 |
12 | {% endfor %} 13 |6 | {% for pack in cycle.packs %} 7 |
10 | {% endif %} 11 |- {{ pack.name }} {% if cycle.cyclenumber != 0 and pack.known != pack.total %}({{pack.known}}/{{pack.total}}){% endif %}
8 | {% endfor %} 9 |3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/menu.html.twig: -------------------------------------------------------------------------------- 1 | 2 | {% for set in sets %} 3 |
6 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/rulings.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle::main.html.twig' %} 2 | 3 | {% block title %}Rulings{% endblock %} 4 | 5 | {% block content %} 6 | 7 |- {{ set.name }}
4 | {% endfor %} 5 |{{ block('title') }}
8 | 9 |10 | 11 |22 |From the latest FAQ
12 | 13 |14 | {% for ruling in faq %} 15 |
21 |- 16 |
19 | {% endfor %} 20 |{{ ruling.question|raw }}17 |{{ ruling.answer|raw }} ({{ ruling.created }})18 |23 | 24 |35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/searchoptions.html.twig: -------------------------------------------------------------------------------- 1 |By direct answer
25 | 26 |27 | {% for ruling in mail %} 28 |
34 |- 29 |
32 | {% endfor %} 33 |{{ ruling.question|raw }}30 |{{ ruling.answer|raw }} ({{ ruling.created }})31 |2 | 10 |11 |12 | 19 | 20 |-------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Default/sitemap.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle::main.html.twig' %} 2 | 3 | {% block title %}{% trans %}Card Sets{% endtrans %}{% endblock %} 4 | 5 | {% block content %} 6 | 7 |{{ block('title') }}
8 | 9 | {{ allsets|raw }} 10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Excel/confirm.html.twig: -------------------------------------------------------------------------------- 1 | {% autoescape false %} 2 |{{ locale }}
3 |4 | {% for card in cards %} 5 |
18 | 21 | {% endautoescape %} -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Excel/form.html.twig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Pack/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |6 | 16 | {% endfor %} 17 |{{ card.code }} 7 |{{ card.oldtitle }} 8 |{{ card.title }} 9 |{{ card.oldkeywords }} 10 |{{ card.keywords }} 11 |{{ card.oldtext|nl2br }} 12 |{{ card.text|nl2br }} 13 |{{ card.oldflavor }} 14 |{{ card.flavor }} 15 |Pack edit
5 | 6 | 13 | 14 |15 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Pack/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 16 | 17 | Back to the list 18 | 19 |
20 |- 21 | 26 |
27 |Pack list
5 | 6 |7 | 8 |
49 | 50 |9 | 21 | 22 | 23 | {% for entity in entities %} 24 |Id 10 |Code 11 |Name 12 |Namefr 13 |Namede 14 |Namees 15 |Namepl 16 |Released 17 |Size 18 |Number 19 |Actions 20 |25 | 46 | {% endfor %} 47 | 48 |{{ entity.id }} 26 |{{ entity.code }} 27 |{{ entity.name }} 28 |{{ entity.nameFr }} 29 |{{ entity.nameDe }} 30 |{{ entity.nameEs }} 31 |{{ entity.namePl }} 32 |{% if entity.released %}{{ entity.released|date('Y-m-d H:i:s') }}{% endif %} 33 |{{ entity.size }} 34 |{{ entity.number }} 35 |36 | 44 | 45 |51 |
57 | {% endblock %} 58 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Pack/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 52 | 53 | Create a new entry 54 | 55 |
56 |Pack creation
5 | 6 | 12 | 13 |14 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Pack/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 15 | 16 | Back to the list 17 | 18 |
19 |Pack
5 | 6 |7 | 8 |
50 | 51 |9 | 12 |Id 10 |{{ entity.id }} 11 |13 | 16 |Code 14 |{{ entity.code }} 15 |17 | 20 |Name 18 |{{ entity.name }} 19 |21 | 24 |Namefr 22 |{{ entity.nameFr }} 23 |25 | 28 |Namede 26 |{{ entity.nameDe }} 27 |29 | 32 |Namees 30 |{{ entity.nameEs }} 31 |33 | 36 |Namepl 34 |{{ entity.namePl }} 35 |37 | 40 |Released 38 |{{ entity.released|date('Y-m-d H:i:s') }} 39 |41 | 44 |Size 42 |{{ entity.size }} 43 |45 | 48 | 49 |Number 46 |{{ entity.number }} 47 |52 |
70 | {% endblock %} 71 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display-card.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle:Search:display.html.twig' %} 2 | 3 | {% import "NetrunnerdbCardsBundle:Search:cardlayouts.html.twig" as cardlayouts %} 4 | 5 | {% block main %} 6 | 7 | {% for i in 0..cards|length-1 %} 8 | {{ cardlayouts.with_scan(cards[i]) }} 9 | {% endfor %} 10 | 11 | {% endblock %} 12 | 13 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display-list.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle:Search:display.html.twig' %} 2 | 3 | {% import "NetrunnerdbCardsBundle:Search:cardlayouts.html.twig" as cardlayouts %} 4 | 5 | {% block main %} 6 | 7 |- 53 | 54 | Back to the list 55 | 56 |
57 |- 58 | 59 | Edit 60 | 61 |
62 |- 63 | 68 |
69 |8 | 9 |
24 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display-scan.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle:Search:display.html.twig' %} 2 | 3 | {% import "NetrunnerdbCardsBundle:Search:cardlayouts.html.twig" as cardlayouts %} 4 | 5 | {% block main %} 6 | 7 | 8 | {% for row in 0..(cards|length-1)//4 %} 9 |10 | 19 | 20 | {% for i in 0..cards|length-1 %} 21 |{% trans %}Title{% endtrans %} 11 |{% trans %}Faction{% endtrans %} 12 |13 | {% trans %}Type{% endtrans %} 14 |… 15 |{% trans %}Subtype{% endtrans %} 16 |• 17 |{% trans %}Set{% endtrans %} 18 |{{ cardlayouts.as_list(cards[i]) }} 22 | {% endfor %} 23 |10 | {% for col in 0..3 %}{% set index = row*4+col %} 11 | {% if index in cards|keys %} 12 | {{ cardlayouts.scan_only(cards[index]) }} 13 | {% endif %} 14 | {% endfor %} 15 |16 | {% endfor %} 17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display-short.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle:Search:display.html.twig' %} 2 | 3 | {% import "NetrunnerdbCardsBundle:Search:cardlayouts.html.twig" as cardlayouts %} 4 | 5 | {% block main %} 6 | 7 | {% for key, value in cards %} 8 |{{ key }}
9 |10 | {% for i in 0..value|length-1 %} 11 | {{ cardlayouts.as_simple(value[i]) }} 12 | {% endfor %} 13 |14 | {% endfor %} 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display-spoiler.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbCardsBundle:Search:display.html.twig' %} 2 | 3 | {% import "NetrunnerdbCardsBundle:Search:cardlayouts.html.twig" as cardlayouts %} 4 | 5 | {% block main %} 6 | 7 | {% for row in 0..(cards|length-1)//4 %} 8 |9 | {% for col in 0..3 %} 10 | {% if row*4+col < cards|length %}{{ cardlayouts.as_grid(cards[row*4+col]) }}{% endif %} 11 | {% endfor %} 12 |13 | {% endfor %} 14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/display.html.twig: -------------------------------------------------------------------------------- 1 | {% extends display_mode_template %} 2 | 3 | {% block title %}{{ title }}{% endblock %} 4 | 5 | {% block content %} 6 | 7 | {% if mode == 'full' %} 8 | {{ searchbar|raw }} 9 | {% endif %} 10 | 11 |12 | 13 | {% if mode == 'full' or mode == 'fragment' %} 14 | {{ pagination|raw }} 15 | {% endif %} 16 | 17 |36 | 37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/pagination.html.twig: -------------------------------------------------------------------------------- 1 |18 | 19 | {% if cards|length > 0 %} 20 | 21 | {% block main %}{% endblock %} 22 | 23 | {% else %} 24 |30 | 31 | {% if mode == 'full' or mode == 'fragment' %} 32 | {{ pagination|raw }} 33 | {% endif %} 34 | 35 |25 |27 | 28 | {% endif %} 29 |Your query didn't match any card.
26 |2 |19 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/paginationitem.html.twig: -------------------------------------------------------------------------------- 1 | {% if href %}{% endif %} {{ s }}–{{ e }}{% if href %}{% endif %} -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/searchbar.html.twig: -------------------------------------------------------------------------------- 1 |3 |4 |5 |15 |6 |
14 |- {{ first|raw }}
7 | {% if ellipsisbefore %}- ...
{% endif %} 8 |- {{ prev|raw }}
9 |- {{ current|raw }}
10 |- {{ next|raw }}
11 | {% if ellipsisafter %}- ...
{% endif %} 12 |- {{ last|raw }}
13 |16 |18 |{{ count }} {% trans %}cards{% endtrans %}
17 |2 | 25 |26 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Search/setnavigation.html.twig: -------------------------------------------------------------------------------- 1 |2 |16 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Type/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |3 |15 |4 |
14 |- 5 | {% if prevtitle %}← {{ prevtitle }}{% endif %} 6 |
7 |- 8 | {{ settitle }} 9 |
10 |- 11 | {% if nexttitle %}{{ nexttitle }} →{% endif %} 12 |
13 |Type edit
5 | 6 | 13 | 14 |15 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Type/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 16 | 17 | Back to the list 18 | 19 |
20 |- 21 | 26 |
27 |Type list
5 | 6 |7 | 8 |
41 | 42 |9 | 17 | 18 | 19 | {% for entity in entities %} 20 |Id 10 |Name 11 |Namefr 12 |Namede 13 |Namees 14 |Namepl 15 |Actions 16 |21 | 38 | {% endfor %} 39 | 40 |{{ entity.id }} 22 |{{ entity.name }} 23 |{{ entity.nameFr }} 24 |{{ entity.nameDe }} 25 |{{ entity.nameEs }} 26 |{{ entity.namePl }} 27 |28 | 36 | 37 |43 |
49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Type/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 44 | 45 | Create a new entry 46 | 47 |
48 |Type creation
5 | 6 | 12 | 13 |14 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/Type/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '::base.html.twig' %} 2 | 3 | {% block body -%} 4 |- 15 | 16 | Back to the list 17 | 18 |
19 |Type
5 | 6 |7 | 8 |
34 | 35 |9 | 12 |Id 10 |{{ entity.id }} 11 |13 | 16 |Name 14 |{{ entity.name }} 15 |17 | 20 |Namefr 18 |{{ entity.nameFr }} 19 |21 | 24 |Namede 22 |{{ entity.nameDe }} 23 |25 | 28 |Namees 26 |{{ entity.nameEs }} 27 |29 | 32 | 33 |Namepl 30 |{{ entity.namePl }} 31 |36 |
54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/apiset.xml.twig: -------------------------------------------------------------------------------- 1 | 2 |- 37 | 38 | Back to the list 39 | 40 |
41 |- 42 | 43 | Edit 44 | 45 |
46 |- 47 | 52 |
53 |8 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Resources/views/main.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block body %} 4 | 5 | {#} 6 | {% render(controller('NetrunnerdbCardsBundle:Default:header', {'_locale':app.request.locale})) %} 7 | #} 8 |9 | {% autoescape false %} 10 | {% for card in cards %} 11 | 30 |12 | 27 | {% endfor %} 28 | {% endautoescape %} 29 |13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 9 | {% block content %}{% endblock %} 10 |11 | {# 12 | {% include 'NetrunnerdbCardsBundle::footer.html.twig' %} 13 | #} 14 | {% endblock %} -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/CardControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/card/'); 17 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /admin/card/"); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_cardtype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_cardtype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } 56 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/CardsControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/cards/'); 17 | $this->assertTrue(200 === $client->getResponse()->getStatusCode()); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_cardstype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertTrue($crawler->filter('td:contains("Test")')->count() > 0); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_cardstype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertTrue($crawler->filter('[value="Foo"]')->count() > 0); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/CycleControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/cycle/'); 17 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /admin/cycle/"); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_cycletype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_cycletype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } 56 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/DefaultControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/hello/Fabien'); 14 | 15 | $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/PackControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/pack/'); 17 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /admin/pack/"); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_packtype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_packtype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } 56 | -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/RulingsControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/rulings/'); 17 | $this->assertTrue(200 === $client->getResponse()->getStatusCode()); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_rulingstype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertTrue($crawler->filter('td:contains("Test")')->count() > 0); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_rulingstype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertTrue($crawler->filter('[value="Foo"]')->count() > 0); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/RxcControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/rxc/'); 17 | $this->assertTrue(200 === $client->getResponse()->getStatusCode()); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_rxctype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertTrue($crawler->filter('td:contains("Test")')->count() > 0); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_rxctype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertTrue($crawler->filter('[value="Foo"]')->count() > 0); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/CardsBundle/Tests/Controller/TypeControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/admin/type/'); 17 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /admin/type/"); 18 | $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); 19 | 20 | // Fill in the form and submit it 21 | $form = $crawler->selectButton('Create')->form(array( 22 | 'netrunnerdb_cardsbundle_typetype[field_name]' => 'Test', 23 | // ... other fields to fill 24 | )); 25 | 26 | $client->submit($form); 27 | $crawler = $client->followRedirect(); 28 | 29 | // Check data in the show view 30 | $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); 31 | 32 | // Edit the entity 33 | $crawler = $client->click($crawler->selectLink('Edit')->link()); 34 | 35 | $form = $crawler->selectButton('Edit')->form(array( 36 | 'netrunnerdb_cardsbundle_typetype[field_name]' => 'Foo', 37 | // ... other fields to fill 38 | )); 39 | 40 | $client->submit($form); 41 | $crawler = $client->followRedirect(); 42 | 43 | // Check the element contains an attribute with value equals "Foo" 44 | $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); 45 | 46 | // Delete the entity 47 | $client->submit($crawler->selectButton('Delete')->form()); 48 | $crawler = $client->followRedirect(); 49 | 50 | // Check the entity has been delete on the list 51 | $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); 52 | } 53 | 54 | */ 55 | } 56 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Command/DeleteInactiveCommand.php: -------------------------------------------------------------------------------- 1 | setName('nrdb:inactive-users') 19 | ->setDescription('Delete users inactive since 48 hours') 20 | ; 21 | } 22 | 23 | protected function execute(InputInterface $input, OutputInterface $output) 24 | { 25 | $em = $this->getContainer()->get('doctrine')->getManager(); 26 | $limit = new \DateTime(); 27 | $limit->sub(new \DateInterval('PT48H')); 28 | $count = 0; 29 | 30 | $users = $em->getRepository('NetrunnerdbUserBundle:User')->findBy(array('enabled' => false)); 31 | foreach($users as $user) { 32 | /* @var $user Netrunnerdb\UserBundle\Entity\User */ 33 | if($user->getCreation() < $limit) { 34 | $count++; 35 | $em->remove($user); 36 | } 37 | } 38 | $em->flush(); 39 | $output->writeln(date('c') . " Delete $count inactive users."); 40 | } 41 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Controller/RegistrationController.php: -------------------------------------------------------------------------------- 1 | container->get('fos_user.user_manager'); 18 | 19 | $user = $userManager->findUserByConfirmationToken($token); 20 | 21 | if (null === $user) { 22 | // User with token not found. Do whatever you want here 23 | return new RedirectResponse($this->container->get('router')->generate('fos_user_security_login')); 24 | } 25 | else{ 26 | // Token found. Letting the FOSUserBundle's action handle the confirmation 27 | return parent::confirmAction($request, $token); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Controller/SecurityController.php: -------------------------------------------------------------------------------- 1 | getSession(); 16 | 17 | if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { 18 | $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR); 19 | } elseif (null !== $session && $session->has(SecurityContext::AUTHENTICATION_ERROR)) { 20 | $error = $session->get(SecurityContext::AUTHENTICATION_ERROR); 21 | $session->remove(SecurityContext::AUTHENTICATION_ERROR); 22 | } else { 23 | $error = ''; 24 | } 25 | 26 | if ($error) { 27 | $error = $error->getMessage(); 28 | } 29 | 30 | $lastUsername = (null === $session) ? '' : $session->get(SecurityContext::LAST_USERNAME); 31 | 32 | return $this->render( 33 | 'NetrunnerdbUserBundle:Security:login.html.twig', 34 | array( 35 | 'last_username' => $lastUsername, 36 | 'error' => $error, 37 | ) 38 | ); 39 | } 40 | 41 | public function loginCheckAction(Request $request) 42 | { 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('netrunnerdb_user'); 22 | 23 | // Here you should define the parameters that are allowed to 24 | // configure your bundle. See the documentation linked above for 25 | // more information on that topic. 26 | 27 | return $treeBuilder; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/DependencyInjection/NetrunnerdbUserExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 24 | 25 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 | $loader->load('services.yml'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Entity/AccessToken.php: -------------------------------------------------------------------------------- 1 | name; 30 | } 31 | 32 | public function setName($name) 33 | { 34 | $this->name = $name; 35 | } 36 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Entity/RefreshToken.php: -------------------------------------------------------------------------------- 1 | userRepository = $userRepository; 20 | } 21 | 22 | public function loadUserByUsername($username) 23 | { 24 | $q = $this->userRepository 25 | ->createQueryBuilder('u') 26 | ->where('u.username = :username OR u.email = :email') 27 | ->setParameter('username', $username) 28 | ->setParameter('email', $username) 29 | ->getQuery(); 30 | 31 | try { 32 | $user = $q->getSingleResult(); 33 | } catch (NoResultException $e) { 34 | $message = sprintf( 35 | 'Unable to find an active admin NetrunnerdbUserBundle:User object identified by "%s".', 36 | $username 37 | ); 38 | throw new UsernameNotFoundException($message, 0, $e); 39 | } 40 | 41 | return $user; 42 | } 43 | 44 | public function refreshUser(UserInterface $user) 45 | { 46 | $class = get_class($user); 47 | if (!$this->supportsClass($class)) { 48 | throw new UnsupportedUserException( 49 | sprintf( 50 | 'Instances of "%s" are not supported.', 51 | $class 52 | ) 53 | ); 54 | } 55 | 56 | return $this->userRepository->find($user->getId()); 57 | } 58 | 59 | public function supportsClass($class) 60 | { 61 | return $this->userRepository->getClassName() === $class 62 | || is_subclass_of($class, $this->userRepository->getClassName()); 63 | } 64 | } -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/doctrine/AccessToken.orm.yml: -------------------------------------------------------------------------------- 1 | Netrunnerdb\UserBundle\Entity\AccessToken: 2 | type: entity 3 | table: access_token 4 | manyToOne: 5 | client: 6 | targetEntity: Client 7 | nullable: false 8 | joinColumn: 9 | name: client_id 10 | referencedColumnName: id 11 | user: 12 | targetEntity: User 13 | nullable: false 14 | joinColumn: 15 | name: user_id 16 | referencedColumnName: id 17 | fields: 18 | id: 19 | type: integer 20 | id: true 21 | generator: 22 | strategy: AUTO 23 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/doctrine/AuthCode.orm.yml: -------------------------------------------------------------------------------- 1 | Netrunnerdb\UserBundle\Entity\AuthCode: 2 | type: entity 3 | table: auth_code 4 | manyToOne: 5 | client: 6 | targetEntity: Client 7 | nullable: false 8 | joinColumn: 9 | name: client_id 10 | referencedColumnName: id 11 | user: 12 | targetEntity: User 13 | nullable: false 14 | joinColumn: 15 | name: user_id 16 | referencedColumnName: id 17 | fields: 18 | id: 19 | type: integer 20 | id: true 21 | generator: 22 | strategy: AUTO 23 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/doctrine/Client.orm.yml: -------------------------------------------------------------------------------- 1 | Netrunnerdb\UserBundle\Entity\Client: 2 | type: entity 3 | table: client 4 | fields: 5 | id: 6 | type: integer 7 | id: true 8 | generator: 9 | strategy: AUTO 10 | name: 11 | type: string 12 | 13 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/doctrine/RefreshToken.orm.yml: -------------------------------------------------------------------------------- 1 | Netrunnerdb\UserBundle\Entity\RefreshToken: 2 | type: entity 3 | table: refresh_token 4 | manyToOne: 5 | client: 6 | targetEntity: Client 7 | nullable: false 8 | joinColumn: 9 | name: client_id 10 | referencedColumnName: id 11 | user: 12 | targetEntity: User 13 | nullable: false 14 | joinColumn: 15 | name: user_id 16 | referencedColumnName: id 17 | fields: 18 | id: 19 | type: integer 20 | id: true 21 | generator: 22 | strategy: AUTO 23 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/routing.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gilberterik/netrunnerdb/a512f74ce902e6ba271a5f6bbfdb02d142be0b43/src/Netrunnerdb/UserBundle/Resources/config/routing.yml -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/config/services.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # netrunnerdb_user.example.class: Netrunnerdb\UserBundle\Example 3 | 4 | services: 5 | # netrunnerdb_user.example: 6 | # class: %netrunnerdb_user.example.class% 7 | # arguments: [@service_id, "plain_value", %parameter%] 8 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/doc/index.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gilberterik/netrunnerdb/a512f74ce902e6ba271a5f6bbfdb02d142be0b43/src/Netrunnerdb/UserBundle/Resources/doc/index.rst -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/translations/messages.fr.xlf: -------------------------------------------------------------------------------- 1 | 2 |3 | 12 | -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Resources/views/Security/login.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'NetrunnerdbBuilderBundle::layout.html.twig' %} 2 | 3 | {% block navbar %}{% endblock %} 4 | 5 | {% block body %} 6 | 7 |4 | 5 | 11 |6 | 9 | 10 |Symfony2 is great 7 |J'aime Symfony2 8 |8 | 9 |44 | 45 | {% endblock %} 46 | 47 | {% block footer %}{% endblock %} -------------------------------------------------------------------------------- /src/Netrunnerdb/UserBundle/Tests/Controller/DefaultControllerTest.php: -------------------------------------------------------------------------------- 1 | request('GET', '/hello/Fabien'); 14 | 15 | $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /web/app.php: -------------------------------------------------------------------------------- 1 | register(true); 14 | */ 15 | 16 | require_once __DIR__.'/../app/AppKernel.php'; 17 | require_once __DIR__.'/../app/AppCache.php'; 18 | 19 | $kernel = new AppKernel('prod', false); 20 | $kernel->loadClassCache(); 21 | $kernel = new AppCache($kernel); 22 | Request::enableHttpMethodParameterOverride(); 23 | $request = Request::createFromGlobals(); 24 | $response = $kernel->handle($request); 25 | $response->send(); 26 | $kernel->terminate($request, $response); 27 | -------------------------------------------------------------------------------- /web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 27 | Request::enableHttpMethodParameterOverride(); 28 | $request = Request::createFromGlobals(); 29 | $response = $kernel->handle($request); 30 | $response->send(); 31 | $kernel->terminate($request, $response); 32 | -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | --------------------------------------------------------------------------------10 |43 |11 |42 |12 |41 |13 |15 |14 |
NetrunnerDB Authentication
16 |40 |17 | 18 |38 | 39 |19 | Welcome on NetrunnerDB. Please log in to proceed. Your password will remain confidential. 20 |
21 | 37 |