I want create panels with Twitter Bootstrap in rails app.
<div class="panel panel-default">
<div class="panel-heading">Panel heading without title</div>
<div class="panel-body">
Panel content
</div>
</div>
According to the official doc, we will get like this:
but I just get the text.
Panel heading without title
Panel content
Hope someone can help me, thanks in advance!
Edit the Gemfile.
# gem "twitter-bootstrap-rails"
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git' # install the lastest version
then bundle install to install the latest version.
Related
I know that a vue component has an ending tag. But in laravel 8.x, I found jet-application-mark without an ending tag like this...
<div class="flex-shrink-0 flex items-center">
<a href="/dashboard">
<jet-application-mark class="block h-9 w-auto" />
</a>
</div>
If you have laravel installed, you will find the full source code here...
resources > js > layouts > AppLayout.vue (line no: 11)
Is it a vue component? of anything else?
It Jetstream from the new Livewire package that replaces Laravel Auth packages:
From the webpage: Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next Laravel application and includes login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management.
If you need to change the icon you must publish the Jetstream views with this command:
php artisan vendor:publish --tag=jetstream-views
Next, you should customize the SVGs located in the
resources/views/vendor/jetstream/components/application-logo.blade.php,
resources/views/vendor/jetstream/components/authentication-card-logo.blade.php,
and
resources/views/vendor/jetstream/components/application-mark.blade.php
components.
Source: Jetstream Documentation
If you want to learn what is Livewire you can read the docs in https://laravel-livewire.com
I'm using vue as CDN because app is really simple.
at this point when I add the code
<div id="app">
<!-- some code here -->
<form action="/charge" method="POST">
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<%= stripePublishableKey %>"
data-amount="2500"
data-name="ec-system payment"
data-description="You will pay this money for something!"
data-locale="auto">
</script>
</form>
</div>
This code gives me the error something like below.
Templates should only be responsible for mapping the state to the UI.
Avoid placing tags with side-effects in your templates, such as
, as they will not be parsed
I found some npm library like "vue-stripe" but I don't know how I can use this library when I use vue with cdn not the vue-cli.
In vue, you can not use script tag inside of template.
In your case you could use this library called "vue-stripe-checkout".
This library supports in two ways
NPM or Yarn
npm install vue-stripe-checkout --save
yarn add vue-stripe-checkout
CDN
https://unpkg.com/vue-stripe-checkout/build/vue-stripe-checkout.js
You can use second method by including cdn into your app.
Please refer this vue-stripe-checkout for detailed information.
I have a basic html form with Angular JS.
<div class="form-control" id="alarm">
<select ng-model="vm.clock.alarm" ng-options="option.title for option in vm.alarms track by option.url"/>
</div>
This runs fine in a chrome browser window. However, when I run this inside of an electron app, the select box renders and functions fine, but no html is rendered after it. There are no javascript errors. When I inspect the html, there is no html after the select element in the dom. Why is electron not rendering the html just like a chrome browser?
I am using the latest version of electron, chrome, and 1.4.8 of angular.
The issues was with the select option and not having a closing </select> tag. Must be a bug in electron or electron's chromium version.
<div class="form-control" id="alarm">
<select ng-model="vm.clock.alarm" ng-options="option.title for option in vm.alarms track by option.url">
</select>
</div>
works
I have developed the ruby on rails application and am trying to deploy it using apache-passenger sub uri by referring this link. images, css and javascripts are working without any issues. But anchor tag and refinery cms other menu tabs are not working.
My anchor tag code is
I have mounted refinery cms on '/admin'. When I access it using http://mydomain.com/suburi, it will successfully logs in but when I click on menus like pages, files and etc I will get 404 error.
The same application will works fine without sub uri. Please Any one help me to fix this problem.
Thanks in advance
I referred this this url and issue is got fixed by doing the below changes
I solved first problem like this
rake RAILS_RELATIVE_URL_ROOT=/suburi assets:precompile RAILS_ENV=production
RAILSapp -> config -> environments -> production.rb
config.action_controller.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT']
In views I did like this
<a href=<%= "#{request.env['HTTP-HOST']}#{ENV['RAILS_RELATIVE_URL_ROOT']}/product_details/#{p1}/#{p2}" %> target="_blank" id="zoomid" >Link Name</a>
For refinery I have added app->views->refinery->admin->_menu.html.erb
<%= link_to plugin.title, refinery.url_for("#{ENV['RAILS_RELATIVE_URL_ROOT']}#{plugin.url}"),:class => ("active" if plugin.highlighted?(params)),:id => "plugin_#{plugin.name}" %>
and in app -> views -> refinery -> _site_bar.html.erb
<%= link_to "Home", "#{ENV['RAILS_RELATIVE_URL_ROOT']}" -%>
My issues is got fixed. If this is not right approach then please tell me the right approach
Thanks
Buttons generated by link_to_add are clickable but no partial form is generated for them on the screen after being clicked. The issue started after adding the modal.js from bootstrap. Currently the javascript is loaded using:
In the layout, along with:
gem 'jquery-rails', '~> 2.1.4'
gem 'nested_form'
In the gem file, using rails 3.0.9.
Locally using development mode there is no issue, the issue only arises once pushed to Heroku.
Tracing what's happening I see no errors occuring in any javascript, but I do notice that this happens at the bottom of any source involving add_to_link:
<div data-blueprint="<div class="fields"> <div class="w450 eboxw">
<table style="width:100%;" class="copy reg">
<tr>
<td><label class="copy
I believe that this is meant to be the target of the link_to_add action and the fact that it contains so many seemingly incorrect characters is troubling to me.
I've read about asset pipelines which I don't believe I have set up for the application, any configuration tips or possible reasons this could happen are appreciated.
I think you need to precompile the assets before uploading to Heroku. Did you do that? Can you use Rails 3.2, then precompile, then upload?